/**
 * Amico Contact Form Widget Styles
 * Pixel-perfect implementation based on Figma specifications
 */

.amico-contact-form-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 1;
    padding: 20px 0;
    box-sizing: border-box;
    overflow: visible; /* disable all scrolling */
}

/* ---------------- Flatpickr (date picker) sizing ---------------- */
/* Make the popup calendar larger and readable */
.flatpickr-calendar {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important; /* base size */
    color: #18191A !important;
    background: #FFFFFF !important;
    border: 1px solid #BACECD !important;
    border-radius: 0 !important; /* match ecosystem (no rounded corners) */
    box-shadow: 0 8px 20px rgba(0, 118, 145, 0.08) !important; /* subtle brand-tinted shadow */
    z-index: 100000 !important; /* above form dropdowns */
}

.flatpickr-calendar .flatpickr-months .flatpickr-month,
.flatpickr-calendar .flatpickr-weekdays,
.flatpickr-calendar .flatpickr-days {
    font-size: 16px !important;
}

/* Header (month/year and arrows) - equal spacing top/bottom */
.flatpickr-calendar .flatpickr-months {
    background: #FFFFFF !important;
    padding: 16px 12px !important; /* equal vertical padding + horizontal padding for arrows */
    display: flex !important;
    align-items: center !important;
}
.flatpickr-calendar .flatpickr-months .flatpickr-month {
    background: #FFFFFF !important;
    display: flex !important;
    align-items: center !important;
}
.flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important; /* spacing between month and year */
}
.flatpickr-current-month .cur-month,
.flatpickr-current-month .numInputWrapper input,
.flatpickr-current-month .numInputWrapper span.arrowUp:after,
.flatpickr-current-month .numInputWrapper span.arrowDown:after {
    color: #18191A !important;
}
.flatpickr-current-month .numInputWrapper {
    width: auto !important;
    display: inline-flex !important;
}
.flatpickr-current-month .numInputWrapper input.cur-year {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    color: #18191A !important;
    font-weight: 400 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 4.5ch !important; /* width for 4 digits */
    background: transparent !important;
    border: none !important;
}
/* Year dropdown styling */
.flatpickr-year-dropdown,
.flatpickr-monthDropdown-months {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    color: #18191A !important;
    background: transparent !important;
    border: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
}
.flatpickr-year-dropdown {
    width: auto !important;
    min-width: 4.5ch !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #18191A !important;
    fill: #18191A !important;
    opacity: 0.8;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important; /* override default positioning */
}
.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
    opacity: 1;
}

.flatpickr-calendar .flatpickr-day {
    width: 40px;
    height: 36px;
    line-height: 36px;
    border-radius: 0 !important; /* square days */
}

/* Bigger next/prev arrows */
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    width: 34px;
    height: 34px;
}

/* Match brand color for selected day */
.flatpickr-day.today {
    border-color: #BACECD !important;
}
.flatpickr-day:hover {
    background: rgba(0, 118, 145, 0.08) !important; /* subtle hover */
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
    background: #007691 !important;
    border-color: #007691 !important;
    color: #FFFFFF !important;
}

/* Alt input should look like our inputs */
.amico-contact-form .flatpickr-input[readonly] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #18191A !important;
    font-size: 16px !important;
    line-height: 24px !important;
    padding: 0 !important;
    text-align: left !important;
}

/* Weekday labels muted like placeholders */
.flatpickr-weekday,
.flatpickr-weekdays span {
    color: rgba(24, 25, 26, 0.6) !important;
}

.amico-contact-form {
    /* Frame 238702 */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    gap: 32px;
    width: 593px;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: visible; /* disable all scrolling */
}

/* Reset all form elements to prevent browser defaults */
.amico-contact-form * {
    box-sizing: border-box;
}

.amico-contact-form input,
.amico-contact-form textarea,
.amico-contact-form select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Native select overflow prevention - show ellipsis */
.amico-contact-form select {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    box-sizing: border-box;
}

/* Input and textarea overflow prevention */
.amico-contact-form input,
.amico-contact-form textarea {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    box-sizing: border-box;
}

/* Textarea should allow wrap */
.amico-contact-form textarea {
    white-space: normal;
}

/* Placeholder ellipsis for all browsers */
.amico-contact-form input::placeholder,
.amico-contact-form textarea::placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amico-contact-form input::-webkit-input-placeholder,
.amico-contact-form textarea::-webkit-input-placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amico-contact-form input::-moz-placeholder,
.amico-contact-form textarea::-moz-placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amico-contact-form input:-ms-input-placeholder,
.amico-contact-form textarea:-ms-input-placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Aggressive override of any browser default focus styles */
.amico-contact-form input:focus,
.amico-contact-form textarea:focus,
.amico-contact-form input:focus-visible,
.amico-contact-form textarea:focus-visible,
.amico-contact-form input:active,
.amico-contact-form textarea:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    outline-offset: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.amico-form-title {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 24px;
    line-height: 32px;
    color: #18191A;
    margin: 0 0 20px 0;
    text-align: center;
    width: 100%;
}

.amico-form-fields {
    /* Frame 1321315582 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 20px;
    width: 100%;
    min-width: 0; /* allow flex child to shrink */
}

/* Form Field Base Styles */
.amico-form-field {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0px;
    gap: 4px;
    height: 56px;
    border-bottom: 0.5px solid #BACECD;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 0; /* rely on parent .amico-form-fields gap for spacing between fields */
    background-color: transparent;
    /* Extra space for error messages */
    min-width: 0; /* prevent children from forcing horizontal overflow */
}

/* Conditional field styling */
.amico-form-field.amico-conditional-field {
    display: none; /* Initially hidden */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.amico-form-field.amico-conditional-field.show {
    opacity: 1;
    transform: translateY(0);
}

.amico-form-field.amico-message-field {
    height: 120px;
    /* spacing handled by container gap; no extra bottom margin */
}

.amico-form-field.amico-field-full {
    width: 100%;
}

.amico-form-field.amico-field-half {
    flex: 1;
    min-width: 0;
}

/* Focus and error states - proper priority order */
.amico-form-field:focus-within,
.amico-form-field.focused {
    border-bottom-color: #18191A;
    /* Black on focus */
}

.amico-form-field.error {
    border-bottom-color: #d32f2f !important;
    /* Red on error - higher priority */
    animation: shake 0.3s ease-in-out;
    margin-bottom: 36px; /* Create space for error message to prevent overlay */
}

/* Error state overrides focus - stays red even when focused */
.amico-form-field.error:focus-within,
.amico-form-field.error.focused {
    border-bottom-color: #d32f2f !important;
    /* Keep red when error and focused */
}

/* Apply same error spacing to vigilance form fields */
.amico-vigilance-internal .amico-form-field.error {
    margin-bottom: 36px !important; /* Create space for error message to prevent overlay */
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

/* Field Frame */
.amico-field-frame {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 16px 0px;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-width: 0; /* prevent flex overflow from children */
}

/* Form Row (for email/phone side by side) */
.amico-form-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0px;
    gap: 20px;
    width: 100%;
    min-width: 0; /* allow columns to shrink on small screens */
}

/* Input, Textarea Base Styles */
.amico-form-field input,
.amico-form-field textarea {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #18191A !important;
    resize: none;
    padding: 0;
    width: 100%;
    height: auto;
    transition: all 0.2s ease-in-out;
}

.amico-form-field textarea {
    min-height: 88px;
    line-height: 24px;
}

/* Simplified, robust placeholder styles - Enhanced for maximum visibility */
.amico-form-field input::placeholder,
.amico-form-field textarea::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    transition: opacity 0.2s ease-in-out;
    visibility: visible !important;
    display: block !important;
}

/* Browser-specific placeholder fallbacks for maximum compatibility */
.amico-form-field input::-webkit-input-placeholder,
.amico-form-field textarea::-webkit-input-placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    visibility: visible !important;
}

.amico-form-field input::-moz-placeholder,
.amico-form-field textarea::-moz-placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    visibility: visible !important;
}

.amico-form-field input:-ms-input-placeholder,
.amico-form-field textarea:-ms-input-placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    visibility: visible !important;
}

.amico-form-field input:-moz-placeholder,
.amico-form-field textarea:-moz-placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    visibility: visible !important;
}

/* Focus state - keep placeholder visible but slightly reduced */
.amico-form-field input:focus::placeholder,
.amico-form-field textarea:focus::placeholder,
.amico-form-field input:focus::-webkit-input-placeholder,
.amico-form-field textarea:focus::-webkit-input-placeholder,
.amico-form-field input:focus::-moz-placeholder,
.amico-form-field textarea:focus::-moz-placeholder {
    opacity: 0.7 !important;
    color: #999999 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    visibility: visible !important;
}

/* Only hide placeholder when field actually has content */
.amico-form-field.has-value input::placeholder,
.amico-form-field.has-value textarea::placeholder {
    opacity: 0.3;
    color: #999999 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 24px !important;
    visibility: visible !important;
}

/* Custom Select Styles */
.amico-select-wrapper {
    width: 100%;
    position: relative;
    z-index: 1;
    /* Base z-index */
}

.amico-select-current {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px;
    gap: 2px;
    width: 100%;
    height: 24px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease-in-out;
}

.amico-select-current:hover {
    opacity: 0.8;
}

.amico-select-placeholder {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #999999;
    flex: 1;
    text-align: left;
    transition: all 0.2s ease-in-out;
}

/* ============================================
   VIGILANCE FORM TYPOGRAPHY - DESKTOP (Default)
   ============================================ */

/* All vigilance form inputs, selects, and textareas - Desktop Typography */
.amico-vigilance-internal input,
.amico-vigilance-internal select,
.amico-vigilance-internal textarea {
    /* Desktop Typography Specs */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 24px !important;
    letter-spacing: 0% !important;
    color: #18191A !important;
    
    /* Reset browser defaults */
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    
    /* Flex and sizing */
    flex: 1;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Select-specific styling */
.amico-vigilance-internal select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 30px !important; /* Space for dropdown arrow */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

/* Textarea-specific styling */
.amico-vigilance-internal textarea {
    resize: none !important;
    align-self: stretch;
}

/* Placeholder styling for inputs and textareas */
.amico-vigilance-internal input::placeholder,
.amico-vigilance-internal textarea::placeholder {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: 16px !important;
    line-height: 24px !important;
    letter-spacing: 0% !important;
    color: rgba(24, 25, 26, 0.6) !important;
    opacity: 1 !important;
}

/* Select placeholder (disabled selected option) */
.amico-vigilance-internal select option[value=""][disabled] {
    color: rgba(24, 25, 26, 0.6) !important;
}

/* Select options (not placeholder) */
.amico-vigilance-internal select option:not([value=""]) {
    color: #18191A !important;
}

/* When select has a value selected */
.amico-vigilance-internal select:not([value=""]):valid,
.amico-vigilance-internal select:not(:invalid) {
    color: #18191A !important;
}

/* Date input placeholder styling - hide browser default until value is set */
.amico-vigilance-internal input[type="date"]:not(.has-value) {
    color: rgba(24, 25, 26, 0.6) !important;
}

.amico-vigilance-internal input[type="date"]:not(.has-value):before {
    content: attr(placeholder);
    color: rgba(24, 25, 26, 0.6) !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    margin-right: 0.5em;
}

/* Hide the default date input UI elements when empty */
.amico-vigilance-internal input[type="date"]:not(.has-value)::-webkit-datetime-edit {
    opacity: 0 !important;
}

.amico-vigilance-internal input[type="date"]:not(.has-value)::-webkit-datetime-edit-fields-wrapper {
    opacity: 0 !important;
}

.amico-vigilance-internal input[type="date"]:not(.has-value)::-webkit-datetime-edit-text {
    opacity: 0 !important;
}

.amico-vigilance-internal input[type="date"]:not(.has-value)::-webkit-datetime-edit-month-field {
    opacity: 0 !important;
}

.amico-vigilance-internal input[type="date"]:not(.has-value)::-webkit-datetime-edit-day-field {
    opacity: 0 !important;
}

.amico-vigilance-internal input[type="date"]:not(.has-value)::-webkit-datetime-edit-year-field {
    opacity: 0 !important;
}

/* Hide browser's default calendar icon - we use custom SVG */
.amico-vigilance-internal input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

/* Show normal styling when date has value */
.amico-vigilance-internal input[type="date"].has-value {
    color: #18191A !important;
}

.amico-vigilance-internal input[type="date"].has-value::-webkit-datetime-edit {
    opacity: 1 !important;
}

.amico-select-value {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #18191A !important;
    flex: 1;
    text-align: left;
}

.amico-select-arrow {
    width: 20px;
    height: 20px;
    color: #18191A;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.amico-select-wrapper.open .amico-select-arrow {
    transform: rotate(180deg);
}

/* Dropdown Styles - Figma Frame 240021 */
.amico-select-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: 1px solid #BACECD;
    border-radius: 0px; /* Remove rounded corners */
    box-shadow: none; /* Remove shadow for clean look */
    z-index: 9999 !important;
    /* Higher z-index to appear above everything */
    height: auto; /* Auto height for best practices */
    max-height: 450px; /* Max height for scrolling when needed */
    overflow-y: auto;
    box-sizing: border-box; /* Include borders/padding in height calc to avoid clipping */
    margin-bottom: 8px; /* Safety space so last underline doesn't clip */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    will-change: opacity, transform;
    /* Force solid background */
    isolation: isolate;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Figma layout specs */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0px;
    gap: 0px;
    padding-bottom: 12px; /* extra space so last underline is fully visible */
}

.amico-select-wrapper.open .amico-select-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Additional fix for dropdown container */
.amico-form-field:has(.amico-select-wrapper.open) {
    z-index: 99999 !important;
    position: relative !important;
}

/* Ensure dropdown is above everything */
.amico-select-wrapper.open {
    z-index: 99999 !important;
}

.amico-select-wrapper.open .amico-select-dropdown {
    background-color: rgb(255, 255, 255) !important;
    background: rgb(255, 255, 255) !important;
    z-index: 999999 !important;
}

/* Force Elementor and parent containers to not clip dropdown - Desktop only */
@media (min-width: 769px) {
    .elementor-widget-amico-contact-form:has(.amico-select-wrapper.open),
    .elementor-widget-amico-contact-form:has(.amico-select-wrapper.open) .elementor-widget-container,
    .amico-contact-form-wrapper:has(.amico-select-wrapper.open),
    .amico-contact-form:has(.amico-select-wrapper.open),
    .amico-form-fields:has(.amico-select-wrapper.open),
    .amico-form-field:has(.amico-select-wrapper.open) {
        overflow: visible !important;
    }
}

.amico-select-dropdown .select-option {
    /* Figma Frame specs - 48px height with 16px horizontal padding */
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
    width: 100%;
    height: 48px;
    background: #FFFFFF;
    /* Figma typography specs */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #18191A;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border-bottom: none;
    /* Remove border between items for clean look */
    background-color: #ffffff !important;
    background: #ffffff !important;
    opacity: 1 !important;
    /* Figma layout specs */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    /* Elegant underline animation - like menu items */
    position: relative;
}

.amico-select-dropdown .select-option::after {
    content: "";
    position: absolute;
    left: 16px; /* align with text padding */
    bottom: 0;
    height: 1px;
    background-color: #18191A;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
    /* Width set from JS to exactly match rendered text width in pixels */
    width: var(--underline-px, 0px);
}

.amico-select-dropdown .select-option:hover {
    background-color: transparent; /* Remove background change */
    color: #18191A; /* Keep text color consistent */
    transform: none; /* Remove slide animation for cleaner look */
}

.amico-select-dropdown .select-option:hover::after,
.amico-select-dropdown .select-option.selected::after,
.amico-select-dropdown .select-option[aria-selected="true"]::after {
    transform: scaleX(1); /* draw from left to right */
}

.amico-select-dropdown .select-option.selected:hover {
    background-color: #e8e8e8;
    transform: none;
}

/* Ensure last item has breathing room for underline visibility */
.amico-select-dropdown .select-option:last-child {
    padding-bottom: 12px;
}

/* Native Select Placeholder Styling */
.amico-form-field select option:disabled {
    color: #999999;
    font-style: italic;
}

/* Submit Button */
.amico-submit-btn {
    /* CTA */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    gap: 12px;
    min-width: 149px;
    height: 48px;
    background: #007691;
    border: none;
    cursor: pointer;
    border-radius: 0px;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #FFFFFF;
    text-align: center;
    margin-top: 0px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Enhanced alignment for perfect vertical centering */
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.amico-submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease-out;
}

.amico-submit-btn:hover::before {
    width: 300px;
    height: 300px;
}

.amico-submit-btn:hover {
    background: #005a6b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 118, 145, 0.3);
}

.amico-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 118, 145, 0.2);
}

.amico-submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.amico-submit-btn:disabled:hover {
    background: #cccccc;
    transform: none;
}

.amico-submit-btn .button-text {
    position: relative;
    z-index: 1;
    transition: opacity 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    /* Enhanced vertical centering */
    align-self: center;
    vertical-align: middle;
    line-height: 1;
    margin: 0 auto;
}

.amico-submit-btn .button-loader {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amico-submit-btn.loading .button-text {
    opacity: 0;
}

.amico-submit-btn.loading .button-loader {
    display: flex;
}

/* Form Messages */
.amico-form-message {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    margin-top: 16px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.amico-form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.amico-form-message.success {
    background-color: #f0f9f0;
    color: #4CAF50;
    border: 1px solid #c8e6c9;
}

.amico-form-message.error {
    background-color: #fff5f5;
    color: #d32f2f;
    border: 1px solid #f8bbd9;
}

/* Field Error Messages */
.amico-field-error {
    position: absolute;
    bottom: -36px;
    left: 0;
    font-size: 12px;
    color: #d32f2f;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-5px);
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    display: none !important;
    /* Hidden by default with !important */
}

.amico-form-field.error .amico-field-error {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

/* Loading State */
.amico-contact-form.submitting {
    pointer-events: none;
    opacity: 0.8;
}

.amico-contact-form.submitting .amico-form-field {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Responsive Design */

/* Large tablet/small desktop */
@media (max-width: 1200px) and (min-width: 1025px) {
    .amico-contact-form {
        width: 100%;
        max-width: 650px;
        gap: 30px;
    }
}

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .amico-contact-form {
        width: 100%;
        max-width: 600px;
        gap: 28px;
        padding: 0 20px;
    }

    .amico-form-row {
        flex-direction: column;
        gap: 20px;
    }

    .amico-form-field.amico-field-half {
        width: 100%;
    }

    .amico-form-fields {
        gap: 20px;
    }

    .amico-submit-btn {
        margin-top: 0px !important;
        width: auto; /* keep compact desktop width */
        max-width: none;
        align-self: center; /* center align like desktop */
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .amico-contact-form-wrapper {
        padding: 16px 0;
    }

    .amico-contact-form {
        width: 100%;
        gap: 20px;
        padding: 0 16px;
    }

    .amico-form-row {
        flex-direction: column;
        gap: 16px;
    }

    .amico-form-field.amico-field-half {
        width: 100%;
    }

    .amico-form-fields {
        gap: 16px;
    }

    .amico-form-field {
        height: 52px;
    }

    .amico-form-field.amico-message-field {
        height: 100px;
    }

    .amico-submit-btn {
        margin-top: 0px !important;
        width: auto; /* keep compact desktop width */
        max-width: none;
        height: 48px;
        font-size: 16px;
        align-self: center; /* center align like desktop */
    }

    /* Mobile Bottom Sheet for Dropdowns */
    .amico-select-wrapper.open .amico-select-dropdown {
        position: fixed;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 70vh !important;
        border-radius: 0px 0px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 99999 !important;
        transform: translateY(0) !important;
        margin: 0 !important;
        padding-top: 8px !important;
        animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    /* Mobile backdrop overlay */
    .amico-select-wrapper.open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99998;
        animation: fadeIn 0.3s ease;
    }

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

    /* Bottom sheet header handle */
    .amico-select-dropdown::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #d5d8dc;
        border-radius: 2px;
    }

    .amico-select-dropdown {
        padding-top: 32px !important;
    }

    /* Native select overflow fix on mobile */
    .amico-vigilance-internal select {
        font-size: 14px !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* Small mobile styles */
@media (max-width: 480px) {
    .amico-contact-form-wrapper {
        padding: 12px 0;
    }

    .amico-contact-form {
        padding: 0 12px;
        gap: 16px;
    }

    .amico-form-fields {
        gap: 14px;
    }

    .amico-form-field {
        height: 50px;
        margin-bottom: 0; /* keep no trailing margin on mobile as well */
    }

    .amico-form-field.amico-message-field {
        height: 90px;
    }

    .amico-form-field input,
    .amico-form-field textarea,
    .amico-select-placeholder,
    .amico-select-value {
        font-size: 14px;
        line-height: 20px;
    }

    .amico-form-field textarea {
        min-height: 70px;
    }

    .amico-submit-btn {
        font-size: 14px;
        padding: 12px 20px;
        height: 44px;
        margin-top: 0px !important;
        width: auto; /* keep compact desktop width */
        max-width: none;
        align-self: center; /* center align like desktop */
    }

    .amico-form-title {
        font-size: 20px;
        line-height: 28px;
    }
}

/* Animation Enhancements - Fast standard timing */
.amico-form-field {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.amico-form-field:nth-child(1) {
    animation-delay: 0s;
}

.amico-form-field:nth-child(2) {
    animation-delay: 0.02s;
}

.amico-form-field:nth-child(3) {
    animation-delay: 0.04s;
}

.amico-form-field:nth-child(4) {
    animation-delay: 0.06s;
}

.amico-form-field:nth-child(5) {
    animation-delay: 0.08s;
}

.amico-form-field:nth-child(6) {
    animation-delay: 0.10s;
}

.amico-form-field:nth-child(7) {
    animation-delay: 0.12s;
}

.amico-form-field:nth-child(8) {
    animation-delay: 0.14s;
}

.amico-form-field:nth-child(9) {
    animation-delay: 0.16s;
}

.amico-form-field:nth-child(10) {
    animation-delay: 0.18s;
}

.amico-form-field:nth-child(11) {
    animation-delay: 0.20s;
}

.amico-form-field:nth-child(12) {
    animation-delay: 0.22s;
}

.amico-form-field:nth-child(13) {
    animation-delay: 0.24s;
}

.amico-form-field:nth-child(14) {
    animation-delay: 0.26s;
}

.amico-form-field:nth-child(15) {
    animation-delay: 0.28s;
}

.amico-form-field:nth-child(16) {
    animation-delay: 0.30s;
}

.amico-form-field:nth-child(17) {
    animation-delay: 0.32s;
}

.amico-form-field:nth-child(18) {
    animation-delay: 0.34s;
}

.amico-form-field:nth-child(19) {
    animation-delay: 0.36s;
}

.amico-form-field:nth-child(20) {
    animation-delay: 0.38s;
}

.amico-form-field:nth-child(21) {
    animation-delay: 0.40s;
}

.amico-form-field:nth-child(22) {
    animation-delay: 0.42s;
}

.amico-form-field:nth-child(23) {
    animation-delay: 0.44s;
}

.amico-form-field:nth-child(24) {
    animation-delay: 0.46s;
}

.amico-submit-btn {
    animation: fadeInUp 0.4s ease-out;
    animation-delay: 0.48s;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Ring for Accessibility - Subtle */
.amico-form-field input:focus,
.amico-form-field textarea:focus,
.amico-select-current:focus {
    outline: none !important;
    box-shadow: none !important;
}

.amico-submit-btn:focus {
    outline: 1px solid #007691;
    outline-offset: 2px;
}

/* Remove all browser default focus styles */
.amico-form-field input:focus-visible,
.amico-form-field textarea:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* Custom browser validation message styling */
input:invalid {
    box-shadow: none;
}

/* Style the validation message bubble */
::-webkit-validation-bubble-message {
    background-color: #fff5f5 !important;
    border: 1px solid #f8bbd9 !important;
    color: #d32f2f !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 12px !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.15) !important;
}

::-webkit-validation-bubble-arrow {
    background-color: #fff5f5 !important;
    border: 1px solid #f8bbd9 !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .amico-form-field {
        border-bottom-width: 2px;
    }

    .amico-select-dropdown {
        border-width: 2px;
    }

    .amico-submit-btn {
        border: 2px solid #007691;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    .amico-form-field,
    .amico-submit-btn,
    .amico-select-dropdown,
    .amico-form-message {
        animation: none;
        transition-duration: 0.1s;
    }
}

/* Defensive CSS Rules - Maximum Placeholder Visibility and Button Alignment */
/* These rules ensure placeholders are always visible regardless of browser or theme conflicts */


/* Override any theme or plugin CSS that might hide placeholders */
.amico-contact-form-wrapper input::placeholder,
.amico-contact-form-wrapper textarea::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    line-height: 24px !important;
    visibility: visible !important;
}

/* Ensure button text is always centered */
.amico-submit-btn .button-text {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    margin: 0 auto !important;
}

/* Force button to be properly centered */
.amico-submit-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

/* Additional browser compatibility for placeholder visibility - handled by other rules above */



/* Final fallback for any hidden placeholders */
*[style*="placeholder: none"],
*[style*="placeholder:none"] {
    color: #999999 !important;
    visibility: visible !important;
}

/* Ensure form fields maintain proper height for placeholder visibility */
.amico-form-field input,
.amico-form-field textarea {
    min-height: 24px !important;
    height: auto !important;
}

/* Custom select placeholder visibility */
.amico-select-placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    line-height: 24px !important;
}

/* Force placeholder visibility when JavaScript triggers it */
.amico-form-field input.placeholder-forced::placeholder,
.amico-form-field textarea.placeholder-forced::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: placeholderPulse 0.5s ease-in-out;
}

/* Placeholder pulse animation for forced visibility */
@keyframes placeholderPulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* Ensure fields with placeholder-visible attribute show placeholders */
.amico-form-field input[data-placeholder-visible="true"]::placeholder,
.amico-form-field textarea[data-placeholder-visible="true"]::placeholder {
    color: #999999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Conditional Field Groups Styling */
.amico-conditional-fields {
    display: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
    width: 100%;
    gap: 20px;
    margin-top: 10px;
}

.amico-conditional-fields.show {
    display: flex !important;
    opacity: 1;
    transform: translateY(0);
}

/* Specific styling for each conditional field group */
.amico-product-inquiry-fields,
.amico-complaint-fields,
.amico-partner-fields,
.amico-vigilance-fields,
.amico-other-fields {
    display: flex;
    flex-direction: column;
    gap: 0px;
    width: 100%;
    background: transparent;
    padding: 0;
    border: none;
}

/* Conditional field animation delays - Fast timing */
.amico-conditional-fields .amico-form-field:nth-child(1) {
    animation-delay: 0s;
}

.amico-conditional-fields .amico-form-field:nth-child(2) {
    animation-delay: 0.02s;
}

.amico-conditional-fields .amico-form-field:nth-child(3) {
    animation-delay: 0.04s;
}

.amico-conditional-fields .amico-form-field:nth-child(4) {
    animation-delay: 0.06s;
}

.amico-conditional-fields .amico-form-field:nth-child(5) {
    animation-delay: 0.08s;
}

.amico-conditional-fields .amico-form-field:nth-child(6) {
    animation-delay: 0.10s;
}

.amico-conditional-fields .amico-form-field:nth-child(7) {
    animation-delay: 0.12s;
}

.amico-conditional-fields .amico-form-field:nth-child(8) {
    animation-delay: 0.14s;
}

.amico-conditional-fields .amico-form-field:nth-child(9) {
    animation-delay: 0.16s;
}

.amico-conditional-fields .amico-form-field:nth-child(10) {
    animation-delay: 0.18s;
}

.amico-conditional-fields .amico-form-field:nth-child(11) {
    animation-delay: 0.20s;
}

.amico-conditional-fields .amico-form-field:nth-child(12) {
    animation-delay: 0.22s;
}

/* Ensure conditional fields maintain proper spacing and alignment */
.amico-conditional-fields .amico-form-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.amico-conditional-fields .amico-form-row .amico-form-field.amico-field-half {
    flex: 1;
    min-width: 0;
}

/* Vigilance container - neutral background per Figma */
.amico-vigilance-fields {
    border-left: 0;
    padding: 0 0 0 0;
    background: transparent;
    border-radius: 0;
}

/* Vigilance Question Label */
.amico-vigilance-question-label {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #18191A;
    margin: 0;
    padding: 0;
}

/* Radio Options Container */
.amico-radio-group {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 24px;
}

/* Radio Option Styling - Figma Frame 2147205981/2147205983 */
.amico-radio-option {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20px;
    gap: 5px;
    min-height: 64px;
    border: 0.5px solid #BACECD;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    box-sizing: border-box;
    background: transparent; /* transparent base background */
}

.amico-radio-option:hover {
    border-color: #007691;
    background: rgba(0, 118, 145, 0.02);
}

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

/* Selected state (JS toggles .active) */
.amico-radio-option.active {
    border: 1px solid #007691;
    background: transparent !important; /* keep transparent when selected */
}

.amico-radio-option.active .amico-radio-text {
    font-weight: 500;
}

/* Radio Icon - Custom styled with SVG background */
.amico-radio-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease-in-out;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Unchecked state - thin ring */
.amico-radio-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #007691;
    background: transparent;
    transition: all 0.2s ease-in-out;
}

/* Checked state - filled SVG style with inner circle */
.amico-radio-option input[type="radio"]:checked + .amico-radio-icon::before {
    border-width: 1px; /* outer ring stays thin */
}

/* Inner filled circle when checked */
.amico-radio-option input[type="radio"]:checked + .amico-radio-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #007691;
    transition: all 0.2s ease-in-out;
}

/* Radio Text */
.amico-radio-text {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #18191A;
}

/* External Links Styling - Figma Frame 2147205996 */
.amico-external-link-item {
    /* Frame 2147205986/2147205990/2147205989 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;
    width: 100%;
    height: 46px;
    flex: none;
    align-self: stretch;
    flex-grow: 0;
}

.amico-external-link-label {
    /* ALCON / JOHNSON & JOHNSON / NIDEK */
    width: 100%;
    height: 20px;
    /* UI/Desktop/Title 1 */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    text-transform: uppercase;
    color: #18191A;
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

.amico-external-link {
    /* Text Link */
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 4px;
    height: 18px;
    /* UI/Desktop/CTA 3 */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 300 !important;
    font-size: 12px !important;
    line-height: 18px;
    text-align: left;
    text-decoration-line: underline;
    color: #18191A;
    transition: color 0.2s ease-in-out;
    word-break: break-all;
    flex: none;
    order: 1;
    flex-grow: 0;
}

.amico-external-link:hover {
    color: #007691;
    text-decoration: underline;
}

/* External links container spacing */
.amico-vigilance-external .amico-field-frame {
    gap: 24px !important;
    margin-top: 24px;
}

/* Section Headers - Figma specs */
.amico-section-header {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 12px;
    line-height: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #18191A;
    margin: 0;
    padding: 0;
}

/* Declaration Checkbox */
.amico-declaration-checkbox {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px;
    min-height: 20px;
    margin: 0 !important;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #007691;
}

.amico-declaration-label {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #18191A;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

/* Vigilance Attestation Checkbox */
.amico-checkbox-field {
    border-bottom: none !important;
    padding: 0 !important;
    margin-top: 16px !important;
    margin-bottom: 0 !important; /* Remove default margin */
    align-items: flex-start !important;
    justify-content: flex-start !important;
    min-height: auto !important; /* Remove default min-height */
    height: auto !important; /* Remove fixed height */
    flex-wrap: wrap !important; /* Allow error to wrap to next line */
}

/* Checkbox error spacing - no extra margin needed since error is in normal flow */
.amico-checkbox-field.error {
    margin-bottom: 0 !important; /* Error message is in normal flow, no extra space needed */
}

/* Checkbox error message positioning - use normal flow, not absolute */
.amico-checkbox-field .amico-field-error {
    position: static !important; /* Remove absolute positioning */
    margin-top: 4px !important; /* Small gap below checkbox */
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    transform: none !important; /* Remove transform */
    width: 100% !important; /* Force error to take full width and wrap to new line */
    flex-basis: 100% !important; /* Ensure it takes full width in flexbox */
}

/* Custom Checkbox Wrapper */
.amico-custom-checkbox-wrapper {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Hide native checkbox */
.amico-attestation-checkbox {
    position: absolute;
    opacity: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 2;
}

/* Checkbox icon label */
.amico-checkbox-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SVG icons */
.amico-checkbox-icon svg {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* Unchecked state - show unchecked icon */
.amico-checkbox-icon .checkbox-unchecked {
    opacity: 1;
    transform: scale(1);
}

.amico-checkbox-icon .checkbox-checked {
    opacity: 0;
    transform: scale(0.8);
}

/* Checked state - show checked icon */
.amico-attestation-checkbox:checked + .amico-checkbox-icon .checkbox-unchecked {
    opacity: 0;
    transform: scale(0.8);
}

.amico-attestation-checkbox:checked + .amico-checkbox-icon .checkbox-checked {
    opacity: 1;
    transform: scale(1);
}

/* Error state - red border for unchecked when error */
.amico-checkbox-field.error .checkbox-unchecked path {
    fill: #AE1C1C;
    transition: fill 0.2s ease-in-out;
}

/* Hover effect */
.amico-checkbox-icon:hover svg {
    transform: scale(1.05);
}

.amico-attestation-checkbox:checked + .amico-checkbox-icon:hover .checkbox-checked {
    transform: scale(1.05);
}

/* Text label */
.amico-attestation-label {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: #18191A !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    flex: 1 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Internal Vigilance Form Container - Figma border */
.amico-vigilance-internal {
    border: 0.5px solid #BACECD;
    padding: 32px;
    margin-top: 20px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* guard against inner content overflow */
}

/* Override inline styles for vigilance sections to ensure responsiveness */
.amico-vigilance-internal > div,
.amico-vigilance-section,
.amico-vigilance-section > div {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Override inline styles for field frames */
.amico-vigilance-internal .amico-field-frame {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Vigilance Section Spacing - 48px between sections per Figma */
.amico-vigilance-section {
    margin-top: 48px !important;
}

.amico-vigilance-section:first-child {
    margin-top: 0 !important;
}

/* Within-section spacing - 16px per Figma */
.amico-vigilance-section .amico-field-frame {
    gap: 16px !important;
}

/* Section header to first field spacing */
.amico-section-header + .amico-form-field {
    margin-top: 16px !important;
}

/* Mobile Responsive - Radio Options */
@media (max-width: 768px) {
    .amico-radio-option {
        height: 52px;
        padding: 16px;
    }
    
    .amico-radio-icon {
        width: 20px;
        height: 20px;
        border-width: 1.5px;
    }
    
    .amico-radio-icon::after {
        width: 10px;
        height: 10px;
    }
    
    .amico-radio-text {
        font-size: 14px;
        line-height: 20px;
    }
    
    .amico-vigilance-question-label {
        font-size: 14px;
        line-height: 18px;
    }
}

/* Responsive design for conditional fields */
@media (max-width: 768px) {
    .amico-conditional-fields .amico-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .amico-conditional-fields .amico-form-row .amico-form-field.amico-field-half {
        width: 100%;
    }
    
    .amico-vigilance-fields {
        /* padding: 0 12px 0 12px; */
        border-left-width: 2px;
    }
}

/* Country Dropdown Styling */
.amico-country-select .amico-select-dropdown {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #007691 transparent;
}

.amico-country-select .amico-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.amico-country-select .amico-select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.amico-country-select .amico-select-dropdown::-webkit-scrollbar-thumb {
    background: #007691;
    border-radius: 3px;
}

.amico-country-select .amico-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: #005a6b;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-bottom: 1px solid rgba(186, 206, 205, 0.3);
}

.country-option:last-child {
    border-bottom: none;
}

.country-option:hover {
    background: rgba(0, 118, 145, 0.08);
    transform: translateX(2px);
}

.country-option.selected {
    background: rgba(0, 118, 145, 0.12);
    color: #007691;
}

.country-option .country-flag {
    font-size: 20px;
    line-height: 1;
    min-width: 24px;
    text-align: center;
}

.country-option .country-name {
    flex: 1;
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: inherit;
}

.country-option .country-dial {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #666666;
    min-width: 50px;
    text-align: right;
}

.country-option:hover .country-dial {
    color: #007691;
}

.country-option.selected .country-dial {
    color: #007691;
    font-weight: 500;
}

/* Country select value display with flag */
.amico-country-select .amico-select-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amico-country-select .amico-select-value .selected-flag {
    font-size: 18px;
    line-height: 1;
}

.amico-country-select .amico-select-value .selected-dial {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: #18191A;
}

/* Animation for country selection */
.country-option.selecting {
    background: rgba(0, 118, 145, 0.15);
    transform: scale(0.98);
}

/* Search/filter functionality (if needed later) */
.amico-country-search {
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid rgba(186, 206, 205, 0.3);
    padding: 12px 16px;
    z-index: 10;
}

.amico-country-search input {
    width: 100%;
    border: 1px solid #BACECD;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    outline: none;
}

.amico-country-search input:focus {
    border-color: #007691;
    box-shadow: 0 0 0 2px rgba(0, 118, 145, 0.1);
}

/* Responsive design for country dropdown */
@media (max-width: 768px) {
    .country-option {
        padding: 10px 12px !important;
        gap: 10px;
    }
    
    .country-option .country-flag {
        font-size: 18px;
        min-width: 20px;
    }
    
    .country-option .country-name {
        font-size: 15px;
        line-height: 22px;
    }
    
    .country-option .country-dial {
        font-size: 13px;
        line-height: 18px;
        min-width: 45px;
    }
    
    .amico-country-select .amico-select-dropdown {
        max-height: 250px;
    }
    
    /* Vigilance form responsive padding */
    .amico-vigilance-internal {
        padding: 20px 16px;
    }
    
    /* ============================================
       VIGILANCE FORM TYPOGRAPHY - MOBILE
       ============================================ */
    
    /* All vigilance form inputs, selects, and textareas - Mobile Typography */
    .amico-vigilance-internal input,
    .amico-vigilance-internal select,
    .amico-vigilance-internal textarea {
        /* Mobile Typography Specs */
        font-size: 14px !important;
        line-height: 20px !important;
    }
    
    /* Placeholder styling for inputs and textareas - Mobile */
    .amico-vigilance-internal input::placeholder,
    .amico-vigilance-internal textarea::placeholder {
        font-size: 14px !important;
        line-height: 20px !important;
    }
}

/* Critical responsive fixes for small screens (440px and below) */
@media (max-width: 440px) {
    /* Reduce vigilance form padding to prevent overflow */
    .amico-vigilance-internal {
        padding: 16px 12px !important;
        margin-top: 16px;
    }
    
    /* Ensure all vigilance sections fit within viewport */
    .amico-vigilance-section {
        margin-top: 32px !important;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .amico-vigilance-section:first-child {
        margin-top: 0 !important;
    }
    
    /* Reduce section header font size */
    .amico-section-header {
        font-size: 11px;
        line-height: 18px;
        letter-spacing: 0.3px;
    }
    
    /* Ensure all form fields fit properly */
    .amico-vigilance-internal .amico-form-field {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Reduce field frame padding */
    .amico-vigilance-internal .amico-field-frame {
        padding: 12px 0px !important;
        gap: 8px !important;
    }
    
    /* Ensure inputs don't overflow */
    .amico-vigilance-internal input,
    .amico-vigilance-internal textarea,
    .amico-vigilance-internal select {
        font-size: 14px !important;
        line-height: 20px !important;
        max-width: 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Reduce placeholder font size */
    .amico-vigilance-internal input::placeholder,
    .amico-vigilance-internal textarea::placeholder {
        font-size: 14px !important;
        line-height: 20px !important;
    }
    
    /* Ensure select dropdowns fit */
    .amico-vigilance-internal select {
        padding-right: 28px !important;
    }
    
    /* Reduce SVG icon sizes */
    .amico-vigilance-internal svg {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0;
    }
    
    /* Ensure row containers don't overflow */
    .amico-vigilance-internal > div {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Stack side-by-side fields (Phone/Email row in Healthcare Facility) */
    .amico-vigilance-internal div[style*="flex-direction: row"][style*="gap: 20px"] {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    /* Half fields should be full width on very small screens */
    .amico-vigilance-internal .amico-form-field.amico-field-half {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
    }
    
    /* Reduce textarea rows for better fit */
    .amico-vigilance-internal textarea {
        min-height: 70px;
    }
    
      
    /* Reduce radio button sizes but keep side-by-side */
    .amico-radio-option {
        padding: 14px 12px;
        min-height: 52px;
    }
    
    .amico-radio-text {
        font-size: 14px;
        line-height: 20px;
    }
    
    /* Keep radio group horizontal on mobile */
    .amico-radio-group {
        flex-direction: row !important;
        gap: 8px !important;
    }
    
    
    /* Reduce external link font sizes */
    .amico-external-link-label {
        font-size: 14px;
        line-height: 18px;
    }
    
    .amico-external-link {
        font-size: 11px !important;
        line-height: 16px;
    }
    
    /* Vigilance question field adjustments */
    .amico-vigilance-question {
        height: auto !important;
        min-height: 0 !important;
    }
    
    .amico-vigilance-question .amico-field-frame {
        padding: 16px 0 !important;
    }
}

/* Extra small screens (360px and below) */
@media (max-width: 360px) {
    .amico-vigilance-internal {
        padding: 12px 8px !important;
    }
    
    .amico-vigilance-section {
        margin-top: 24px !important;
    }
    
    .amico-vigilance-internal input,
    .amico-vigilance-internal textarea,
    .amico-vigilance-internal select {
        font-size: 13px !important;
        line-height: 18px !important;
    }
    
    .amico-section-header {
        font-size: 10px;
        line-height: 16px;
    }
    
    .amico-radio-option {
        padding: 10px;
        min-height: 44px;
    }
}
