.fb-custom-gform-container{position:relative;margin-bottom:3rem;z-index:1}.fb-custom-gform-container.fb-width-boxed{max-width:950px}.fb-custom-gform-container.fb-width-full{width:100%;max-width:100%}.fb-custom-gform-container.aligncenter{margin-left:auto;margin-right:auto}.fb-custom-gform-container.alignright{margin-left:auto;margin-right:0}.fb-custom-gform-container.alignleft{margin-left:0;margin-right:auto}.fb-custom-gform-bg-emblem{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:500px;max-width:95%;opacity:.15;z-index:-1;pointer-events:none}.fb-custom-gform-wrapper{--fb-line:var(--color-grey-200, #cbd5e1);--fb-select-arrow:url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background: var(--color-surface-card);
    border: 1px solid var(--fb-line);
    padding: 3rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    text-align: left;
    box-sizing: border-box;
}

html[data-theme="dark"] .fb-custom-gform-wrapper {
    --fb-line: var(--color-border-strong);
    --fb-select-arrow: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

.fb-custom-gform-wrapper.bg-grey { background: var(--color-bg-secondary); backdrop-filter: none; }
.fb-custom-gform-wrapper.bg-transparent { background: transparent; backdrop-filter: none; border-color: transparent; border-top: none; padding-left:0; padding-right:0; }


.fb-form-header {
    margin-bottom: 2rem;
}
.fb-form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}
.fb-form-desc {
    font-size: 1.05rem;
    color: var(--color-text-primary);
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
}

.fb-cgf-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem 2.5rem;
}

.fb-cgf-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.fb-col-3 { grid-column: span 3; }
.fb-col-4 { grid-column: span 4; }
.fb-col-6 { grid-column: span 6; }
.fb-col-8 { grid-column: span 8; }
.fb-col-9 { grid-column: span 9; }
.fb-col-12 { grid-column: span 12; }

.fb-cgf-field > label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-heading);
    margin-bottom: 6px;
    line-height: 1.3;
    display: inline-block;
}

.fb-cgf-form .req {
    color: #dc2626;
    margin-left: 2px;
    display: inline;
}

.fb-cgf-hints-row {
    margin-bottom: 1rem;
    text-align: left !important;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.fb-cgf-general-hint {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0 !important;
    white-space: nowrap;
    text-align: left !important;
}

.fb-cgf-form input[type="text"],
.fb-cgf-form input[type="email"],
.fb-cgf-form input[type="tel"],
.fb-cgf-form input[type="number"],
.fb-cgf-form input[type="date"],
.fb-cgf-form textarea,
.fb-cgf-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--fb-line);
    background-color: var(--color-bg-secondary);
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text-primary);
    border-radius: 0 !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.fb-cgf-form select {
    padding-right: 32px;
    appearance: none;
    background-image: var(--fb-select-arrow);
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    background-size: 16px;
}

.fb-cgf-form input:focus,
.fb-cgf-form textarea:focus,
.fb-cgf-form select:focus {
    outline: none;
    border-color: var(--color-border-strong);
    background-color: var(--color-surface-card);
}

/* Muted text, not a fainter one: secondary text at 40% read about 2:1 on
   the grey field (WCAG 1.4.3; the theme's rule for muted text). */
.fb-cgf-form input::placeholder,
.fb-cgf-form textarea::placeholder {
    color: var(--color-text-muted);
    opacity: 1;
}

.fb-cgf-radio span {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text-primary);
}

.fb-cgf-checkbox .fb-cgf-checkbox-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-heading);
}

@keyframes fb-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}
.fb-cgf-field.error input, .fb-cgf-field.error textarea, .fb-cgf-field.error select {
    border-bottom-color: #ef4444 !important;
    animation: fb-shake 0.3s ease-in-out;
}
.fb-cgf-consent.error {
    color: #ef4444;
    animation: fb-shake 0.3s ease-in-out;
}

.fb-cgf-radio-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    margin-top: 4px;
}

.fb-cgf-radio, .fb-cgf-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.4;
    margin-bottom: 0 !important;
}

.fb-cgf-radio input[type="radio"],
.fb-cgf-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-border-strong);
    background-color: var(--color-surface-card);
    margin: 2px 10px 0 0;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    border-radius: 0 !important;
}

.fb-cgf-radio input[type="radio"] {
    border-radius: 50% !important;
}

.fb-cgf-radio input:checked,
.fb-cgf-checkbox input:checked {
    background-color: var(--color-blue-200, #16295b);
}

.fb-cgf-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.fb-cgf-radio input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: white;
}

.fb-cgf-consent-row {
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.fb-cgf-form-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    width: 100%;
}

.fb-cgf-form-actions.align-left { justify-content: flex-start; }
.fb-cgf-form-actions.align-center { justify-content: center; }
.fb-cgf-form-actions.align-right { justify-content: flex-end; }
.fb-cgf-form-actions.align-full { flex-direction: column; align-items: stretch; }
.fb-cgf-form-actions.align-full .fb-cgf-submit-btn { width: 100% !important; max-width: 100% !important; }

/* The send button is the site's .btn (css-components/buttons.css); the
   clear-the-form one stays a quiet underlined link. */
.fb-cgf-reset-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
    width: auto !important;
    max-width: none !important;
}

.fb-cgf-reset-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 4px 8px !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    background-color: transparent !important;
    color: var(--color-text-secondary) !important;
    border: none !important;
    text-decoration: underline !important;
}

.fb-cgf-reset-btn:hover {
    background-color: transparent !important;
    color: #ef4444 !important;
}

.btn-spinner {
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

.fb-cgf-message {
    padding: 15px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.95rem;
    border-left: 4px solid;
}

.fb-cgf-message.success {
    background-color: #f0fdf4;
    color: #166534;
    border-color: #22c55e;
}

.fb-cgf-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border-color: #ef4444;
}

@media (max-width: 899px) {
    .fb-custom-gform-container {
        margin-bottom: 1.5rem;
    }
    .fb-form-header {
        margin-bottom: 1.5rem;
        padding-bottom: 0;
    }
    .fb-form-title {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 0.5rem;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    .fb-form-desc {
        font-size: 0.92rem;
        line-height: 1.5;
        word-break: break-word;
    }
    .fb-custom-gform-wrapper { 
        padding: 1.5rem 1.15rem; 
        border-top-width: 4px;
    }
    .fb-cgf-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }
    .fb-cgf-grid > div { 
        width: 100% !important;
        grid-column: span 12 !important; 
    }
    .fb-cgf-field > label {
        font-size: 0.9rem;
        margin-bottom: 5px;
        word-break: break-word;
    }
    .fb-cgf-form input[type="text"],
    .fb-cgf-form input[type="email"],
    .fb-cgf-form input[type="tel"],
    .fb-cgf-form input[type="number"],
    .fb-cgf-form input[type="date"],
    .fb-cgf-form select {
        min-height: 46px;
        font-size: 16px !important;
        padding: 10px 14px;
        border-radius: 0 !important;
        -webkit-appearance: none;
        appearance: none;
        box-sizing: border-box;
        max-width: 100%;
    }
    .fb-cgf-form textarea {
        font-size: 16px !important;
        padding: 10px 14px;
        border-radius: 0 !important;
        box-sizing: border-box;
        max-width: 100%;
    }
    .fb-cgf-form select {
        background-position: calc(100% - 12px) center;
        padding-right: 32px;
    }
    .fb-cgf-radio-wrapper { 
        flex-direction: column !important; 
        align-items: flex-start !important;
        gap: 0.75rem !important; 
        width: 100% !important;
    }
    .fb-cgf-radio, .fb-cgf-checkbox {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        min-height: 24px;
        line-height: 1.4;
        width: 100%;
        cursor: pointer;
    }
    .fb-cgf-radio input[type="radio"],
    .fb-cgf-checkbox input[type="checkbox"]{margin:2px 0 0 0!important;width:18px!important;height:18px!important;flex-shrink:0}.fb-cgf-checkbox .fb-cgf-checkbox-text,.fb-cgf-radio span{font-size:0.9rem!important;word-break:break-word}.fb-cgf-consent-row{margin-top:.25rem;padding-top:1rem}.fb-cgf-hints-row{margin-bottom:.75rem}.fb-cgf-general-hint{white-space:normal;font-size:.82rem;line-height:1.4;margin-bottom:.5rem}.fb-cgf-form-actions{flex-direction:column!important;align-items:stretch!important;gap:0.65rem!important;width:100%!important}.fb-cgf-submit-btn{width:100%!important}.fb-cgf-reset-btn{position:static!important;display:inline-flex!important;align-self:center!important;width:auto!important;margin:.25rem auto 0!important;padding:6px 12px!important;font-size:0.85rem!important;text-decoration:underline!important;background:transparent!important;color:var(--color-text-secondary)!important;border:none!important}.fb-cgf-reset-btn:hover{color:#ef4444!important}.fb-cgf-message{font-size:.9rem;padding:12px 14px;margin-bottom:15px;word-break:break-word}.fb-custom-gform-bg-emblem{width:160px;opacity:.05;pointer-events:none}.fb-cgf-success-block{padding:2rem 1rem}.fb-cgf-success-block svg{width:52px;height:52px;margin-bottom:1rem}.fb-cgf-success-block h3{font-size:1.25rem;line-height:1.35}}@media (max-width:480px){.fb-custom-gform-wrapper{padding:1.25rem .85rem}.fb-form-title{font-size:1.25rem}.fb-cgf-grid{gap:1rem!important}}.fb-cgf-success-block{text-align:center;padding:3rem 1.5rem;animation:fadeIn 0.5s ease}.fb-cgf-success-block svg{margin-bottom:1.5rem}.fb-cgf-success-block h3{font-size:1.8rem;font-weight:700;color:var(--color-text-heading);margin:0 0 .75rem 0}.fb-cgf-success-block p{font-size:1.1rem;color:var(--color-text-secondary);margin:0;line-height:1.5}.fb-cgf-closed{margin:0;padding:1.5rem 0;font-size:1.1rem;font-weight:600;color:var(--color-text-heading);text-align:center}.fb-cgf-form[hidden],.fb-cgf-closed[hidden]{display:none}