/**
 * CSS fixes for form focus issues
 */

/* Prevent text from disappearing on blur */
.form-control {
    transition: all 0.3s ease;
}

/* Class added while input is focused */
.form-focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Ensure text remains visible for inputs with a value */
[data-has-value="true"] {
    opacity: 1 !important;
    color: inherit !important;
}

/* Override any theme styles that might be causing issues */
.form-control:not(:focus):not([data-has-value="true"]) {
    color: inherit;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    color: inherit !important;
}

/* Fix for potential Mobirise theme issues */
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover, 
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: inherit !important;
    box-shadow: 0 0 0 1000px white inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Override any Mobirise or bootstrap styles that manipulate form contents */
input.form-control::placeholder,
textarea.form-control::placeholder {
    opacity: 0.7;
}

/* Ensure form always displays with correct colors */
.form-group {
    position: relative;
}

/* Clear any hidden transition delays from theme */
input[type="text"],
input[type="email"],
textarea {
    transition-delay: 0s !important;
}