/* Becas Graduacion - consent UI, isolated from WooCommerce/Storefront rules. */
.bgc-cookies {
    --bgc-ink: var(--bg-ink, #17283c);
    --bgc-accent: var(--bg-gold, #bd955e);
    --bgc-paper: #fffdf9;
    --bgc-muted: #526173;
    --bgc-line: #e9dfd2;
    --bgc-shadow: 0 -14px 46px rgba(21, 32, 47, .16);
    position: fixed;
    inset: 0;
    z-index: 999980;
    display: none;
    font-family: inherit;
    line-height: 1.5;
    color: var(--bgc-ink);
    pointer-events: none;
}
.bgc-cookies, .bgc-cookies * { box-sizing: border-box; }
.bgc-cookies.is-visible { display: block; }
.bgc-overlay { position: absolute; inset: 0; opacity: 0; background: rgba(8, 18, 30, .56); transition: opacity .15s; }
.bgc-cookies.is-modal .bgc-overlay { opacity: 1; pointer-events: auto; }
.bgc-cookies a { color: var(--bgc-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.bgc-cookies a:hover { color: #785329; }
.bgc-eyebrow { display: inline-block; color: #926c3e; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.bgc-cookies h2 { font: inherit; font-size: 21px; font-weight: 800; color: var(--bgc-ink); margin: 4px 0 0; line-height: 1.24; }
.bgc-cookies p { font-size: 13px; font-weight: 400; color: var(--bgc-muted); line-height: 1.65; margin: 9px 0 0; }
.bgc-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(16px, 3vw, 42px);
    padding: 21px max(24px, calc((100vw - 1250px) / 2));
    border-top: 3px solid var(--bgc-accent);
    background: var(--bgc-paper);
    box-shadow: var(--bgc-shadow);
}
.bgc-cookies.is-modal .bgc-bar { display: none; }
.bgc-bar-copy { min-width: 0; max-width: 740px; }
.bgc-bar-actions { display: grid; grid-template-columns: repeat(3, max-content); gap: 10px; align-items: stretch; }
.bgc-cookies button.bgc-btn,
.bgc-open-preferences {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid var(--bgc-ink);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 750;
    text-decoration: none;
    white-space: normal;
    cursor: pointer;
    transition: color .2s, background .2s, transform .2s;
}
.bgc-cookies button.bgc-btn:hover,
.bgc-open-preferences:hover { transform: translateY(-1px); }
.bgc-cookies .bgc-btn-outline { color: var(--bgc-ink); background: transparent; }
.bgc-cookies .bgc-btn-outline:hover { background: #f1e9dc; color: var(--bgc-ink); }
.bgc-cookies .bgc-btn-primary { background: var(--bgc-ink); border-color: var(--bgc-ink); color: #fff; }
.bgc-cookies .bgc-btn-primary:hover { background: #2e4460; border-color: #2e4460; color: #fff; }
.bgc-cookies .bgc-btn-secondary { background: #f6ead9; border-color: var(--bgc-accent); color: var(--bgc-ink); }
.bgc-cookies .bgc-btn-secondary:hover { background: #ead6ba; }
.bgc-open-preferences { border-color: var(--bg-gold, #bd955e); background: transparent; color: inherit; }
.bgc-cookies button:focus-visible,
.bgc-cookies a:focus-visible,
.bgc-open-preferences:focus-visible,
.bgc-cookies input:focus-visible + .bgc-switch-track { outline: 3px solid var(--bgc-accent); outline-offset: 3px; }
.bgc-modal {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(610px, calc(100vw - 24px));
    max-height: min(760px, calc(100dvh - 24px));
    overflow: hidden;
    pointer-events: auto;
    flex-direction: column;
    border: 1px solid #e6d8c5;
    border-top: 4px solid var(--bgc-accent);
    border-radius: 16px;
    background: var(--bgc-paper);
    box-shadow: 0 25px 90px rgba(5, 15, 28, .32);
}
.bgc-cookies.is-modal .bgc-modal { display: flex; }
.bgc-modal-head { flex: 0 0 auto; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 21px 24px 18px; border-bottom: 1px solid var(--bgc-line); }
.bgc-cookies .bgc-close { appearance: none; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid var(--bgc-line); border-radius: 50%; padding: 0; background: #fff; color: var(--bgc-ink); cursor: pointer; font-family: inherit; font-size: 26px; font-weight: 400; line-height: 1; }
.bgc-modal-body { overflow: auto; padding: 10px 24px 17px; }
.bgc-modal-body > p { margin: 4px 0 14px; }
.bgc-group { padding: 13px 0; border-top: 1px solid var(--bgc-line); }
.bgc-group:last-child { border-bottom: 1px solid var(--bgc-line); }
.bgc-group-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bgc-cookies button.bgc-group-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 30px; padding: 0; border: 0; background: transparent; color: var(--bgc-ink); font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; text-align: left; }
.bgc-chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.bgc-group-toggle[aria-expanded="true"] .bgc-chevron { transform: rotate(45deg); }
.bgc-always { color: #347054; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bgc-cookies p.bgc-group-description { margin: 9px 8px 0 17px; font-size: 12px; }
.bgc-cookies [hidden] { display: none !important; }
.bgc-switch { position: relative; flex: 0 0 46px; width: 46px; height: 26px; cursor: pointer; }
.bgc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.bgc-switch-track { pointer-events: none; display: block; width: 100%; height: 100%; border-radius: 16px; background: #afb6bf; transition: background .15s; }
.bgc-switch-track::after { content: ''; position: absolute; top: 4px; left: 4px; width: 18px; height: 18px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .15s; }
.bgc-switch input:checked + .bgc-switch-track { background: #397258; }
.bgc-switch input:checked + .bgc-switch-track::after { transform: translateX(20px); }
.bgc-modal-actions { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 9px; padding: 15px 22px 19px; border-top: 1px solid var(--bgc-line); background: #fffaf4; }
.bgc-cookies .bgc-modal-actions .bgc-btn { width: 100%; padding-left: 9px; padding-right: 9px; }
body.bgc-lock { overflow: hidden; }
@media (max-width: 1080px) {
    .bgc-bar { grid-template-columns: 1fr; gap: 16px; padding: 18px 22px; }
    .bgc-bar-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
    .bgc-bar { padding: 16px 15px calc(14px + env(safe-area-inset-bottom)); max-height: 82dvh; overflow: auto; }
    .bgc-bar h2, .bgc-modal h2 { font-size: 18px; }
    .bgc-bar p { font-size: 12px; }
    .bgc-bar-actions { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .bgc-modal { max-height: calc(100dvh - 16px); }
    .bgc-modal-head { padding: 15px 15px 12px; }
    .bgc-modal-body { padding: 10px 15px 12px; }
    .bgc-modal-actions { padding: 12px 15px calc(12px + env(safe-area-inset-bottom)); grid-template-columns: minmax(0, 1fr); }
    .bgc-cookies .bgc-btn { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .bgc-cookies *, .bgc-open-preferences { transition: none !important; }
}

/* Preferences control appended to the published cookie-policy page. */
.bgc-manage-policy { margin-top: 24px; padding: 20px; border: 1px solid #e9dfd2; border-radius: 12px; background: #fffdf9; }
.bgc-manage-policy p { margin: 0 0 12px; font-weight: 600; }
.bgc-manage-policy .bgc-open-preferences { color: #17283c; border-color: #bd955e; }
