/* Appointment Page Styles */

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.appointment-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
    margin-top: 120px;
}

.appointment-container {
    max-width: 1400px;
    margin: 0 auto;
}

.appointment-hero {
    text-align: center;
    color: white;
    margin-bottom: 50px;
    animation: fadeInDown 0.8s ease-out;
}

.appointment-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.appointment-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.appointment-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    margin-top: 40px;
}

/* Form Container */
.appointment-form-container {
    background: white;
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.appointment-form {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h2 {
    font-size: 1.4rem;
    color: #667eea;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.form-section h2 i {
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.error-message {
    display: none;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 6px;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

/* Time Slots */
.time-slots-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin-top: 15px;
}

.time-session {
    margin-bottom: 30px;
}

.time-session:last-child {
    margin-bottom: 0;
}

.session-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.time-slot {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
    font-size: 0.85rem;
}

.time-slot:hover:not(.disabled) {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.time-slot.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.time-slot.disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

/* Checkbox Styling */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

.form-group label input[type="checkbox"] {
    margin-right: 10px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.form-note {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 50px;
    animation: fadeIn 0.6s ease-out;
}

.success-message.hidden {
    display: none;
}

.success-icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 20px;
    animation: scaleIn 0.6s ease-out;
}

.success-message h3 {
    font-size: 1.8rem;
    color: #27ae60;
    margin-bottom: 15px;
}

.success-message p {
    color: #555;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.confirmation-id {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 0.9rem;
}

/* Sidebar */
.appointment-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.info-card h3 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.info-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-section h4 {
    color: #333;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 600;
}

.info-section ul {
    list-style: none;
    padding: 0;
}

.info-section li {
    color: #666;
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
}

.info-section li:before {
    content: "✓";
    color: #667eea;
    font-weight: bold;
    margin-right: 10px;
    margin-top: 2px;
}

.info-section p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Doctors Preview */
.doctors-preview {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.doctors-preview h3 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.doctor-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.doctor-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.doctor-item:hover {
    background: #f0f4ff;
    transform: translateX(5px);
}

.doctor-item i {
    font-size: 1.5rem;
    color: #667eea;
    margin-top: 5px;
    flex-shrink: 0;
}

.doctor-item p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .appointment-content {
        grid-template-columns: 1fr;
    }

    .appointment-form-container {
        padding: 40px 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

@media (max-width: 768px) {
    .appointment-section {
        padding: 30px 15px;
        margin-top: 100px;
    }

    .appointment-hero h1 {
        font-size: 2rem;
    }

    .appointment-hero p {
        font-size: 1rem;
    }

    .appointment-form-container {
        padding: 30px 20px;
    }

    .form-section {
        margin-bottom: 30px;
        padding-bottom: 30px;
    }

    .form-section h2 {
        font-size: 1.2rem;
    }

    .info-card,
    .doctors-preview {
        padding: 25px;
    }

    .time-slot {
        padding: 10px;
        font-size: 0.8rem;
    }

    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .appointment-section {
        padding: 20px 10px;
        margin-top: 80px;
    }

    .appointment-hero h1 {
        font-size: 1.5rem;
    }

    .appointment-hero p {
        font-size: 0.9rem;
    }

    .appointment-form-container {
        padding: 20px 15px;
    }

    .form-section {
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .info-card,
    .doctors-preview {
        padding: 20px;
    }

    .time-slot {
        padding: 8px;
        font-size: 0.75rem;
    }

    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 6px;
    }
}

/* Print Styles */
@media print {
    .appointment-section {
        background: white;
    }

    .submit-btn {
        display: none;
    }

    .time-slot.selected {
        background: #e0e0e0;
        color: #333;
    }
}
