/* ===========================
   CHECK APPOINTMENT PAGE
   =========================== */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 20s infinite;
}

.header-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

/* Search Card */
.search-card {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.search-input-group {
    position: relative;
    margin-bottom: 2rem;
}

.input-icon {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 1.25rem;
    z-index: 1;
}

.search-input {
    padding: 1.5rem 200px 1.5rem 4rem;
    border: 3px solid #E5E7EB;
    border-radius: 50px;
    font-size: 1.1rem;
    width: 100%;
    transition: all 0.3s;
    font-weight: 500;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(5, 150, 105, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1.15rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}

/* Search Help */
.search-help {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.help-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #6B7280;
    font-size: 0.95rem;
}

.help-item i {
    font-size: 1.25rem;
    color: var(--primary);
}

/* Status Header */
.status-header {
    padding: 2.5rem;
    text-align: center;
    border-radius: 25px 25px 0 0;
}

.status-header.pending {
    background: linear-gradient(135deg, #FEF3C7, #FDE68A);
}

.status-header.confirmed {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
}

.status-header.completed {
    background: linear-gradient(135deg, #DBEAFE, #BFDBFE);
}

.status-header.cancelled {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.status-icon i.fa-clock { color: #F59E0B; }
.status-icon i.fa-check-circle { color: #10B981; }
.status-icon i.fa-check-double { color: #3B82F6; }
.status-icon i.fa-times-circle { color: #EF4444; }

.status-text {
    text-align: left;
}

.status-text h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.status-text p {
    color: #6B7280;
    font-size: 0.95rem;
}

/* Quick Info Bar */
.quick-info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
}

.quick-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-info-item i {
    font-size: 1.75rem;
    color: var(--primary);
}

.quick-info-item small {
    display: block;
    color: #6B7280;
    font-size: 0.8rem;
}

.quick-info-item strong {
    display: block;
    color: var(--dark);
    font-size: 1.1rem;
}

/* Appointment Card */
.appointment-card {
    background: white;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

/* Serial Number Display */
.serial-number-display {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    border-radius: 20px;
    margin: 2rem;
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.3);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.serial-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.serial-info {
    flex: 1;
    text-align: center;
}

.serial-label {
    display: block;
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.serial-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.serial-time {
    display: block;
    font-size: 1.1rem;
    opacity: 0.95;
}

.serial-note {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    border-left: 4px solid white;
}

/* Detail Sections */
.appointment-details {
    padding: 2rem;
}

.detail-section {
    background: #F9FAFB;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #E5E7EB;
    gap: 1rem;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    color: #6B7280;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-label i {
    color: var(--primary);
    width: 18px;
    text-align: center;
}

.detail-value {
    color: var(--dark);
    font-weight: 600;
    text-align: right;
}

.detail-value code {
    background: #F3F4F6;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--primary);
}

/* Badges */
.badge-type {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
}

.badge-type.in-person {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-type.video {
    background: #E0E7FF;
    color: #4338CA;
}

.badge-free {
    background: #D1FAE5;
    color: #047857;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
}

.badge-success { background: #D1FAE5; color: #047857; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-secondary { background: #F3F4F6; color: #4B5563; }

/* Doctor & Clinic Cards */
.doctor-detail-card,
.clinic-detail-card {
    background: linear-gradient(135deg, #F0FDFA, #E0F2FE);
    border: 2px solid var(--primary);
}

.doctor-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.doctor-avatar-small {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.doctor-info h6 {
    margin-bottom: 0.25rem;
    color: var(--dark);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 12px;
    width: 3px;
    height: calc(100% - 12px);
    background: #E5E7EB;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item.active .timeline-dot {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
}

.timeline-item.cancelled .timeline-dot {
    background: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.timeline-item.pending .timeline-dot {
    background: #F59E0B;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-dot {
    position: absolute;
    left: -36px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #D1D5DB;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #E5E7EB;
}

.timeline-content strong {
    display: block;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem;
    background: #F9FAFB;
    border-radius: 0 0 25px 25px;
}

.btn-action {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.btn-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Info Cards */
.info-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.info-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.15);
}

.info-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.info-card h6 {
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.info-card p {
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* No Appointment */
.no-appointment {
    text-align: center;
    padding: 5rem 2rem;
}

.no-appointment-icon {
    width: 150px;
    height: 150px;
    background: #F3F4F6;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.no-appointment-icon i {
    font-size: 5rem;
    color: #9CA3AF;
}

.appointment-code {
    display: inline-block;
    background: #F3F4F6;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.25rem;
    color: var(--primary);
    border: 2px dashed #D1D5DB;
}

.checklist {
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.checklist ul {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.action-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Help Section */
.help-section {
    max-width: 800px;
    margin: 3rem auto 0;
}

.help-card {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    text-align: center;
}

.help-header {
    margin-bottom: 1rem;
}

.help-header i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.help-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.help-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: #F9FAFB;
    border-radius: 15px;
    color: var(--dark);
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    border: 2px solid transparent;
}

.help-action:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
}

.help-action i {
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .search-input {
        padding: 1.25rem 1.5rem;
        padding-right: 150px;
    }
    
    .search-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .serial-number-display {
        flex-direction: column;
        text-align: center;
    }
    
    .serial-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .search-card {
        padding: 2rem 1.5rem;
    }
    
    .search-input {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .search-btn {
        position: static;
        width: 100%;
    }
    
    .status-badge {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .status-text {
        text-align: center;
    }
    
    .quick-info-bar {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-value {
        text-align: left;
        margin-top: 0.5rem;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .page-header,
    .search-card,
    .action-buttons,
    .info-card,
    .help-section,
    nav,
    footer {
        display: none !important;
    }
    
    .appointment-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}