/* Keep the plugin content below the theme header and clear floated or
 * absolutely positioned header elements. */
.bfe-public-page-shell {
    clear: both;
    display: block;
    min-height: 1px;
    padding: 26px 0 48px;
    position: relative;
    z-index: 1;
}

/* The generated WordPress page uses the site header and footer, but the theme
 * page-title banner is replaced by the plugin's own compact heading. */
body.bfe-beach-request-page main .page-header,
body.bfe-beach-request-page .site-content .page-header,
body.bfe-beach-request-page .site-content .page-title,
body.bfe-beach-request-page .site-content .page-title-wrap,
body.bfe-beach-request-page .site-content .page-title-section,
body.bfe-beach-request-page .site-content .titlebar,
body.bfe-beach-request-page .site-content header.entry-header,
body.bfe-beach-request-page .site-content .entry-header {
    display: none !important;
}

body.bfe-beach-request-page .site-main,
body.bfe-beach-request-page .content-area,
body.bfe-beach-request-page .entry-content {
    max-width: none;
    width: 100%;
}

.bfe-app {
    background: var(--bfe-background);
    color: var(--bfe-ink);
    font-family: inherit;
    left: 50%;
    margin: 0;
    max-width: none;
    padding: 30px;
    position: relative;
    transform: translateX(-50%);
    width: min(80vw, 1440px);
}

.bfe-app *,
.bfe-app *::before,
.bfe-app *::after { box-sizing: border-box; }

.bfe-app h1,
.bfe-app h2,
.bfe-app h3,
.bfe-app p { margin-top: 0; }

.bfe-form-heading {
    background: linear-gradient(125deg, var(--bfe-navy), #075b91);
    border-radius: 16px;
    color: #fff;
    margin-bottom: 22px;
    padding: 30px 34px;
}
.bfe-form-heading .bfe-eyebrow { color: #74c8f4; }
.bfe-form-heading h1 { color: #fff; font-size: clamp(28px, 3vw, 38px); line-height: 1.12; margin-bottom: 10px; }
.bfe-form-heading p { color: #d8eaf5; margin-bottom: 0; max-width: 860px; }

.bfe-stepper {
    background: #fff;
    border: 1px solid var(--bfe-border);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
    overflow: hidden;
}
.bfe-stepper__item {
    align-items: center;
    background: #fff;
    border: 0;
    border-right: 1px solid var(--bfe-border);
    color: var(--bfe-muted);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    gap: 9px;
    justify-content: center;
    min-height: 64px;
    padding: 10px;
}
.bfe-stepper__item:last-child { border-right: 0; }
.bfe-stepper__item span {
    align-items: center;
    background: #edf2f6;
    border-radius: 50%;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    width: 30px;
}
.bfe-stepper__item.is-active { color: var(--bfe-blue); box-shadow: inset 0 -4px 0 var(--bfe-blue); }
.bfe-stepper__item.is-active span { background: var(--bfe-blue); color: #fff; }
.bfe-stepper__item.is-complete span { background: var(--bfe-green); color: #fff; }

.bfe-form-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 300px; }
.bfe-form-main { min-width: 0; }
.bfe-request-form.is-enhanced .bfe-form-step:not(.is-active) { display: none; }

.bfe-card,
.bfe-side-card {
    background: var(--bfe-surface);
    border: 1px solid var(--bfe-border);
    border-radius: var(--bfe-radius);
    box-shadow: 0 4px 16px rgba(5, 42, 79, .04);
    margin-bottom: 18px;
    padding: 24px;
}
.bfe-card h2 { color: var(--bfe-navy); font-size: 23px; margin-bottom: 4px; }
.bfe-card h3 { color: var(--bfe-navy); font-size: 18px; margin-bottom: 12px; }
.bfe-card__header { align-items: flex-start; display: flex; gap: 14px; margin-bottom: 22px; }
.bfe-card__header p { color: var(--bfe-muted); margin: 0; }
.bfe-section-number {
    align-items: center;
    background: var(--bfe-blue);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 38px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
}

.bfe-field { margin-bottom: 16px; min-width: 0; }
.bfe-field label,
.bfe-modal-field { color: var(--bfe-ink); display: block; font-size: 13px; font-weight: 750; margin-bottom: 7px; }
.bfe-field label span { color: var(--bfe-red); }
.bfe-field input,
.bfe-field select,
.bfe-field textarea {
    background: #fff;
    border: 1px solid #afc2d2;
    border-radius: 8px;
    color: var(--bfe-ink);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}
.bfe-field textarea { min-height: 120px; resize: vertical; }
.bfe-field input:focus,
.bfe-field select:focus,
.bfe-field textarea:focus { border-color: var(--bfe-blue); box-shadow: 0 0 0 3px rgba(0, 103, 177, .14); outline: 0; }
.bfe-field__help,
.bfe-muted,
.bfe-character-count { color: var(--bfe-muted); font-size: 12px; margin: 6px 0 0; }
.bfe-character-count { text-align: right; }
.bfe-field--button { align-self: end; }
.bfe-field--button .bfe-button { width: 100%; }
.bfe-grid--email { grid-template-columns: minmax(0, 1.6fr) minmax(150px, .6fr) minmax(130px, .7fr) minmax(120px, .5fr); }

.bfe-combobox { position: relative; }
.bfe-combobox::after {
    color: var(--bfe-blue-dark);
    content: "⌄";
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    right: 14px;
    top: 11px;
    transition: transform .15s ease;
}
.bfe-combobox.is-open::after { transform: rotate(180deg); }
.bfe-combobox input[type="search"] {
    appearance: none;
    padding-right: 46px;
}
.bfe-combobox input[type="search"]::-webkit-search-cancel-button { margin-right: 22px; }
.bfe-combobox__options {
    background: #fff;
    border: 1px solid var(--bfe-border);
    border-radius: 8px;
    box-shadow: var(--bfe-shadow);
    left: 0;
    max-height: 300px;
    overflow: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 50;
}
.bfe-combobox__option {
    background: #fff;
    border: 0;
    border-bottom: 1px solid #edf1f4;
    color: var(--bfe-ink);
    cursor: pointer;
    display: block;
    padding: 12px 14px;
    text-align: left;
    width: 100%;
}
.bfe-combobox__option:hover,
.bfe-combobox__option:focus { background: #eef7fc; outline: 0; }
.bfe-combobox__option strong,
.bfe-combobox__option span { display: block; }
.bfe-combobox__option span { color: var(--bfe-muted); font-size: 12px; margin-top: 3px; }
.bfe-combobox__empty { color: var(--bfe-muted); padding: 14px; }

.bfe-organization-summary {
    background: #f2f8fc;
    border: 1px solid #c2dceb;
    border-radius: 9px;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 2fr;
    margin: 12px 0;
    padding: 14px;
}
.bfe-organization-summary span,
.bfe-review-summary span { color: var(--bfe-muted); display: block; font-size: 12px; }
.bfe-organization-summary strong,
.bfe-review-summary strong { display: block; margin-top: 3px; }
.bfe-link-button { background: none; border: 0; color: var(--bfe-blue); cursor: pointer; font: inherit; font-weight: 700; padding: 5px 0; text-decoration: underline; }

.bfe-form-sidebar { align-self: start; position: sticky; top: 24px; }
.bfe-side-card { padding: 20px; }
.bfe-side-card h3 { color: var(--bfe-navy); font-size: 16px; margin-bottom: 8px; }
.bfe-side-card p,
.bfe-side-card li { color: var(--bfe-muted); font-size: 13px; line-height: 1.55; }
.bfe-side-card ul { margin: 0; padding-left: 18px; }
.bfe-side-card--help { background: var(--bfe-navy); border-color: var(--bfe-navy); color: #fff; }
.bfe-side-card--help h3,
.bfe-side-card--help p,
.bfe-side-card--help a { color: #fff; }

/* Acciones de salida disponibles durante todo el trámite. */
.bfe-persistent-form-nav {
    align-items: center;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--bfe-border);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(5, 42, 79, .10);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 10px 0 16px;
    padding: 10px;
    position: sticky;
    top: 12px;
    z-index: 40;
}
body.admin-bar .bfe-persistent-form-nav { top: 44px; }
.bfe-form-nav-button {
    flex: 0 0 210px;
    min-width: 210px;
    width: 210px;
}
.bfe-form-actions .bfe-form-nav-button {
    flex: 0 0 210px;
    min-width: 210px;
    width: 210px;
}

.bfe-form-actions { align-items: center; display: flex; gap: 12px; justify-content: flex-end; margin: 22px 0 8px; }
.bfe-review-summary { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bfe-review-summary > div { background: #f5f8fa; border-radius: 8px; padding: 12px; }
.bfe-policy { border-top: 1px solid var(--bfe-border); margin-top: 16px; padding-top: 14px; }
.bfe-policy summary { color: var(--bfe-blue); cursor: pointer; font-weight: 700; }
.bfe-policy p { color: var(--bfe-muted); margin: 12px 0 0; }
.bfe-verification-status { color: var(--bfe-muted); font-size: 13px; }
.bfe-verification-status.is-verified { color: var(--bfe-green); font-weight: 700; }
.bfe-verification-status.is-error { color: var(--bfe-red); }
.bfe-honeypot { height: 1px !important; left: -9999px !important; opacity: 0 !important; position: absolute !important; width: 1px !important; }

.bfe-request-form .is-locked-correction { background: #f5f7f8; opacity: .78; position: relative; }
.bfe-request-form .is-locked-correction::after { color: var(--bfe-muted); content: "Sin cambios solicitados"; font-size: 11px; font-weight: 700; position: absolute; right: 12px; top: 10px; }
.bfe-request-form .is-editable-correction { border-color: var(--bfe-yellow); box-shadow: 0 0 0 2px rgba(242, 181, 68, .16); }

@media (max-width: 980px) {
    .bfe-app { padding: 24px; width: 92vw; }
    .bfe-form-layout { grid-template-columns: 1fr; }
    .bfe-form-sidebar { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
    .bfe-side-card { margin: 0; }
    .bfe-grid--email { grid-template-columns: 1fr 180px; }
}

@media (max-width: 680px) {
    .bfe-app { left: 50%; padding: 14px 0 28px; width: 94vw; }
    .bfe-form-heading { padding: 24px 20px; }
    .bfe-stepper { grid-template-columns: 1fr 1fr; }
    .bfe-stepper__item:nth-child(2) { border-right: 0; }
    .bfe-stepper__item:nth-child(-n+2) { border-bottom: 1px solid var(--bfe-border); }
    .bfe-form-sidebar,
    .bfe-grid--email,
    .bfe-review-summary,
    .bfe-organization-summary { grid-template-columns: 1fr; }
    .bfe-card { padding: 18px; }
    .bfe-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .bfe-form-actions .bfe-button { width: 100%; }
    .bfe-persistent-form-nav { align-items: stretch; flex-direction: column; top: 8px; }
    body.admin-bar .bfe-persistent-form-nav { top: 58px; }
    .bfe-form-nav-button,
    .bfe-form-actions .bfe-form-nav-button { flex: 1 1 auto; min-width: 0; width: 100%; }
}

/* Organization-incorporation request uses the same corporate shell and width. */
body.bfe-organization-request-page main .page-header,
body.bfe-organization-request-page .site-content .page-header,
body.bfe-organization-request-page .site-content .page-title,
body.bfe-organization-request-page .site-content .page-title-wrap,
body.bfe-organization-request-page .site-content .page-title-section,
body.bfe-organization-request-page .site-content .titlebar,
body.bfe-organization-request-page .site-content header.entry-header,
body.bfe-organization-request-page .site-content .entry-header {
    display: none !important;
}
body.bfe-organization-request-page .site-main,
body.bfe-organization-request-page .content-area,
body.bfe-organization-request-page .entry-content {
    max-width: none;
    width: 100%;
}
.bfe-upload-box {
    background: #f8fbfd;
    border: 2px dashed #9ebfd4;
    border-radius: 12px;
    padding: 26px;
    text-align: center;
}
.bfe-upload-box label {
    color: var(--bfe-navy);
    display: block;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 14px;
}
.bfe-upload-box input[type="file"] {
    background: #fff;
    border: 1px solid #afc2d2;
    border-radius: 8px;
    max-width: 580px;
    min-height: 46px;
    padding: 9px;
    width: 100%;
}
.bfe-upload-box p { color: var(--bfe-muted); margin: 13px 0 0; }

/* Access request uses the same corporate shell and isolated public layout. */
body.bfe-access-request-page main .page-header,
body.bfe-access-request-page .site-content .page-header,
body.bfe-access-request-page .site-content .page-title,
body.bfe-access-request-page .site-content .page-title-wrap,
body.bfe-access-request-page .site-content .page-title-section,
body.bfe-access-request-page .site-content .titlebar,
body.bfe-access-request-page .site-content header.entry-header,
body.bfe-access-request-page .site-content .entry-header {
    display: none !important;
}
body.bfe-access-request-page .site-main,
body.bfe-access-request-page .content-area,
body.bfe-access-request-page .entry-content {
    max-width: none;
    width: 100%;
}
.bfe-public-form .bfe-data-item--wide { grid-column: 1 / -1; }
.bfe-inline-message { margin-bottom: 16px; }

/* 0.6.2 — gratuidad, prevención de fraude y ayudas de archivos. */
.bfe-free-notice {
    align-items: flex-start;
    background: linear-gradient(135deg, #073d68, #096b9f);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(5,42,79,.12);
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 0 20px;
    padding: 17px 20px;
}
.bfe-free-notice strong { color: #fff; font-size: 16px; }
.bfe-free-notice span { color: #dceef8; font-size: 13px; line-height: 1.55; }
.bfe-free-notice a { color: #8ce2ff; font-weight: 800; }
.bfe-upload-box small,
.bfe-field label small { color: var(--bfe-muted); font-size: 11px; font-weight: 650; }
