/* Google Fonts - Schibsted Grotesk */
@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;700;900&display=swap');

/* Global Styles */
:root {
    --primary-color: #682E82; /* Purple from the poster */
    --accent-color: #E75F4C; /* Salmon/orange from the poster */
    --text-color: #FFFFFF;
    --error-color: #FF6B6B;
    --success-color: #4CAF50;
    --font-family: 'Schibsted Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 10px;
}

.logo {
    max-width: 240px;
    margin-bottom: 15px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900; /* Updated to 900 weight */
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700; /* Slightly bolder */
}

.tagline {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Content */
main {
    flex: 1;
    width: 100%;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    background-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

button {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    padding: 12px 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

button:hover {
    background-color: #D54C3A;
}

.inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline label {
    margin-bottom: 0;
}

/* Signature Pad */
.signature-pad {
    width: 100%;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin-bottom: 10px;
    position: relative;
}

.signature-pad canvas {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.signature-pad-footer {
    text-align: right;
    padding: 10px;
    position: absolute;
    bottom: 0;
    right: 0;
}

.clear-button {
    background-color: #666;
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Admin Page */
.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.back-btn {
    display: inline-block;
    background-color: #666;
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    text-align: center; /* Added to center the text */
}

.back-btn:hover {
    background-color: #555;
}

/* Attendance List */
.attendance-list {
    margin-top: 20px;
}

/* Remember Me Checkbox Styles */
.remember-group {
    margin-top: -10px;
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    font-size: 1rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    height: 18px;
    width: 18px;
    cursor: pointer;
}

.checkbox-text {
    user-select: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    background-color: rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

.signature-cell {
    text-align: center;
}

.signature-image {
    max-height: 60px;
    max-width: 150px;
	text-align: left
}

.record-count {
    margin-top: 15px;
    font-style: italic;
}

.no-records {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    font-style: italic;
}

/* Messages */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
}

.success {
    background-color: var(--success-color);
}

.error {
    background-color: var(--error-color);
}

/* Footer */
footer {
    margin-top: 30px;
    text-align: center;
}

.admin-link {
    display: inline-block;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-link:hover {
    color: var(--text-color);
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 80px;
    opacity: 0.8;
}

/* Login Page */
.login-container {
    justify-content: center;
}

#loginForm {
    max-width: 400px;
    margin: 0 auto;
}

/* Additional styles for login pages */
.login-links {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
}

.login-links a {
    display: inline-block;
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    font-size: 1.1rem;
    font-weight: 500;
}

.login-links a:hover {
    opacity: 1;
}

.login-links .admin-link {
    color: var(--accent-color);
}

.logout-section {
    margin-bottom: 15px;
    text-align: right;
}

.logout-link {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.logout-link:hover {
    opacity: 1;
}

.admin-welcome {
    margin-bottom: 20px;
    font-style: italic;
    opacity: 0.9;
}

/* Print Styles */
@media print {
    body {
        background-color: white;
        color: black;
        font-family: var(--font-family);
    }
    
    .admin-controls, .back-btn, .clear-button, footer, .logout-section {
        display: none !important;
    }
    
    .container {
        padding: 0;
        margin: 0;
    }
    
    header, main, table {
        color: black;
        background-color: white;
    }
    
    h1, h2, h3 {
        color: var(--primary-color);
    }
    
    table, th, td {
        border: 1px solid #ddd;
    }
    
    th {
        background-color: #f2f2f2 !important;
    }
    
    /* Print-only header */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .print-header h1 {
        font-size: 24pt;
        font-weight: 900;
        margin-bottom: 5px;
        color: var(--primary-color);
    }
    
    .print-header h3 {
        font-size: 16pt;
        margin-bottom: 20px;
        font-weight: normal;
    }
}

/* Screen-only style */
.print-header {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    h1 {
        font-size: 2.9rem;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .inline {
        flex-direction: column;
        align-items: stretch;
    }
    
    .inline label {
        margin-bottom: 8px;
    }
    
    .signature-pad {
        height: 150px;
    }
    
    .login-links {
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }
}

/* iPad Fullscreen Styles */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}