/* appointment.css - Enhanced for Ayurvedic Medical Form */

/* Reset and Base Styles - These should be global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Scoped styles for appointment page */
#appointment-page {
    font-family: 'Poppins', sans-serif;
    color: #005979;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 0;
    overflow-x: hidden;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.34)), url(./img/ab-bg.png);
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    scroll-behavior: smooth;
}

/* For mobile devices */
@media (max-width: 768px) {
    #appointment-page {
        background-attachment: scroll;
        padding: 10px;
    }
}

#appointment-page .container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Header Styles */
#appointment-page header {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(141, 110, 99, 0.15);
    margin-bottom: 10px;
    border: 1px solid #e8e2d9;
}

#appointment-page .logo img {
    height: auto;
    max-width: 100%;
}

#appointment-page .tagline {
    font-size: 1.2rem;
    color: #8d6e63;
    margin-bottom: 15px;
    font-weight: 300;
    font-style: italic;
}

#appointment-page .discount-badge {
    display: inline-block;
    background: linear-gradient(45deg, #146e20, #42c453);
    color: #ffffff;
    padding: 12px 35px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(118, 118, 118, 0.3);
    margin-bottom: 20px;
    border: 4px solid #ffffff;
    letter-spacing: 1px;
    position: relative;
}

#appointment-page .discount-badge a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

#appointment-page .discount-badge a:hover {
    color: #f0f0f0;
}

#appointment-page .dis-whatsapp {
   position: absolute;
    width: 60px;
    height: auto;
    z-index: 10;
    bottom: 52px;
    right: -29px;
}

@media (max-width: 768px) {
    #appointment-page .dis-whatsapp {
        position: relative;
        display: block;
        margin: 10px auto;
        right: auto;
        bottom: auto;
    }
}

/* Main Content Layout */
#appointment-page .main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

/* Info Section */
#appointment-page .info-section {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(141, 110, 99, 0.15);
    border: 1px solid #e8e2d9;
}

#appointment-page .info-section h2 {
    color: #005979;
    margin-bottom: 20px;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 10px;
    font-weight: 400;
}

#appointment-page .info-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #005979, #ffffff);
}

#appointment-page .benefits-list {
    list-style: none;
    margin-bottom: 25px;
}

#appointment-page .benefits-list li {
      padding: 10px 0;
    border-bottom: 1px solid #f0ebe0;
    display: flex;
    align-items: center;
    color: #464646;
    font-size: 17px;
    line-height: 34px;
}

#appointment-page .benefits-list li i {
    color: #77a6b8;
    margin-right: 10px;
    font-size: 1.2rem;
}

#appointment-page .highlight-text {
   background: #faf8f5;
    padding: 25px 10px;
    border-radius: 10px;
    border-left: 4px solid #186986;
    font-weight: 500;
    margin-top: 20px;
    color: #464646;
    font-style: italic;
    font-size: 19px;
    line-height: 33px;
    margin-bottom: 20px;
}

/* Form Section */
#appointment-page .form-section {
    flex: 1.5;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(141, 110, 99, 0.15);
    border: 1px solid #e8e2d9;
}

/* Form Section Titles */
#appointment-page .form-section-title {
    background: linear-gradient(135deg, rgba(134, 137, 138, 0.2) 0%, #ffffff 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin: 0 0 20px;
    color: #005979;
    font-weight: 600;
    border-left: 5px solid #005979;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

#appointment-page .form-section-title i {
    color: #77a6b8;
}

/* Form Elements */
#appointment-page .form-group {
    margin-bottom: 20px;
}

#appointment-page .form-group label {
       display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(70, 70, 70, 0.76);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    line-height: 1px;
}

#appointment-page .form-group label i {
    color: rgba(70, 70, 70, 0.49);
    width: 20px;
}

#appointment-page .form-group input,
#appointment-page .form-group select,
#appointment-page .form-group textarea {
       width: 100%;
    padding: 0px 15px;
    border: 2px solid rgba(24, 105, 134, 0.05);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    background: #f1f2f2;
    color: #3f3f3f;
}

#appointment-page .form-group input:focus,
#appointment-page .form-group select:focus,
#appointment-page .form-group textarea:focus {
    border-color: rgba(24, 105, 134, 0.3);
    box-shadow: 0 0 0 3px rgba(24, 105, 134, 0.1);
    outline: none;
    background: white;
}

#appointment-page .form-group.full-width {
    flex: 1 0 100%;
}

/* Form Row Layout */
#appointment-page .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#appointment-page .form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Medical History Section */
#appointment-page .medical-history-section {
    background: #faf8f5;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #e8e2d9;
}

#appointment-page .medical-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e2d9;
}

#appointment-page .medical-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#appointment-page .medical-group h4 {
    color: #5d4037;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#appointment-page .medical-group h4 i {
    color: #8d6e63;
}

/* Checkbox Groups */
#appointment-page .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#appointment-page .checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#appointment-page .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #795548;
    font-size: 0.95rem;
    flex: 1;
    min-width: 180px;
}

#appointment-page .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8d6e63;
    cursor: pointer;
}

/* Consent Checkbox */
#appointment-page .consent-checkbox {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    margin: 16px 0;
    border: 1px solid rgba(0, 89, 121, 0.21);
}

#appointment-page .consent-checkbox label {
       display: inline-block;
    align-items: baseline;
    gap: 10px;
    cursor: pointer;
    color: #727272;
    line-height: 1.5;
    font-size: 17px;
}

#appointment-page .consent-checkbox input[type="checkbox"] {
    margin-top: 4px;
    min-width: 18px;
    height: 18px;
    accent-color: #005979;
    cursor: pointer;
}

/* Image Upload Container */
#appointment-page .image-upload-container {
    border: 2px dashed #8d6e63;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    transition: all 0.3s;
    background: #faf8f5;
    cursor: pointer;
}

#appointment-page .image-upload-container:hover {
    background: #f0ebe0;
}

#appointment-page .upload-icon {
    font-size: 3rem;
    color: #8d6e63;
    margin-bottom: 15px;
}

#appointment-page .upload-text {
    font-weight: 500;
    margin-bottom: 10px;
    color: #5d4037;
}

#appointment-page .upload-btn {
    display: inline-block;
    background: #8d6e63;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 10px;
    border: none;
    font-family: 'Poppins', sans-serif;
}

#appointment-page .upload-btn:hover {
    background: #6d4c41;
    transform: translateY(-2px);
}

/* Image Preview */
#appointment-page .image-preview {
    display: none;
    margin-top: 20px;
    text-align: center;
}

#appointment-page .preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(141, 110, 99, 0.2);
}

#appointment-page .remove-image {
    display: inline-block;
    background: #b71c1c;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
    font-family: 'Poppins', sans-serif;
}

#appointment-page .remove-image:hover {
    background: #8e0000;
}

/* CAPTCHA Container */
#appointment-page .captcha-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid rgba(0, 89, 121, 0.25);
}

#appointment-page .captcha-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 5px;
    background: #d8d8d8;
    color: #272727;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    user-select: none;
    font-family: monospace;
    display: inline-block;
    min-width: 200px;
}

#appointment-page .captcha-input {
    width: 200px;
    margin: 0 auto 15px;
    padding: 10px;
    text-align: center;
    letter-spacing: 3px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
}

#appointment-page .refresh-captcha {
    color: #186986;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s ease;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
}

#appointment-page .refresh-captcha:hover {
    color: #5d4037;
}

#appointment-page .refresh-captcha i {
    margin-right: 5px;
}

/* Submit Button */
#appointment-page .submit-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(45deg, #002431, #005979);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(141, 110, 99, 0.3);
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#appointment-page .submit-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(141, 110, 99, 0.4);
}

#appointment-page .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error and Success Messages */
#appointment-page .error-message {
    color: #b71c1c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
    padding-left: 5px;
}

#appointment-page .success-message {
    display: none;
    background: linear-gradient(45deg, #2e7d32, #388e3c);
    color: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-top: 20px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

#appointment-page .success-message i {
    font-size: 1.5rem;
    margin-bottom: 10px;
    display: block;
}

/* Footer */
#appointment-page footer {
    text-align: center;
    padding: 20px;
    color: #8d6e63;
    font-size: 0.9rem;
    margin-top: 30px;
    border-top: 1px solid #e8e2d9;
    width: 100%;
}

#appointment-page footer p:first-child {
    margin-bottom: 10px;
}

#appointment-page footer i {
    cursor: pointer;
    transition: transform 0.3s ease;
}

#appointment-page footer i:hover {
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    #appointment-page .main-content {
        flex-direction: column;
    }
    
    #appointment-page .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    #appointment-page .checkbox-row {
        flex-direction: column;
        gap: 10px;
    }
    
    #appointment-page .checkbox-label {
        min-width: 100%;
    }
    
    #appointment-page .discount-badge {
        padding: 10px 25px;
        font-size: 1.1rem;
    }
    
    #appointment-page .form-section-title {
        font-size: 1rem;
        padding: 12px 15px;
    }
    
    #appointment-page .medical-group h4 {
        font-size: 1rem;
    }
    
    #appointment-page .captcha-input {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    #appointment-page {
        padding: 10px;
    }
    
    #appointment-page .container {
        gap: 20px;
    }
    
    #appointment-page header,
    #appointment-page .info-section,
    #appointment-page .form-section {
        padding: 20px 15px;
    }
    
    #appointment-page .info-section h2 {
        font-size: 1.5rem;
    }
    
    #appointment-page .submit-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    #appointment-page .captcha-text {
        font-size: 1.2rem;
        letter-spacing: 3px;
        min-width: 150px;
    }
}

/* Print Styles */
@media print {
    #appointment-page {
        background: white;
        color: black;
    }
    
    #appointment-page .container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    #appointment-page .submit-btn,
    #appointment-page .upload-btn,
    #appointment-page .remove-image,
    #appointment-page .refresh-captcha,
    #appointment-page .dis-whatsapp {
        display: none !important;
    }
    
    #appointment-page .form-section-title {
        background: #f0f0f0 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
    }
    
    #appointment-page .medical-history-section {
        border: 1px solid #ccc !important;
    }
    
    #appointment-page .discount-badge {
        background: #f0f0f0 !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
    }
}

/* Animation for form sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#appointment-page .form-section-title,
#appointment-page .medical-group,
#appointment-page .form-row {
    animation: fadeInUp 0.5s ease-out;
}

/* Custom scrollbar for textareas */
#appointment-page textarea::-webkit-scrollbar {
    width: 8px;
}

#appointment-page textarea::-webkit-scrollbar-track {
    background: #f0ebe0;
    border-radius: 4px;
}

#appointment-page textarea::-webkit-scrollbar-thumb {
    background: #8d6e63;
    border-radius: 4px;
}

#appointment-page textarea::-webkit-scrollbar-thumb:hover {
    background: #6d4c41;
}

/* Placeholder styling */
#appointment-page ::placeholder {
    color: #555555;
    opacity: 0.7;
    font-weight: 100;
}

#appointment-page :-ms-input-placeholder {
    color: #a1887f;
}

#appointment-page ::-ms-input-placeholder {
    color: #a1887f;
}

/* Focus state for accessibility */
#appointment-page input:focus-visible,
#appointment-page select:focus-visible,
#appointment-page textarea:focus-visible {
    outline: 2px solid #8d6e63;
    outline-offset: 2px;
}

/* Required field indicator */
#appointment-page .required::after {
    content: " *";
    color: #b71c1c;
}

/* Validation states */
#appointment-page .form-group.error input,
#appointment-page .form-group.error select,
#appointment-page .form-group.error textarea {
    border-color: #b71c1c;
    background-color: rgba(183, 28, 28, 0.05);
}

#appointment-page .form-group.success input,
#appointment-page .form-group.success select,
#appointment-page .form-group.success textarea {
    border-color: #2e7d32;
    background-color: rgba(46, 125, 50, 0.05);
}

/* Loading state */
#appointment-page .loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

#appointment-page .loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #005979;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}