/**
 * Appointments Page Styles
 * Styling for appointment booking calendar system
 */

/* Page Layout */
.appointments-page {
    padding: 120px 0 40px 0;
    background: #f8fafc;
    margin-top: 0;
}

/* Hero Section */
.appointments-hero {
    background: #f8fafc;
    color: #1e293b;
    padding: 40px 0 60px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

/* Scope container to only appointments page content, not header/footer */
.appointments-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.appointments-hero .hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.appointments-hero .hero-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: #1e293b;
}

.appointments-hero .hero-title i {
    font-size: 2rem;
    color: #3b82f6;
}

.appointments-hero .hero-description {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Booking Section */
.booking-section {
    padding: 60px 0;
}

.booking-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Step Headers */
.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 2rem 2rem 0;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.step-description {
    color: #7f8c8d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

/* Verification Form */
.verification-form {
    padding: 0 2rem 2rem;
}

.verification-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.verification-form .form-group {
    display: flex;
    flex-direction: column;
}

.verification-form label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
    font-style: italic;
}

.verification-form input {
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.verification-form input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.verification-form .error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

/* Order Details */
.order-details {
    padding: 0 2rem 2rem;
}

.order-info-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e1e8ed;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e1e8ed;
}

.order-header h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

.order-status {
    background: #27ae60;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.order-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.customer-info h4,
.delivery-info h4 {
    color: #667eea;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customer-info p,
.delivery-info p {
    margin: 0.5rem 0;
    color: #555;
}

/* Existing Appointment Alert */
.existing-appointment {
    margin-top: 1rem;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert i {
    font-size: 1.5rem;
    color: #f39c12;
    flex-shrink: 0;
}

/* Status Styles */
.status-pending {
    color: #f39c12;
    font-weight: bold;
}

.status-confirmed {
    color: #27ae60;
    font-weight: bold;
}

.status-completed {
    color: #3498db;
    font-weight: bold;
}

.status-cancelled {
    color: #e74c3c;
    font-weight: bold;
}

/* Cancelled Message */
.cancelled-message {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.cancelled-message p {
    margin: 0 0 1rem 0;
    color: #666;
}

.cancelled-message .btn {
    margin-top: 0.5rem;
}

/* Info Section Styles */
.info-section {
    margin: 2rem 0;
}

.info-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 12px;
    border-left: 4px solid #2196f3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.info-icon {
    margin-right: 1rem;
    color: #2196f3;
    font-size: 1.5rem;
}

.info-content h4 {
    margin: 0 0 0.5rem 0;
    color: #1976d2;
    font-size: 1.1rem;
}

.info-content p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.alert h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.alert p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

/* Booking Form */
.booking-form {
    padding: 0 2rem 2rem;
}

.calendar-section {
    margin-bottom: 3rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-month {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    min-width: 150px;
    text-align: center;
}

/* Modern Airline-Style Calendar */
.calendar-container {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.calendar-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-month {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 180px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-outline {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-1px);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.calendar-day {
    background: white;
    padding: 1.25rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
}

.calendar-day:last-child {
    border-right: none;
}

.calendar-day:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 10;
}

.calendar-day.available {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-color: #a7f3d0;
}

.calendar-day.available:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
    transform: translateY(-2px) scale(1.05);
    z-index: 20;
}

.calendar-day.selected::after {
    content: '✓';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
}

.calendar-day.blocked {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    position: relative;
}

.calendar-day.blocked::before {
    content: '✕';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.75rem;
    color: #ef4444;
}

.calendar-day.blocked:hover {
    background: #f8fafc;
    transform: none;
    box-shadow: none;
}

.calendar-day.booked {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    cursor: not-allowed;
    position: relative;
}

.calendar-day.booked::before {
    content: '●';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    font-size: 0.75rem;
    color: #dc2626;
}

.calendar-day.booked:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    transform: none;
    box-shadow: none;
}

.calendar-day.other-month {
    background: #f8fafc;
    color: #cbd5e1;
    opacity: 0.6;
}

.calendar-day.other-month:hover {
    background: #f8fafc;
    transform: none;
    box-shadow: none;
}

.calendar-day-header {
    background: #f1f5f9;
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 700;
    color: #475569;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
}

.calendar-day-header:last-child {
    border-right: none;
}

/* Individual weekday styling */
.calendar-day-header:nth-child(1) { /* Monday */
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.calendar-day-header:nth-child(2) { /* Tuesday */
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    color: #be185d;
}

.calendar-day-header:nth-child(3) { /* Wednesday */
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
}

.calendar-day-header:nth-child(4) { /* Thursday */
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.calendar-day-header:nth-child(5) { /* Friday */
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
}

.calendar-day-header:nth-child(6) { /* Saturday */
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #6b21a8;
}

.calendar-day-header:nth-child(7) { /* Sunday */
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0c4a6e;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid transparent;
}

.legend-color.available {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #a7f3d0;
}

.legend-color.booked {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
}

.legend-color.blocked {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.legend-color.past {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
}

/* Time Slot Section */
.time-slot-section {
    margin-bottom: 3rem;
}

.time-slot-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.time-slot-option {
    cursor: pointer;
    display: block;
}

.time-slot-option input[type="radio"] {
    display: none;
}

.time-slot-card {
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.time-slot-option input[type="radio"]:checked + .time-slot-card {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.02);
}

.time-slot-option:hover .time-slot-card {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.time-slot-icon {
    font-size: 2rem;
    color: #667eea;
}

.time-slot-option input[type="radio"]:checked + .time-slot-card .time-slot-icon {
    color: white;
}

.time-slot-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.time-slot-content p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Notes Section */
.notes-section {
    margin-bottom: 3rem;
}

.notes-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-section textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.notes-section textarea:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    border-top: 1px solid #e1e8ed;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 1.5rem;
}

.success-message h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.success-message > p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.appointment-summary {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.appointment-summary h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-details {
    display: grid;
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e1e8ed;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: #555;
}

.summary-value {
    color: #2c3e50;
    font-weight: 500;
}

.success-actions {
    margin-top: 2rem;
}

.success-actions p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

/* Info Section */
.appointments-info {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.appointments-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.info-card:nth-child(1) .info-icon {
    color: #3b82f6;
}

.info-card:nth-child(2) .info-icon {
    color: #10b981;
}

.info-card:nth-child(3) .info-icon {
    color: #f59e0b;
}

.info-card:nth-child(4) .info-icon {
    color: #ef4444;
}

.info-card h3 {
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.info-card p {
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .appointments-hero .hero-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .appointments-hero {
        padding: 100px 0 20px 0;
    }
    
    .verification-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .order-content {
        grid-template-columns: 1fr;
    }
    
    .calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .time-slots {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .calendar-legend {
        gap: 1rem;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    /* Info Section Tablet */
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Info Section Mobile */
    .appointments-info {
        padding: 60px 0;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .info-card {
        padding: 1.5rem 1rem;
        min-height: 180px;
    }
    
    .info-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .info-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .booking-container {
        margin: 0 1rem;
        border-radius: 15px;
    }
    
    .step-header,
    .step-description,
    .verification-form,
    .order-details,
    .booking-form {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .calendar-container {
        padding: 1rem;
    }
    
    .calendar-grid {
        gap: 0.25rem;
    }
    
    .calendar-day {
        font-size: 0.9rem;
    }
    
    .appointments-hero {
        padding: 80px 0 30px;
    }
    
    .appointments-hero .hero-title {
        font-size: 1.8rem;
    }
    
    .appointments-hero .hero-description {
        font-size: 1rem;
    }
}

/* Loading States */
.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Animation for step transitions */
.verification-step,
.order-details,
.booking-step,
.success-message {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
.calendar-day:focus,
.time-slot-option:focus-within .time-slot-card {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .appointments-hero,
    .appointments-info,
    .form-actions {
        display: none;
    }
    
    .booking-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
