/* ═══════════════════════════════════════════════════
   Cross-Browser Form Normalization
   Fixes Safari vs Chrome differences for inputs,
   selects, textareas, and buttons.
   ═══════════════════════════════════════════════════ */

/* Reset Safari's default form styling */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
textarea,
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0.5rem; /* rounded-lg */
    font-size: 1rem;
    line-height: 1.5;
    background-color: #fff;
    box-sizing: border-box;
}

/* Fix Safari select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Fix Safari textarea resize handle styling */
textarea {
    resize: vertical;
}

/* Fix Safari button styling */
button,
input[type="submit"],
input[type="button"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Fix Safari date input height inconsistency */
input[type="date"] {
    min-height: 3rem;
}

/* Fix Safari focus outline */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Fix Safari autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    -webkit-text-fill-color: #111827 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Consistent placeholder styling */
::placeholder {
    color: #9CA3AF;
    opacity: 1;
}
::-webkit-input-placeholder {
    color: #9CA3AF;
    opacity: 1;
}

/* Fix Safari number input spinner */
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;
}

/* Fix iOS zoom on input focus (font-size < 16px triggers zoom) */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

