/* ===== FORM INPUT FIXES ===== */
/* These fixes are loaded as a standalone CSS file to ensure they always apply */

/* Fix select dropdown text color - WHITE for dark themes */
select,
.glass-dark select,
[data-theme] select {
    color: #ffffff !important;
}

/* Fix select OPTION text color - WHITE text on DARK background */
select option,
.glass-dark select option,
[data-theme] select option {
    color: #ffffff !important;
    background-color: #1a1a2e !important;
}

/* For light theme (sharjah) - keep dark text on white bg */
[data-theme="sharjah"] select option {
    color: #1B4332 !important;
    background-color: #ffffff !important;
}

/* Fix input padding with icons - prevent text overlap */
.relative input,
.relative select,
.glass-dark .relative input,
.glass-dark .relative select,
[data-theme] .relative input,
[data-theme] .relative select {
    padding-right: 2.75rem !important;
    padding-left: 1rem !important;
}

/* Ensure icons don't overlap with text */
.relative > .absolute.right-3,
.relative > .absolute.rtl\:right-3,
.relative > .absolute.right-\[0\.75rem\],
.relative > .absolute.right-4,
.relative > svg.absolute {
    right: 0.75rem !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

/* Fix select appearance across browsers */
select,
.glass-dark select,
[data-theme] select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    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='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: left 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

[dir="rtl"] select {
    background-position: left 0.5rem center;
}

/* Fix textarea and input text color */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="color"],
textarea,
.glass-dark input,
.glass-dark textarea,
[data-theme] input,
[data-theme] textarea {
    color: #ffffff !important;
}

/* Fix placeholder color */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix input focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none !important;
}

/* Ensure labels are readable */
label {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Override any Tailwind text-gray classes on options */
option.text-gray-800,
option.text-gray-600,
option.text-gray-500,
option[class*="text-gray"] {
    color: #ffffff !important;
    background-color: #1a1a2e !important;
}
