/* Appointment Page Specific Styles */

.appointment-section {
    padding: 10rem 2rem 5rem;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    min-height: 100vh;
}

.appointment-header {
    text-align: center;
    margin-bottom: 3rem;
}

.appointment-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.appointment-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

.appointment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Calendar Section */
.calendar-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.calendar-nav-btn {
    background: var(--light-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.calendar-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-light);
    padding: 0.75rem;
    font-size: 0.875rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    background: var(--light-bg);
    color: var(--text-dark);
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.calendar-day.disabled {
    background: transparent;
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.4;
}

.calendar-day.other-month {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-day.today {
    border: 2px solid var(--secondary-color);
}

/* Time Slots */
.time-slots-container {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.time-slots-container h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.selected-date-display {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.time-slot {
    padding: 0.875rem 1rem;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-dark);
}

.time-slot:hover:not(.unavailable) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 700;
}

.time-slot.unavailable {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Form Section */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    align-self: start;
    position: sticky;
    top: 140px;
}

.form-wrapper h3 {
    color: var(--primary-color);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.appointment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.selected-appointment-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.selected-appointment-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.selected-appointment-info p {
    color: var(--text-dark);
    margin: 0;
    font-weight: 500;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-notice {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

/* Success Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.modal-body {
    padding: 1rem 2rem 2rem;
    text-align: center;
}

.modal-body p {
    color: var(--text-light);
    line-height: 1.6;
}

.confirmation-details {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    text-align: left;
}

.confirmation-details p {
    margin: 0.5rem 0;
    color: var(--text-dark);
    font-weight: 500;
}

.confirmation-note {
    font-size: 0.9rem;
    font-style: italic;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 0 2rem 2rem;
}

.modal-footer .btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .appointment-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        position: static;
    }
}

@media (max-width: 768px) {
    .appointment-section {
        padding: 8rem 1rem 3rem;
    }

    .appointment-header h1 {
        font-size: 2rem;
    }

    .appointment-header p {
        font-size: 1rem;
    }

    .calendar-section,
    .form-section {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .calendar {
        gap: 0.25rem;
    }

    .calendar-day {
        font-size: 0.875rem;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .modal-content {
        width: 95%;
    }

    .modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .calendar-day-header {
        font-size: 0.75rem;
        padding: 0.5rem 0.25rem;
    }

    .calendar-day {
        font-size: 0.8rem;
    }

    .time-slots {
        grid-template-columns: 1fr 1fr;
    }
}
