/*
 * O&H Forms front-end styles
 *
 * These styles provide a modern look and feel for the form inputs and
 * overall layout. Inputs span the full width of their container, have
 * appropriate padding and border radius, and the success message is
 * highlighted with a subtle green background. Adjust as needed to
 * integrate with your theme.
 */

.centyent-form input[type="text"],
.centyent-form input[type="email"],
.centyent-form input[type="number"],
.centyent-form input[type="tel"],
.centyent-form textarea,
.centyent-form select,
.centyent-form input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #75A99D;
    border-radius: 8px;
    margin-top: 4px;
    box-sizing: border-box;
    font-size: 15px;
    font-family: 'Exo 2';
}

.centyent-form label {
    font-weight: 600;
    font-family: 'Exo 2';
    font-size: 15px;
}

.centyent-form p {
    margin-bottom: 1em;
}

/* Submit button base styles */
.centyent-form button {
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s;
}

/* Outline style: black border with transparent background */
.centyent-form button.oh-outline {
    background: transparent;
    border: 1px solid #000;
    color: #000;
}

/* Filled style: primary accent background, black text */
.centyent-form button.oh-filled {
    background: var(--accent-color, #0073aa);
    border: 1px solid var(--accent-color, #0073aa);
    color: #000;
}

.centyent-form .centyent-success-message {
    background-color: #f1f8e9;
    border: 1px solid #c5e1a5;
    border-radius: 4px;
    padding: 10px;
    color: #33691e;
    margin-bottom: 1em;
}

/* Select2 container styling */
.centyent-form .select2-container .select2-selection--single {
    height: 36px;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.centyent-form .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 26px;
}
.centyent-form .select2-container .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* Ensure Select2 containers always fill the available width */
.centyent-form .select2-container {
    width: 100% !important;
    min-width: 0 !important;
}

/* Ensure the dropdown appears above other elements on mobile */
.centyent-form .select2-container .select2-dropdown {
    z-index: 9999;
}

/* Loader displayed beneath file inputs while uploading */
.centyent-form .ohf-upload-loader {
    display: none; /* hidden by default; toggled via JS */
    margin-top: 4px;
    font-size: 16px;
    color: #666;
    align-items: center;
    gap: 6px;
}
.centyent-form .ohf-upload-loader .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: ohf-spin 0.8s linear infinite;
}
@keyframes ohf-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Overlay displayed when the form is being submitted */
.centyent-form .ohf-form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 999;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.centyent-form .ohf-form-overlay .ohf-message {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-family: 'Good Times Rg' !important;
}

.centyent-form .ohf-form-overlay .ohf-progress-bar {
    width: 80%;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
}

.centyent-form .ohf-form-overlay .ohf-progress-bar::before {
    content: '';
    display: block;
    width: 0%;
    height: 100%;
    background:#80E190;
    animation: ohf-progress-bar 3s linear infinite;
}

@keyframes ohf-progress-bar {
    0% { width: 0%; }
    100% { width: 100%; }
}