/* Cookie Styles */
.wh-autofill-suggestion {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 2px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}
.wh-autofill-suggestion:hover {
    background: #f5f5f5;
}
.form-group {
    position: relative;
}

/* Form Styles */


/* Field width classes */
.wh-field-full {
    width: 100%;
    margin-bottom: 15px;
}

.wh-field-half {
    width: 48%;
    margin-right: 2%;
    margin-bottom: 15px;
    display: inline-block;
}

.wh-field-half:nth-child(2n) {
    margin-right: 0;
}

.wh-field-third {
    width: 31%;
    margin-right: 2%;
    margin-bottom: 15px;
    display: inline-block;
}

.wh-field-third:nth-child(3n) {
    margin-right: 0;
}

.wh-form-clear {
    display: block;
    clear: both;
    margin-top: 15px;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .wh-field-half,
    .wh-field-third {
        width: 100%;
        margin-right: 0;
    }
}

/* Form styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.required {
    color: #dc3232;
}

.radio-option {
    margin-bottom: 5px;
}

.radio-option label {
    display: inline;
    margin-left: 5px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wh-form-2-col {
    display: flex;
    justify-content: flex-start;
}

.wh-form-one-half {
    width: 50%;
}

.wh-form-one-half:first-child {
    margin-right: 20px;
}

.wh-form-3-col {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
}

.wh-form-col-50 {
    width: 100%;
    min-width: 0;
}

.wh-form-col-25 {
    width: 100%;
    min-width: 0;
}

.wh-form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.wh-form-message.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.wh-form-message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.wh-form.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.wh-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Floating Contact */
.wh-quick-contact {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
}

/* Bottom Right positioning */
.wh-quick-contact.bottom-right {
    right: 20px;
}

/* Bottom Left positioning */
.wh-quick-contact.bottom-left {
    left: 20px;
}

/* Top Right positioning */
.wh-quick-contact.top-right {
    top: 20px;
    right: 20px;
    bottom: auto;
}

/* Top Left positioning */
.wh-quick-contact.top-left {
    top: 20px;
    left: 20px;
    bottom: auto;
}

.wh-contact-bubble {
    background: var(--wh-bubble-bg, #0073aa);
    color: var(--wh-bubble-text, #ffffff);
    border: none;
    border-radius: 24px;
    padding: 12px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    transition: background-color .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
    font-weight: 600;
}

.wh-contact-bubble:hover,
.wh-contact-bubble:focus,
.wh-contact-bubble:focus-visible,
.wh-contact-bubble:active {
    background: var(--wh-bubble-bg-hover, #005f8a);
    color: var(--wh-bubble-text-hover, #ffffff);
    transform: translateY(-1px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.wh-bubble-icon { font-size: 18px; }
.wh-bubble-icon i { font-size: 16px; line-height: 1; }
.wh-bubble-text { font-size: 14px; letter-spacing: .2px; }

.wh-contact-tooltip {
    position: fixed;
    max-width: min(320px, 72vw);
    background: var(--wh-tooltip-bg, #1d2327);
    color: var(--wh-tooltip-text, #ffffff);
    border-radius: 8px;
    padding: 10px 36px 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    z-index: 9998;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}

.wh-contact-tooltip.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.bottom-right .wh-contact-tooltip {
    right: 20px;
    bottom: 72px;
}

.bottom-left .wh-contact-tooltip {
    left: 20px;
    bottom: 72px;
}

.top-right .wh-contact-tooltip {
    right: 20px;
    top: 72px;
}

.top-left .wh-contact-tooltip {
    left: 20px;
    top: 72px;
}

#wh-quick-contact .wh-contact-tooltip-close,
#wh-quick-contact .wh-contact-tooltip-close:hover,
#wh-quick-contact .wh-contact-tooltip-close:focus,
#wh-quick-contact .wh-contact-tooltip-close:active {
    all: unset;
    box-sizing: border-box;
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    font-family: Arial, sans-serif !important;
    font-size: 18px !important;
    font-style: normal !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #c7d0d9 !important;
    cursor: pointer;
    opacity: 1 !important;
    box-shadow: none !important;
}

#wh-quick-contact .wh-contact-tooltip-close:hover,
#wh-quick-contact .wh-contact-tooltip-close:focus {
    color: var(--wh-tooltip-text, #ffffff) !important;
    opacity: 0.9 !important;
}

#wh-quick-contact .wh-contact-tooltip-close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
    border-radius: 2px;
}

.wh-contact-popup {
    position: fixed;
    bottom: 80px;
    width: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
    display: none; /* overridden for mobile */
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9998; /* keep below bubble */
}

/* Bottom Right positioning */
.bottom-right .wh-contact-popup {
    right: 20px;
}

/* Bottom Left positioning */
.bottom-left .wh-contact-popup {
    left: 20px;
}

/* Top Right positioning */
.top-right .wh-contact-popup {
    top: 80px;
    right: 20px;
    bottom: auto;
    transform: translateY(-10px);
}

/* Top Left positioning */
.top-left .wh-contact-popup {
    top: 80px;
    left: 20px;
    bottom: auto;
    transform: translateY(-10px);
}

.wh-contact-popup.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.wh-popup-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eef0f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wh-popup-header h3 {
    margin: 0;
    font-size: 18px;
}

.wh-popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    color: #666;
}

.wh-popup-close:hover { color: #222; }

.wh-popup-content {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/** Form specific styles for the popup **/
.wh-contact-popup .wh-form {
    margin: 0;
}

.wh-contact-popup .fl-input,
.wh-contact-popup .fl-select,
.wh-contact-popup .fl-textarea {
    width: 100%;
    margin-bottom: 15px;
}

.fl-select {
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.428571429;
    color: #6a6b71;
    background-color: #fcfcfc;
    background-image: none;
    border: 1px solid #e6e6e6;
    width: 100%;
    box-sizing: border-box;
}

/* Location selector styling to match form inputs */
.wh-location-selector-wrapper {
    margin-bottom: 15px;
}

.wh-location-selector-wrapper .fl-select {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.wh-location-selector-wrapper .fl-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.preferred-contact-form-group {
    display: flex;
    align-items: center;
}

.preferred-contact-form-group label {
    margin-right: 20px;
}

.radio-group {
    margin-top: 5px;
}

.radio-label {
    display: inline-block;
    margin-right: 20px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin-right: 5px;
}

/* Returning user banner */
.wh-returning-banner {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: #ccc 1px solid;
    display: block;
    gap: 10px;
}
.wh-returning-text { font-weight: 600; color: #000; display: block; font-size: 1.2em;}
.wh-reset-returning { font-size: 12px; color: #888; text-decoration: underline; text-transform: uppercase;}
.wh-reset-returning:hover { color: #00486b; }

.wh-hidden { display: none !important; }

#message {
    height: 100px;
}

/* Empty-state embedded quick-contact should grow naturally without inner scrollbars. */
.wh-empty-quick-contact .quick-contact-form,
.wh-empty-quick-contact .quick-contact-form .fl-textarea {
    max-width: 100%;
    box-sizing: border-box;
}

.wh-empty-quick-contact .quick-contact-form textarea[name="message"] {
    min-height: 110px;
    height: auto;
    overflow-y: hidden;
}

/* Opt-in required UI state for submit buttons */
.wh-form[data-opt-in-required="1"] button[type="submit"].wh-submit-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(12%);
}

.wh-opt-in-error {
    margin: 8px 0 0;
    color: #d63638;
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 992px) {
    .wh-quick-contact {
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .wh-contact-bubble {
        width: 100%;
        border-radius: 0;
        justify-content: center;
        text-align: center;
        padding: 12px;
        z-index: 9999;
    }
    .wh-contact-tooltip {
        left: 14px !important;
        right: 14px !important;
        top: auto !important;
        bottom: 60px !important;
        max-width: none;
    }
    .wh-contact-popup {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        transform: translateY(100vh);
        transition: transform 0.3s ease-out;
        display: block; /* ensure element is renderable for transition */
        opacity: 1; /* avoid opacity transition conflicts */
        pointer-events: none; /* disabled when closed */
        will-change: transform;
    }
    .wh-contact-popup.active {
        transform: translateY(0);
        pointer-events: auto;
    }
    .wh-popup-content {
        max-height: none;
        height: calc(100vh - 56px);
        overflow-y: auto;
    }
}

/* Lock body scroll when mobile overlay is open */
@media (max-width: 480px) {
    body.wh-lock-scroll {
        overflow: hidden;
        height: 100vh;
    }
}

/* Account for WP admin bar on mobile overlay */
@media (max-width: 782px) {
    body.admin-bar .wh-contact-popup {
        top: 46px;
        height: calc(100vh - 46px);
    }
    body.admin-bar .wh-popup-content {
        height: calc(100vh - 46px - 56px);
    }
}


/** Multi Step Form Styles */

/* Progress indicator styles */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 10px;
    position: relative;
    color: #666;
}

.progress-step::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 20px;
    height: 20px;
    background: #ddd;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.progress-step::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #ddd;
}

.progress-step.active {
    color: #066aab;
}

.progress-step.active::after {
    background: #066aab;
}

.progress-step.completed::after {
    background: #28a745;
}

/* Form step styles */
.form-step {
    display: none;
    animation: fadeIn 0.5s;
}

.form-step.active {
    display: block;
}

.form-navigation {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}