/* ================================================================
   PayFusion — Mobile Input Text Visibility Fix
   Ensures all form inputs have visible text on all mobile browsers.
   Fixes: dark text on dark background on Android/iOS Chrome/Safari.
================================================================ */

/* Force all inputs to use explicit colors — overrides browser defaults */
input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select {
    color: #e2eaf6 !important;
    background-color: #132038 !important;
    -webkit-text-fill-color: #e2eaf6 !important;
    caret-color: #00c896 !important;
    /* Prevent iOS/Safari from applying its own styling */
    -webkit-appearance: none;
    appearance: none;
    /* Prevent iOS auto-zoom */
    font-size: 16px !important;
}

/* Autofill overrides — browsers inject yellow/blue backgrounds */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #132038 inset !important;
    box-shadow: 0 0 0 1000px #132038 inset !important;
    -webkit-text-fill-color: #e2eaf6 !important;
    caret-color: #00c896 !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* Select dropdowns — Android Chrome renders these with system styles */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a93b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px !important;
}

/* Placeholder text */
input::placeholder,
textarea::placeholder {
    color: #7a93b8 !important;
    opacity: 0.7 !important;
    -webkit-text-fill-color: #7a93b8 !important;
}

/* Select options — dark background */
select option {
    background: #132038 !important;
    color: #e2eaf6 !important;
}

/* Focus states */
input:focus,
textarea:focus,
select:focus {
    border-color: #00c896 !important;
    box-shadow: 0 0 0 3px rgba(0,200,150,0.15) !important;
    outline: none !important;
}

/* Disabled inputs */
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Radio & checkbox — keep native look */
input[type="radio"],
input[type="checkbox"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
    background-color: transparent !important;
    -webkit-text-fill-color: initial !important;
    font-size: initial !important;
    width: auto !important;
    color: #00c896 !important;
    accent-color: #00c896 !important;
}

/* Date input icon on mobile */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) opacity(0.5);
    cursor: pointer;
}

/* Number input — hide spinner arrows on mobile to save space */
@media (max-width: 768px) {
    input[type="number"]::-webkit-inner-spin-button,
    input[type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    input[type="number"] { -moz-appearance: textfield; }
}

/* Prevent iOS font size zoom on focus */
@media (max-width: 768px) {
    input, textarea, select { font-size: 16px !important; }
}

/* Public pay page inputs (uses inline styles, so needs extra specificity) */
.pub-form-group input {
    color: #e2eaf6 !important;
    background-color: #132038 !important;
    -webkit-text-fill-color: #e2eaf6 !important;
}

/* Auth page inputs */
.input-wrap input {
    color: #e2eaf6 !important;
    background-color: #132038 !important;
    -webkit-text-fill-color: #e2eaf6 !important;
}
