/**
 * Hubexo Form - Frontend Styles
 * Styled to harmonize perfectly with the New Hubexo theme
 * Brand Colors: Plum (#08110a), Atomic Yellow (#dcff3c), Earth (#f7f7f2), White (#ffffff)
 */

/* Form Wrapper */
.hubexo-form-wrapper {
    background: transparent;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.hubexo-form-title {
    margin-top: 0 !important;
    font-size: 26px;
    color: #08110a !important;
    font-weight: 700;
    line-height: 1.25;
}

.hubexo-form-description {
    color: #4a404a;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 25px;
}

.hubexo-form-group {
    margin-bottom: 18px;
}

.hubexo-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #08110a;
    margin-bottom: 6px;
}

/* Form Inputs, Selects, and Textareas */
.hubexo-form-wrapper .hubexo-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    color: #08110a;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.hubexo-form-wrapper .hubexo-input:focus {
    border-color: #08110a;
    box-shadow: 0 0 0 3px rgba(50, 20, 50, 0.12);
    outline: none;
}

/* Phone Field with International Prefix Selector */
.hubexo-phone-wrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.hubexo-phone-wrap .hubexo-phone-prefix {
    max-width: 140px;
    flex-shrink: 0;
    cursor: pointer;
    background-color: #f8fafc;
}

.hubexo-phone-wrap .hubexo-phone-number {
    flex: 1;
}

/* Single Consent Checkbox (Privacy Policy / Marketing) */
.hubexo-consent-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 6px;
}

.hubexo-consent-wrap input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #08110a;
}

.hubexo-consent-wrap label {
    font-size: 13.5px;
    line-height: 1.5;
    color: #08110a;
    font-weight: 400;
    cursor: pointer;
    margin: 0;
}

.hubexo-consent-wrap label a {
    color: #08110a;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.hubexo-consent-wrap label a:hover {
    color: #000000;
}

/* Choices (Radio & Multi-Checkbox) */
.hubexo-choices label {
    font-weight: 400;
    color: #08110a;
    font-size: 14px;
    cursor: pointer;
}

/* Submit Button - Aligned with New Hubexo Pill Button */
.hubexo-submit-btn,
.hubexo-form-wrapper .blueprint--button {
    font-weight: 600;
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 14px 28px;
    border-radius: 100px;
    line-height: 20px;
    border: 1px solid #dcff3c;
    font-size: 16px;
    outline: none;
    transition: all 0.25s ease-in-out;
    background-color: #dcff3c;
    color: #08110a;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.hubexo-submit-btn:hover,
.hubexo-form-wrapper .blueprint--button:hover,
.hubexo-submit-btn:active {
    background-color: #08110a;
    border-color: #08110a;
    color: #ffffff;
}

/* Inline Success Message Banner */
.hubexo-success-message {
    background: #08110a;
    color: #f7f7f2;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.6;
}

.hubexo-success-message p:first-child {
    margin-top: 0 !important;
}

.hubexo-success-message p:last-child {
    margin-bottom: 0 !important;
}

/* ========================================================
   SUCCESS POPUP MODAL (NEW HUBEXO THEME)
   ======================================================== */
body.hubexo-modal-open {
    overflow: hidden;
}

.hubexo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(50, 20, 50, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    box-sizing: border-box;
}

.hubexo-modal-overlay.hubexo-modal-visible {
    display: flex !important;
    opacity: 1 !important;
}

.hubexo-modal-card {
    background: #ffffff;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
    padding: 44px 36px 36px 36px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(50, 20, 50, 0.35);
    border-top: 6px solid #dcff3c;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.hubexo-modal-visible .hubexo-modal-card {
    transform: translateY(0) scale(1);
}

/* Success Checkmark Icon Badge */
.hubexo-modal-icon-wrap {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: #dcff3c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 0 0 10px rgba(220, 255, 60, 0.22);
}

.hubexo-modal-icon-wrap svg {
    width: 38px;
    height: 38px;
    stroke: #08110a;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Modal Title */
.hubexo-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #08110a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* Modal Confirmation Message Body */
.hubexo-modal-message {
    font-size: 15px;
    color: #4a404a;
    line-height: 1.6;
    margin: 0 0 28px 0;
}

.hubexo-modal-message p {
    margin: 0 0 10px 0;
}

.hubexo-modal-message p:last-child {
    margin-bottom: 0;
}

/* Modal Action Button (Pill Button) */
.hubexo-modal-btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #dcff3c;
    color: #08110a;
    font-size: 16px;
    font-weight: 600;
    padding: 13px 40px;
    border-radius: 100px;
    border: 1px solid #dcff3c;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease-in-out;
}

.hubexo-modal-btn-close:hover {
    background-color: #08110a;
    border-color: #08110a;
    color: #ffffff;
}

/* Top-Right Dismiss Button */
.hubexo-modal-dismiss-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.hubexo-modal-dismiss-btn:hover {
    color: #08110a;
}

@media (max-width: 576px) {
    .hubexo-modal-card {
        padding: 32px 20px 24px 20px;
    }

    .hubexo-modal-title {
        font-size: 20px;
    }

    .hubexo-phone-wrap {
        flex-direction: column;
    }

    .hubexo-phone-wrap .hubexo-phone-prefix {
        max-width: 100%;
    }
}

/* replace default css */
.white-text span {
    color: inherit !important;
}

/* Built-in Anti-Spam Math Captcha Widget */
.hubexo-captcha-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    transition: border-color 0.2s ease;
}

.hubexo-captcha-group:focus-within {
    border-color: #08110a;
}

.hubexo-captcha-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    font-weight: 600;
    color: #08110a;
    margin-bottom: 10px;
}

.hubexo-captcha-question-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hubexo-captcha-shield {
    font-size: 14px;
}

.hubexo-captcha-question-text {
    color: #08110a;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hubexo-captcha-math-prompt {
    font-weight: 600;
}

.hubexo-captcha-math-expr {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.hubexo-captcha-refresh-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.hubexo-captcha-refresh-btn:hover {
    color: #08110a;
    border-color: #94a3b8;
    background: #f1f5f9;
}

.hubexo-captcha-refresh-icon {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hubexo-captcha-input {
    max-width: 220px;
    background: #ffffff;
}

@media (max-width: 576px) {
    .hubexo-captcha-input {
        max-width: 100%;
    }
}

/* Inline Error Notice */
.hubexo-form-error-notice {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 18px;
    animation: hubexoNoticeFadeIn 0.2s ease-out;
}

@keyframes hubexoNoticeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}