﻿/* AttendanceForm.css - Light Glassmorphism Theme */
/* Matches site.css light theme with blues, whites, and subtle effects */

/* ===== BASE CONTAINER ===== */
.attendance-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== HEADER SECTION ===== */
.clinic-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0 1.5rem 0;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clinic-icon {
    font-size: 54px;
    margin-bottom: 1.2rem;
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 90px;
    height: 90px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.clinic-header h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 36px;
    margin: 1rem 0 0.5rem 0;
    font-weight: 700;
}

.current-date {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

/* ===== PATIENT CARD ===== */
.patient-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.5s ease 0.1s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.patient-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1.5rem;
}

.patient-avatar {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 22px;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.patient-details {
    flex: 1;
}

    .patient-details h2 {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-size: 22px;
        margin: 0 0 0.3rem 0;
        font-weight: 700;
    }

    .patient-details p {
        color: #6b7280;
        margin: 0;
        font-size: 14px;
        font-weight: 500;
    }

.check-in-status {
    margin-left: auto;
}

.status-badge {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .status-badge.checked-in {
        background: rgba(16, 185, 129, 0.15);
        color: #059669;
        border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .status-badge.not-checked {
        background: rgba(245, 158, 11, 0.15);
        color: #d97706;
        border: 1px solid rgba(245, 158, 11, 0.3);
    }

/* ===== DIVIDER ===== */
.divider {
    border: none;
    border-top: 1px solid rgba(102, 126, 234, 0.15);
    margin: 1.5rem 0;
}

/* ===== SERVICE DETAILS ===== */
.service-details {
    display: flex;
    gap: 3rem;
    margin-bottom: 1.2rem;
}

.detail-column {
    flex: 1;
}

.detail-label {
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: block;
    margin-bottom: 0.6rem;
}

.detail-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 17px;
    margin: 0;
    font-weight: 700;
}

/* ===== SERVICE CONFIRMATION CARD ===== */
.service-confirmation-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.5s ease 0.2s both;
}

.confirmation-title {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 1.5rem 0;
}

/* ===== SERVICE OPTIONS ===== */
.service-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.service-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1.5px solid rgba(102, 126, 234, 0.15);
    border-radius: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .service-option:hover {
        background: rgba(255, 255, 255, 0.8);
        border-color: rgba(102, 126, 234, 0.35);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    }

    .service-option:has(.service-checkbox:checked) {
        background: rgba(102, 126, 234, 0.08);
        border-color: rgba(102, 126, 234, 0.4);
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    }

.service-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .service-checkbox:hover {
        border-color: rgba(102, 126, 234, 0.5);
        background: rgba(102, 126, 234, 0.05);
    }

    .service-checkbox:checked {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-color: #667eea;
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 11.94l6.72-6.72a.75.75 0 011.06 0z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 14px;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    }

    .service-checkbox:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    }

.service-label {
    flex: 1;
    color: #1a202c;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.booked-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-btn {
    flex: 1;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    animation: slideUp 0.5s ease 0.3s both;
}

    .confirm-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 10px 28px rgba(102, 126, 234, 0.4);
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

    .confirm-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .confirm-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* ===== MESSAGES ===== */
.success-message {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #059669;
    padding: 16px;
    border-radius: 14px;
    text-align: center;
    font-weight: 600;
    animation: slideUp 0.3s ease;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .success-message p {
        margin: 0;
        font-size: 15px;
    }

.error-message {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
    padding: 16px;
    border-radius: 14px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.error-alert {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

    .error-alert p {
        margin: 0;
        font-size: 14px;
    }

.loading-spinner {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .attendance-container {
        padding: 1.5rem 1rem;
    }

    .clinic-icon {
        width: 80px;
        height: 80px;
        font-size: 48px;
    }

    .clinic-header h1 {
        font-size: 28px;
    }

    .patient-card,
    .service-confirmation-card {
        padding: 1.5rem;
    }

    .service-details {
        gap: 1.5rem;
    }

    .patient-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .check-in-status {
        margin-left: 0;
        width: 100%;
    }

    .status-badge {
        width: 100%;
        text-align: center;
        display: block;
    }

    .detail-label {
        font-size: 10px;
    }

    .detail-value {
        font-size: 15px;
    }

    .confirm-btn {
        padding: 12px 18px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .attendance-container {
        padding: 1rem;
    }

    .clinic-header {
        margin-bottom: 2rem;
    }

    .patient-card,
    .service-confirmation-card {
        padding: 1.2rem;
        border-radius: 14px;
    }

    .patient-avatar {
        width: 60px;
        height: 60px;
        font-size: 18px;
    }

    .patient-details h2 {
        font-size: 18px;
    }

    .service-option {
        padding: 0.85rem 1rem;
    }

    .service-label {
        font-size: 14px;
    }

    .booked-badge {
        font-size: 11px;
        padding: 4px 10px;
    }
}
