.sxva-widget {
    --sxva-accent: var(--e-global-color-primary, #b73318);
    --sxva-text: var(--e-global-color-text, #292824);
    font-family: inherit;
}
.sxva-popup-host { display: contents; }
[data-sxva-open] > .sxva-arrow,
.sxva-widget .sxva-submit > .sxva-arrow {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
}
.sxva-widget .sxva-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    border-radius: 999px;
    padding: 22px 32px;
    background: var(--sxva-accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s ease;
}
.sxva-widget .sxva-button:hover { filter: brightness(.9); }
.sxva-widget .sxva-button:disabled { opacity: .6; cursor: default; }
.sxva-widget button:focus-visible { outline: 3px solid var(--sxva-accent); outline-offset: 4px; }
body.sxva-modal-open { overflow: hidden; }
.sxva-widget .sxva-dialog {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(960px, calc(100% - 40px));
    max-width: none;
    max-height: calc(100dvh - 40px);
    padding: 0;
    overflow: auto;
    border: 1px solid #e5e3df;
    border-radius: 20px;
    background: #fff;
    color: var(--sxva-text);
    box-shadow: 0 24px 100px #0004;
    font-family: var(--e-global-typography-text-font-family, inherit);
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}
.sxva-widget .sxva-dialog:not([open]), .sxva-widget [hidden] { display: none !important; }
.sxva-dialog::backdrop { background: #171610a8; backdrop-filter: blur(5px); }
.sxva-widget .sxva-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 32px;
    border-bottom: 1px solid #e8e6e2;
}
.sxva-widget .sxva-header h2 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 40px); font-weight: 800; line-height: 1.15; letter-spacing: -.03em; color: var(--sxva-text); }
.sxva-widget .sxva-header p { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.sxva-widget .sxva-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #f3f2ef; color: #282621; font: 28px/1 sans-serif; cursor: pointer; }
.sxva-widget .sxva-close:hover { background: #e8e6e2; }
.sxva-widget .sxva-form { padding: 32px; margin: 0; }
.sxva-widget .sxva-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.sxva-widget .sxva-full { grid-column: 1 / -1; }
.sxva-widget .sxva-fields label { display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: 14px; font-weight: 700; color: var(--sxva-text); }
.sxva-widget .sxva-fields :is(input, textarea, select) { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid #dcdad5; border-radius: 8px; background: #f8f7f5; box-shadow: none; color: #25231f; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.5; }
/* Keep focus visible without inheriting a black Elementor primary colour. */
.sxva-widget .sxva-fields :is(input, textarea, select, .sxva-period-trigger) {
    /* Site-wide Elementor button transitions can be marked !important. */
    transition: none !important;
    outline: 2px solid transparent;
    outline-offset: 2px;
}
.sxva-widget .sxva-fields :is(input, textarea, select, .sxva-period-trigger):focus {
    border-color: #bf6547;
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(183, 51, 24, .14);
}
@media (forced-colors: active) {
    .sxva-widget .sxva-fields :is(input, textarea, select, .sxva-period-trigger):focus {
        outline-color: Highlight;
        box-shadow: none;
    }
}
.sxva-widget .sxva-period { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sxva-widget .sxva-period-control { position: relative; min-width: 0; }
.sxva-widget .sxva-period-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    box-sizing: border-box; width: 100%; margin: 0; padding: 12px 14px;
    border: 1px solid #dcdad5; border-radius: 8px; background: #f8f7f5;
    color: #25231f; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.5;
    text-align: left; white-space: normal; cursor: pointer; box-shadow: none;
}
.sxva-widget .sxva-period-trigger::after {
    content: ''; width: 7px; height: 7px; flex: 0 0 7px;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.sxva-widget .sxva-period-options {
    position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 10; box-sizing: border-box;
    list-style: none; margin: 0; padding: 4px; max-height: 220px; overflow-y: auto;
    border: 1px solid #dcdad5; border-radius: 8px; background: #fff; color: #25231f;
    font-size: 16px; font-weight: 400; overscroll-behavior: contain;
    box-shadow: 0 8px 24px #29282420;
}
.sxva-widget .sxva-period-options.sxva-period-above { top: auto; bottom: calc(100% + 6px); }
.sxva-widget .sxva-period-options [role=option] { margin: 0; padding: 12px; border-radius: 5px; cursor: pointer; }
.sxva-widget .sxva-period-options [role=option]:is(:hover, .sxva-active) { background: #fbede7; outline: 1px solid #bf6547; outline-offset: -1px; }
.sxva-widget .sxva-period-options [aria-selected=true] { font-weight: 700; }
.sxva-widget .sxva-period .sxva-period-error { color: #8e2919; }
.sxva-widget .sxva-fields textarea { min-height: 160px; resize: vertical; }
.sxva-widget .sxva-fields input[type=file] { padding: 8px; font-size: 13px; }
.sxva-widget input::file-selector-button { padding: 9px 12px; margin-right: 10px; border: 0; border-radius: 5px; background: var(--sxva-accent); color: white; font: inherit; font-weight: 600; cursor: pointer; }
.sxva-widget .sxva-fields small { font-size: 12px; font-weight: 400; color: #68665f; }
.sxva-widget .sxva-actions { display: flex; justify-content: flex-end; margin-top: 28px; }
.sxva-widget .sxva-submit { padding: 16px 24px; background: #111; }
.sxva-widget .sxva-form[data-complete="1"] .sxva-submit:not(:disabled) { background: #b73318; }
.sxva-widget .sxva-status { margin: 24px 0 0; padding: 16px; border-radius: 8px; font-size: 15px; overflow-wrap: anywhere; background: #f3f2ef; }
.sxva-widget .sxva-status[data-tone=error] { background: #fff0ed; color: #8e2919; }
.sxva-widget .sxva-status[data-tone=success] { background: #edf6ef; color: #235f34; }
.sxva-widget .sxva-config-note { margin: 20px 0; font-size: 14px; }
@media (max-width: 600px) {
    .sxva-widget .sxva-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 14px; }
    .sxva-widget .sxva-header, .sxva-widget .sxva-form { padding: 22px; }
    .sxva-widget .sxva-fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .sxva-widget .sxva-submit { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .sxva-widget .sxva-button { transition: none; }
}
