/* E-Visa Apply Plugin Styles */

/* Base styles with mobile-first approach */
* {
    box-sizing: border-box;
}

.evisa-container {
    max-width: 1000px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    overflow-x: hidden;
}

/* Form Styles */
.evisa-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
}

.evisa-form h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    /* Improve mobile experience */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Prevent zoom on iOS */
    font-size: 16px;
    /* Better touch targets */
    min-height: 44px;
    /* Prevent horizontal scrolling */
    max-width: 100%;
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Date input specific styling to match other inputs */
.form-group input[type="date"],
.form-group input.hasDatepicker {
    /* Override jQuery UI datepicker default styling */
    background: white !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    font-size: 16px !important;
    min-height: 44px !important;
    width: 100% !important;
    /* Remove any jQuery UI specific styling */
    color: #495057 !important;
    /* Ensure consistent appearance */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Remove default date input styling */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    /* Ensure no background images from jQuery UI */
    background-image: none !important;
    /* Remove any box-shadow from jQuery UI theme */
    box-shadow: none !important;
    /* Ensure proper text alignment */
    text-align: left !important;
}

.form-group input[type="date"]:focus,
.form-group input.hasDatepicker:focus {
    outline: none !important;
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1) !important;
    /* Override any jQuery UI focus styling */
    background: white !important;
}

/* Hide the default date input calendar icon to avoid confusion */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
}

.form-group input[type="date"]::-webkit-inner-spin-button,
.form-group input[type="date"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Override browser default :invalid styling */
.evisa-container .form-group input:not([type="checkbox"]):invalid,
.evisa-container .form-group select:invalid,
.evisa-container .form-group textarea:invalid {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

.form-group input:not([type="checkbox"]):invalid,
.form-group select:invalid,
.form-group textarea:invalid {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

/* Override browser default styling for required fields */
.evisa-container .form-group input[required]:not([type="checkbox"]):invalid,
.evisa-container .form-group select[required]:invalid,
.evisa-container .form-group textarea[required]:invalid {
    border-color: #e9ecef !important;
    box-shadow: none !important;
    background-image: none !important;
}

.form-group input[required]:not([type="checkbox"]):invalid,
.form-group select[required]:invalid,
.form-group textarea[required]:invalid {
    border-color: #e9ecef !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Specifically target select elements with empty values */
.evisa-container .form-group select[required]:invalid:not(.error),
.evisa-container .form-group select[value=""]:not(.error) {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

.form-group select[required]:invalid:not(.error),
.form-group select[value=""]:not(.error) {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

/* Most aggressive override for the specific ETA dropdown */
#eta_type:invalid,
#eta_type[required]:invalid {
    border-color: #e9ecef !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Force normal styling for all form fields on page load */
.evisa-form input:not([type="checkbox"]),
.evisa-form select,
.evisa-form textarea {
    border-color: #e9ecef !important;
}

/* Only show validation styling when explicitly added by JavaScript */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545 !important;
}

/* Error styling for checkboxes and radio buttons */
.form-group.error input[type="checkbox"],
.form-group.error input[type="radio"] {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Error styling for checkbox/radio labels */
.form-group.error label {
    color: #dc3545 !important;
    font-weight: 700 !important;
}

/* Pulsing animation for critical errors */
.form-group.error input[type="checkbox"]#information_confirmation {
    animation: pulse-error 2s infinite;
}

@keyframes pulse-error {
    0% { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1); }
    50% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0.2); }
    100% { box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1); }
}

/* Ensure checkbox is always accessible and clickable */
.evisa-form input[type="checkbox"],
#information_confirmation {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 999 !important;
    position: relative !important;
    width: auto !important;
    min-height: auto !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Radio Button Groups */
.radio-group-label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: block;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    margin: 0;
}

.radio-option:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.radio-option-content {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #007cba;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

.radio-option input[type="radio"]:checked ~ .radio-option-content .radio-custom {
    border-color: #007cba;
    background: white;
}

.radio-option input[type="radio"]:checked ~ .radio-option-content .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-option input[type="radio"]:checked ~ .radio-option-content .radio-content strong {
    color: #007cba;
}

.radio-option:has(input[type="radio"]:checked),
.radio-option.checked {
    border-color: #007cba;
    background: rgba(0, 124, 186, 0.05);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.radio-content {
    flex: 1;
}

.radio-content strong {
    display: block;
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 4px;
}

.radio-content small {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
}

/* Override any theme radio button styles */
.evisa-form input[type="radio"] {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    max-width: none !important;
    transform: none !important;
    position: absolute !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 1 !important;
}

/* Fallback for browsers that don't support :has() */
.radio-option.checked {
    border-color: #007cba;
    background: rgba(0, 124, 186, 0.05);
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.radio-option.checked .radio-content strong {
    color: #007cba;
}

.radio-option.checked .radio-custom {
    border-color: #007cba;
}

.radio-option.checked .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Mobile responsive radio buttons */
@media (max-width: 768px) {
    .radio-option {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .radio-custom {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }
    
    .radio-custom::after {
        width: 6px;
        height: 6px;
    }
    
    .radio-content strong {
        font-size: 15px;
    }
    
    .radio-content small {
        font-size: 12px;
    }
}

/* Ensure proper z-index and positioning */
.radio-option {
    position: relative;
    z-index: 1;
}

.radio-option input[type="radio"] {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 2 !important;
}

/* Readonly field styling */
.form-group input[readonly],
.form-group textarea[readonly] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
    cursor: default;
}

.form-group input[readonly]:focus,
.form-group textarea[readonly]:focus {
    box-shadow: none;
    border-color: #e9ecef;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545 !important;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Form sections */
.form-section {
    margin-bottom: 25px;
    padding: 20px 25px 25px 25px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    border: 1px solid #e9ecef;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
    text-transform: uppercase;
}

.form-subsection {
    margin-bottom: 20px;
}

.form-subsection h4,
.form-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 8px;
    text-transform: uppercase;
}

/* Form subtitle styling */
.form-subtitle {
    color: #666;
    font-size: 14px;
    font-style: italic;
    margin: -10px 0 20px 0;
    padding: 0;
    line-height: 1.4;
}

/* Form row layout - override for single field per line */
.form-row {
    display: block;
    margin-bottom: 10px;
}

.form-row .form-group {
    margin-bottom: 8px;
    min-width: 100%;
}

/* Multi-column layouts - disabled for government form style */
.form-row.two-column,
.form-row.three-column,
.form-row.four-column {
    display: block;
}

.form-row.two-column .form-group,
.form-row.three-column .form-group,
.form-row.four-column .form-group {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 100%;
    margin-bottom: 8px;
}

/* Specific field width controls */
.form-group.half-width {
    flex: 0 1 48%;
}

.form-group.third-width {
    flex: 0 1 31%;
}

.form-group.quarter-width {
    flex: 0 1 23%;
}

.form-group.full-width {
    flex: 1 1 100%;
}

/* Government form styling - one field per line with inline layout */
.form-group {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-group label {
    display: block;
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    line-height: 1.3;
    min-width: 200px;
    flex-shrink: 0;
    text-align: left;
}

.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    transition: border-color 0.2s ease;
    background: white;
    min-height: 32px;
    max-width: 400px;
}

/* Date fields should be smaller */
.form-group input[type="date"],
.form-group input[type="text"][name*="date"] {
    max-width: 200px;
}

/* Short text fields */
.form-group input[type="text"][name*="title"],
.form-group select[name*="title"],
.form-group select[name*="gender"] {
    max-width: 150px;
}

/* Government form styling - more compact look */
.form-group select,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"] {
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.4;
    background: #fff;
}

.form-group select:focus,
.form-group input:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 3px rgba(0, 124, 186, 0.3);
}

/* Specific field width adjustments for government form */
.form-group select[name*="title"],
.form-group select[name*="gender"] {
    max-width: 120px;
}

.form-group input[type="date"] {
    max-width: 150px;
}

.form-group input[type="text"][name*="passport"],
.form-group input[type="text"][name*="surname"],
.form-group input[type="text"][name*="given"] {
    max-width: 250px;
}

.form-group select[name*="country"],
.form-group select[name*="nationality"] {
    max-width: 200px;
}

/* Form notice */
.form-notice {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.form-notice p {
    margin: 0;
    color: #1565c0;
    font-style: italic;
    font-weight: 500;
}

/* Eligibility notice */
.eligibility-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.eligibility-notice h4 {
    color: #856404;
    margin-top: 0px;
    font-size: 16px;
}

.eligibility-notice ul {
    margin: 15px 0;
    padding-left: 20px;
    list-style-type: disc !important;
    list-style-position: outside !important;
}

.eligibility-notice li {
    color: #856404;
    margin-bottom: 8px;
    line-height: 1.5;
    font-size: 14px;
    display: list-item !important;
    list-style: disc !important;
    list-style-position: outside !important;
}

/* Force list markers to show - override theme styles */
.eligibility-notice li::marker {
    content: "• " !important;
    color: #856404 !important;
    font-weight: bold !important;
}

/* Fallback for browsers that don't support ::marker */
.eligibility-notice li::before {
    content: "• ";
    color: #856404;
    font-weight: bold;
    margin-right: 8px;
    display: inline-block;
}

/* Hide the ::before pseudo-element if ::marker is supported */
@supports (content: "• " / "") {
    .eligibility-notice li::before {
        display: none;
    }
}

.eligibility-notice p {
    color: #856404;
    margin: 15px 0 0 0;
    font-weight: 600;
    font-size: 14px;
}

/* Dynamic headers in contact sections */
#dynamic-contact-fields h4 {
    color: #2c3e50;
    margin: 25px 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #007cba;
    padding-bottom: 8px;
    background: none;
}

#dynamic-contact-fields h4:first-child {
    margin-top: 0;
}

/* Enhanced form groups for dynamic fields */
#dynamic-travel-fields .form-row,
#dynamic-contact-fields .form-row {
    background: transparent;
    padding: 0;
    margin-bottom: 15px;
}

#dynamic-travel-fields .form-group,
#dynamic-contact-fields .form-group {
    background: transparent;
    padding: 0;
    border: none;
    margin-bottom: 0;
}

/* Headers in dynamic contact fields */
#dynamic-contact-fields h4,
#dynamic-travel-fields h4 {
    background: transparent;
    padding: 0;
    border: none;
    margin: 20px 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 8px;
    text-transform: uppercase;
}

/* Textarea specific styling */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Character count for textareas */
.char-count {
    font-size: 11px;
    color: #6c757d;
    text-align: right;
    margin-top: 5px;
}

/* Enhanced validation styling */
.form-group.error {
    border-left: 4px solid #dc3545;
    padding-left: 15px;
    background: #fff5f5;
}

.form-group.valid {
    border-left: 4px solid #28a745;
    padding-left: 15px;
    background: #f8fff8;
}

/* Responsive improvements for single-page form */
@media (max-width: 768px) {
    /* Keep single field per line layout on mobile */
    .form-row {
        display: block;
    }
    
    .form-row .form-group,
    .form-row.two-column .form-group,
    .form-row.three-column .form-group,
    .form-row.four-column .form-group {
        display: block; /* Change from flex to block for mobile stacking */
        margin-bottom: 15px;
        min-width: 100%;
        flex: 1 1 100%;
    }
    
    /* Mobile: Stack label and input vertically */
    .form-group {
        display: block !important; /* Override the flex layout */
        gap: 0 !important;
    }
    
    .form-group label {
        display: block !important;
        min-width: auto !important;
        font-size: 14px;
        margin-bottom: 8px;
        text-align: left;
    }
    
    .form-group input:not([type="checkbox"]),
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
        box-sizing: border-box;
    }
    
    /* Reset width classes on mobile */
    .form-group.half-width,
    .form-group.third-width,
    .form-group.quarter-width {
        flex: 1 1 100%;
    }
    
    .form-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .form-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .form-subsection h4,
    .form-section h4 {
        font-size: 14px;
        margin-bottom: 12px;
    }
}

/* Specific styling for business form sections */
.business-section {
    border-left: 4px solid #17a2b8;
}

.business-section h4 {
    color: #17a2b8;
    border-bottom-color: #17a2b8;
}

/* Transit form specific styling */
.transit-section {
    border-left: 4px solid #ffc107;
}

.transit-section h4 {
    color: #856404;
    border-bottom-color: #ffc107;
}

/* Dynamic Fields */
#dynamic-fields .form-group,
#additional-documents .form-group {
    border-left: 4px solid #007cba;
    padding-left: 15px;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

/* File Upload */
.form-group input[type="file"] {
    padding: 10px;
    border: 2px dashed #007cba;
    background: #f8f9fa;
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    background: #e9ecef;
}

/* Passport Photo Upload Styles */
.photo-upload-container {
    width: 100%;
}

.photo-upload-container input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    z-index: -1;
}

.photo-upload-area {
    border: 2px dashed #007cba;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload-area:hover {
    border-color: #005a87;
    background: #e9ecef;
}

.photo-upload-area.drag-over {
    border-color: #28a745;
    background: #e8f5e8;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-icon {
    font-size: 48px;
    color: #007cba;
    margin-bottom: 10px;
}

.upload-placeholder p {
    margin: 0;
    color: #007cba;
    font-weight: 600;
    font-size: 16px;
}

.upload-placeholder small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
}

.photo-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.photo-preview img {
    max-width: 200px;
    max-height: 250px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.pdf-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 10px;
}

.pdf-info {
    text-align: center;
}

.pdf-info .pdf-name {
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 5px 0;
    font-size: 14px;
    word-break: break-word;
}

.pdf-info .pdf-size {
    color: #6c757d;
    margin: 0;
    font-size: 12px;
}

.photo-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-remove-photo,
.btn-change-photo {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-remove-photo {
    background: #dc3545;
    color: white;
}

.btn-remove-photo:hover {
    background: #c82333;
}

.btn-change-photo {
    background: #6c757d;
    color: white;
}

.btn-change-photo:hover {
    background: #5a6268;
}

/* Photo upload error states */
.photo-upload-area.error {
    border-color: #dc3545;
    background: #f8d7da;
}

.photo-upload-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

/* Mobile responsive photo upload */
@media (max-width: 768px) {
    .photo-upload-area {
        min-height: 120px;
        padding: 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .upload-placeholder p {
        font-size: 14px;
    }
    
    .upload-placeholder small {
        font-size: 11px;
    }
    
    .photo-preview img {
        max-width: 150px;
        max-height: 180px;
    }
    
    .pdf-preview {
        max-width: 150px;
        padding: 15px;
    }
    
    .pdf-icon {
        font-size: 36px;
    }
    
    .pdf-info .pdf-name {
        font-size: 12px;
    }
    
    .pdf-info .pdf-size {
        font-size: 11px;
    }
    
    .photo-actions {
        flex-direction: column;
        width: 100%;
        max-width: 200px;
    }
    
    .btn-remove-photo,
    .btn-change-photo {
        width: 100%;
        padding: 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .photo-upload-area {
        min-height: 100px;
        padding: 10px;
    }
    
    .upload-icon {
        font-size: 28px;
    }
    
    .upload-placeholder p {
        font-size: 13px;
    }
    
    .photo-preview img {
        max-width: 120px;
        max-height: 150px;
    }
    
    .pdf-preview {
        max-width: 120px;
        padding: 10px;
    }
    
    .pdf-icon {
        font-size: 28px;
    }
    
    .pdf-info .pdf-name {
        font-size: 11px;
    }
    
    .pdf-info .pdf-size {
        font-size: 10px;
    }
}

/* Upload Section */
.upload-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.upload-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Checkbox */
.form-group input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    margin-right: 10px;
    transform: scale(1.2);
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative;
    z-index: 10 !important;
    display: inline-block !important;
    vertical-align: top;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    border: 2px solid #007cba !important;
    border-radius: 3px !important;
    background: white !important;
    padding: 0 !important;
    outline: none !important;
}

/* Remove black border when checkbox is checked or focused */
.form-group input[type="checkbox"]:checked,
.form-group input[type="checkbox"]:focus,
.form-group input[type="checkbox"]:checked:focus {
    border: 2px solid #007cba !important;
    outline: none !important;
    box-shadow: none !important;
}

.form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    cursor: pointer !important;
    font-size: 14px;
    line-height: 1.5;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Fix for checkbox interaction */
.form-group label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure the label text is clickable too */
.form-group label:has(input[type="checkbox"]) span,
.form-group label:has(input[type="checkbox"]) text {
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Buttons */
.form-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit {
    background: #007cba;
    color: white;
    min-width: 200px;
}

.btn-submit:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.btn:disabled {
    background: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6;
}

.btn:disabled:hover {
    background: #e9ecef !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Disabled submit button specific styling */
.btn-submit:disabled,
.btn-submit.disabled {
    background: #dc3545 !important;
    color: white !important;
    opacity: 0.7;
    cursor: not-allowed !important;
    animation: pulse-disabled 2s infinite;
}

@keyframes pulse-disabled {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.success-message h3 {
    color: #28a745;
    margin-bottom: 15px;
    font-size: 24px;
}

.success-message p {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .evisa-container {
        margin: 5px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .evisa-form {
        padding: 15px;
    }
    
    .evisa-form h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .form-group input[type="date"] {
        min-height: 48px; /* Better touch target */
    }
    
    .form-group select {
        background-size: 14px;
        padding-right: 36px;
    }
    
    .form-section {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .form-section h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .form-actions {
        justify-content: center;
        margin-top: 25px;
        padding-top: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        padding: 14px 20px;
        font-size: 15px;
        min-height: 48px; /* Better touch target */
        border-radius: 6px;
    }
    
    .eligibility-notice {
        padding: 12px;
        margin: 15px 0;
    }
    
    .eligibility-notice h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .eligibility-notice li {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 6px;
    }
    
    .eligibility-notice ul {
        padding-left: 16px;
    }
    
    #dynamic-contact-fields h4 {
        font-size: 14px;
        margin: 15px 0 10px 0;
    }
    
    #dynamic-travel-fields .form-group,
    #dynamic-contact-fields .form-group {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .form-notice {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .form-notice p {
        font-size: 14px;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .evisa-container {
        margin: 0;
        padding: 8px;
        border-radius: 0;
    }
    
    .evisa-form {
        padding: 12px;
        border-radius: 8px;
    }
    
    .evisa-form h3 {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    
    /* Ensure mobile stacking is maintained on small screens */
    .form-group {
        display: block !important;
        gap: 0 !important;
        margin-bottom: 15px;
    }
    
    .form-group label {
        display: block !important;
        min-width: auto !important;
        font-size: 14px;
        margin-bottom: 8px;
        text-align: left;
    }
    
    .form-group input:not([type="checkbox"]),
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        padding: 12px 10px;
        font-size: 16px; /* Prevents zoom */
        border-radius: 4px;
        box-sizing: border-box;
    }
    
    /* Compact radio buttons on small screens */
    .radio-option {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .radio-custom {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
    
    .radio-custom::after {
        width: 5px;
        height: 5px;
    }
    
    .radio-content strong {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .radio-content small {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .form-section {
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .form-section h4 {
        font-size: 15px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }
    
    .loading-content {
        margin: 15px;
        padding: 20px;
        border-radius: 8px;
    }
    
    .success-message {
        margin: 15px;
        padding: 20px;
        border-radius: 8px;
    }
    
    .success-message h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .success-message p {
        font-size: 14px;
    }
    
    .form-group input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        min-height: 16px !important;
        max-width: 16px !important;
        margin-right: 8px;
        transform: scale(1.1);
        -webkit-appearance: checkbox !important;
        -moz-appearance: checkbox !important;
        appearance: checkbox !important;
        border: 2px solid #007cba !important;
        border-radius: 3px !important;
        background: white !important;
        padding: 0 !important;
        display: inline-block !important;
        vertical-align: top !important;
    }
    
    .eligibility-notice {
        padding: 10px;
    }
    
    .eligibility-notice h4 {
        font-size: 13px;
    }
    
    .eligibility-notice li {
        font-size: 12px;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }
}

/* Ultra small screens */
@media (max-width: 320px) {
    .evisa-form h3 {
        font-size: 16px;
    }
    
    /* Maintain mobile stacking for ultra-small screens */
    .form-group {
        display: block !important;
        gap: 0 !important;
        margin-bottom: 15px;
    }
    
    .form-group label {
        display: block !important;
        min-width: auto !important;
        font-size: 13px;
        margin-bottom: 6px;
        text-align: left;
    }
    
    .form-group input:not([type="checkbox"]),
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        padding: 10px 8px;
        font-size: 16px;
        box-sizing: border-box;
    }
}

/* Additional styling for select dropdowns */
.form-group select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Date input specific styling for mobile */
.form-group input[type="date"] {
    /* Restore native date picker functionality */
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
    appearance: auto !important;
    position: relative;
    /* Remove custom background icon to avoid conflicts */
    background-image: none !important;
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 16px;
}

/* Ensure date picker indicator is visible and functional */
.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    cursor: pointer;
    opacity: 1 !important;
    width: auto;
    height: auto;
    margin-left: 4px;
}

/* Ensure the picker indicator is always clickable */
.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1 !important;
}

/* Validation states */
.form-group.valid input,
.form-group.valid select,
.form-group.valid textarea {
    border-color: #28a745;
}

.form-group.valid::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-weight: bold;
}

/* Tooltip styles for help text */
.form-group .help-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.form-group .help-tooltip::after {
    content: '?';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007cba;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.form-group .help-tooltip:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* jQuery UI Datepicker Custom Styles */
.datepicker-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.datepicker-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #666;
    pointer-events: auto;
    z-index: 2;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.datepicker-icon:hover {
    background-color: rgba(0, 124, 186, 0.1);
    color: #007cba;
}

/* Override jQuery UI datepicker styles to match our theme */
.ui-datepicker {
    border-radius: 8px !important;
    border: 2px solid #007cba !important;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif !important;
}

.ui-datepicker-header {
    background: #007cba !important;
    border: none !important;
    border-radius: 6px 6px 0 0 !important;
    color: white !important;
}

.ui-datepicker-title {
    color: white !important;
    font-weight: 600 !important;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 4px !important;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.ui-datepicker td a {
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.ui-datepicker td a:hover {
    background: #e6f3ff !important;
    color: #007cba !important;
}

.ui-datepicker .ui-state-active {
    background: #007cba !important;
    border: 1px solid #007cba !important;
    color: white !important;
}

.ui-datepicker .ui-state-highlight {
    background: #fff3cd !important;
    border: 1px solid #ffeaa7 !important;
    color: #856404 !important;
}

/* Make sure the datepicker appears above other elements */
.ui-datepicker {
    z-index: 9999 !important;
}
