/**
 * Akcepto v2 – strona oferty ([alm_offer_page]): oferty, oczekiwanie, dostęp (PESEL), brak ofert, błąd i modale.
 * Projekt: Offers / OffersNoMore / OffersReferral / Searching / Access / AccessError (.dc.html).
 */
.ak-offers,
.ak-screen,
.ak-modal {
    --ak-ink: #2A1602;
    --ak-ink2: #4A3A28;
    --ak-mut: #7A6A57;
    --ak-soft: #FFF6EC;
    --ak-acc: #FF9F0A;
    --ak-accent-text: #C26A00;
    --ak-mint: #DDF3E3;
    --ak-green: #1F8A47;
    --ak-err: #B3261E;
    font-family: 'Outfit', system-ui, sans-serif;
    color: var(--ak-ink);
}
.ak-offers *,
.ak-screen *,
.ak-modal * { box-sizing: border-box; }
.ak-offers h1, .ak-offers h2, .ak-screen h1, .ak-modal h2 { margin: 0; color: var(--ak-ink); font-family: inherit; }

/* ---------- Przyciski (pigułki) ---------- */
.ak-o-pill,
.ak-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    padding: 0 26px;
    margin: 0;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.ak-o-pill--accent,
.ak-btn--accent {
    background: var(--ak-acc);
    color: #2E1702;
}
.ak-o-pill--accent:hover, .ak-o-pill--accent:focus,
.ak-btn--accent:hover, .ak-btn--accent:focus { background: #F08F00; color: #2E1702; }
.ak-btn--accent { box-shadow: 0 8px 20px rgba(255, 159, 10, .32); }
.ak-o-pill--dark { background: var(--ak-ink); color: #fff; flex: none; }
.ak-o-pill--dark:hover, .ak-o-pill--dark:focus { background: #3F2408; color: #fff; }
.ak-btn--light { background: #fff; color: var(--ak-ink); box-shadow: inset 0 0 0 2px #EADBC8; }
.ak-btn--light:hover, .ak-btn--light:focus { background: var(--ak-soft); color: var(--ak-ink); }
.ak-o-pill:focus-visible,
.ak-btn:focus-visible { outline: 3px solid var(--ak-ink); outline-offset: 2px; }
.ak-o-pill[aria-busy="true"],
.ak-o-pill:disabled { opacity: .85; cursor: progress; }
.ak-o-pill[aria-busy="true"]::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2.6px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ak-spin 1s linear infinite;
}

/* ---------- Strona ofert ---------- */
.ak-offers { background: #fff; }
.ak-o-wrap { max-width: 1296px; margin: 0 auto; padding: 0 24px; }
.ak-o-header { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.ak-o-logo-link { display: inline-flex; }
.ak-o-logo { display: block; height: 32px; width: auto; }
/* Podwójna klasa: Kadence ma .single-content ol { padding-left: 2em; margin-bottom }, co spychało pasek do góry */
.ak-o-steps.ak-o-steps { display: flex; gap: 6px; margin: 0; padding: 6px; list-style: none; background: var(--ak-soft); border-radius: 999px; }
.ak-o-steps li { display: flex; align-items: center; gap: 8px; margin: 0; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--ak-mut); white-space: nowrap; }
.ak-o-step-dot { width: 22px; height: 22px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--ak-ink); }
.ak-o-steps li.is-done { color: var(--ak-green); }
.ak-o-steps li.is-done .ak-o-step-dot { background: var(--ak-mint); color: var(--ak-green); }
.ak-o-steps li.is-current { background: #fff; font-weight: 700; color: var(--ak-ink); box-shadow: 0 2px 8px rgba(46, 23, 2, .06); }
.ak-o-steps li.is-current .ak-o-step-dot,
.ak-o-step-mobile .ak-o-step-dot { background: var(--ak-acc); }
.ak-o-step-mobile { display: none; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--ak-soft); font-size: 14px; font-weight: 700; }
.ak-o-step-mobile .ak-o-step-dot { width: 20px; height: 20px; font-size: 11px; }

.ak-o-hero { position: relative; overflow: hidden; margin-top: 8px; padding: 40px; border-radius: 40px; background: linear-gradient(160deg, #FFE7C7 0%, #FFD49E 55%, #FFC46E 100%); }
.ak-o-hero::before { content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); pointer-events: none; }
.ak-o-hero-text { position: relative; display: flex; flex-direction: column; gap: 20px; max-width: 760px; }
.ak-o-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; color: var(--ak-ink2); }
.ak-o-tag-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--ak-mint); color: var(--ak-green); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.ak-offers .ak-o-title { font-size: 48px; line-height: 1; font-weight: 800; letter-spacing: -1.6px; }
.ak-offers .ak-o-lead { margin: 0; font-size: 19px; line-height: 1.5; color: var(--ak-ink2); }

.ak-o-tiles { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.ak-o-tile { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 1px #EEDFCB; }
.ak-o-tile.is-featured { padding-top: 22px; box-shadow: inset 0 0 0 2px var(--ak-acc); }
.ak-o-best { position: absolute; top: -13px; left: 14px; display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--ak-acc); color: var(--ak-ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ak-o-logo-box { height: 52px; border-radius: 18px; background: #fff; display: flex; align-items: center; justify-content: center; }
.ak-o-logo-box img { display: block; max-height: 30px; max-width: 70%; width: auto; object-fit: contain; }
.ak-o-logo-box strong { font-size: 18px; font-weight: 700; }
.ak-o-chip { align-self: center; display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; background: var(--ak-soft); color: var(--ak-ink2); font-size: 12px; font-weight: 600; }
.ak-o-tile.is-featured .ak-o-chip { background: #FFF1DE; color: #8A4600; }
.ak-o-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ak-o-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: #FFFAF3; }
.ak-o-stat span { font-size: 13px; color: var(--ak-mut); }
.ak-o-stat b { font-size: 22px; font-weight: 700; letter-spacing: -.3px; color: var(--ak-ink); }
.ak-o-tile .ak-o-pill { height: 50px; margin-top: auto; padding: 0 16px; font-size: 16px; }

.ak-o-more-wrap { padding-top: 40px; padding-bottom: 64px; }
.ak-o-more { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 28px 32px; border-radius: 28px; background: #fff; box-shadow: inset 0 0 0 1px #EEDFCB; }
.ak-o-more-text { display: flex; align-items: center; gap: 20px; }
.ak-o-more-text > div { display: flex; flex-direction: column; gap: 6px; }
.ak-o-more-text span { font-size: 16px; color: var(--ak-ink2); }
.ak-offers .ak-o-more h2 { font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.6px; }
.ak-o-more-icon { flex: none; width: 64px; height: 64px; border-radius: 22px; background: var(--ak-soft); display: flex; align-items: center; justify-content: center; }

.ak-o-footer { background: #fff; border-top: 1px solid #F0E4D4; }
.ak-o-footer .ak-o-wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; padding-bottom: 24px; font-size: 13px; color: var(--ak-mut); }
.ak-o-footer a { color: var(--ak-mut); text-decoration: none; }
.ak-o-footer a:hover { color: var(--ak-ink); text-decoration: underline; }

@media (max-width: 1100px) {
    .ak-o-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .ak-o-wrap { padding-left: 16px; padding-right: 16px; }
    .ak-o-steps.ak-o-steps { display: none; }
    .ak-o-step-mobile { display: inline-flex; }
    .ak-o-hero { padding: 22px 12px 14px; border-radius: 28px; }
    .ak-o-hero-text { padding: 0 8px; }
    .ak-offers .ak-o-title { font-size: 32px; letter-spacing: -1px; }
    .ak-offers .ak-o-lead { font-size: 16px; }
    .ak-o-tiles { grid-template-columns: 1fr; margin-top: 24px; }
    .ak-o-more { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
    .ak-offers .ak-o-more h2 { font-size: 21px; }
    .ak-o-more-icon { display: none; }
}

/* ---------- Ekrany pełnoekranowe: oczekiwanie, dostęp, brak ofert, błąd ---------- */
.ak-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 32px 24px 56px;
    background: linear-gradient(135deg, #FFE7C7 0%, #FFD49E 60%, #FFB547 100%);
}
.admin-bar .ak-screen { top: var(--wp-admin--admin-bar--height, 32px); }
.ak-screen--center { justify-content: center; padding-top: 56px; }
.ak-screen--center > * { flex-shrink: 0; }
.ak-screen-glow { position: absolute; width: 900px; height: 900px; right: -220px; top: -420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); pointer-events: none; }
.ak-screen-logo { position: relative; display: block; height: 48px; width: auto; font-size: 32px; font-weight: 800; }
.ak-card { position: relative; width: 100%; max-width: 600px; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 36px 40px 32px; border-radius: 28px; background: #fff; box-shadow: 0 30px 70px rgba(122, 61, 0, .20); text-align: center; }
.ak-card--narrow { max-width: 520px; gap: 20px; padding: 40px 44px 36px; }
.ak-card > .ak-btn { align-self: stretch; height: 60px; font-size: 18px; }
.ak-card-head { display: flex; flex-direction: column; gap: 8px; }
.ak-screen .ak-card-title { font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -1.4px; }
.ak-screen .ak-card-title--sm { font-size: 30px; }
.ak-accent { color: var(--ak-accent-text); }
.ak-screen .ak-card-text { margin: 0; font-size: 16px; line-height: 1.55; color: #5A4330; }
.ak-card-text strong { color: var(--ak-ink); }
.ak-processing .ak-card-text { font-size: 15px; }
.ak-drop { position: relative; width: 64px; height: 64px; border-radius: 32px 32px 32px 9px; background: #FFF1DE; display: flex; align-items: center; justify-content: center; flex: none; }
.ak-drop--error { background: #FDECEA; }

.ak-processing-icon { position: relative; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; }
.ak-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 159, 10, .55); animation: ak-pulse 2.4s ease-out infinite; }
.ak-ring--2 { animation-delay: .8s; }
.ak-ring--3 { animation-delay: 1.6s; }
.ak-timer { align-self: stretch; display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border: 1px solid #F0E3D2; border-radius: 18px; background: #FFFBF5; text-align: left; }
.ak-timer-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 15px; color: #5A4330; }
.ak-timer-time { font-size: 22px; font-weight: 700; color: var(--ak-ink); font-variant-numeric: tabular-nums; }
.ak-timer-bar { height: 8px; border-radius: 4px; background: #EFE3D3; overflow: hidden; }
.ak-timer-fill { width: 0; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #FFB547, #FF9F0A); transition: width 1s linear; }
.ak-note { align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; text-align: left; font-size: 15px; line-height: 1.4; }
.ak-note--ok { background: #EAF5EC; color: #1F5A2E; }
.ak-note[hidden] { display: none; }
.ak-note-icon { flex: none; width: 34px; height: 34px; border-radius: 17px 17px 17px 5px; background: #2E8B47; display: flex; align-items: center; justify-content: center; }
.ak-processing-foot { display: flex; justify-content: center; align-items: flex-start; gap: 8px; margin: 0; font-size: 14px; line-height: 1.5; color: #6B5540; text-align: center; }
.ak-processing-foot svg { flex: none; margin-top: 3px; }
.ak-screen [hidden] { display: none !important; }

.ak-alert { align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #F5C2BE; border-radius: 14px; background: #FDECEA; font-size: 14px; line-height: 1.45; color: #8C1D18; text-align: left; }
.ak-alert-icon { flex: none; width: 32px; height: 32px; border-radius: 16px 16px 16px 5px; background: var(--ak-err); display: flex; align-items: center; justify-content: center; }

/* Pole z etykietą na ramce (jak w formularzu) */
.ak-field { position: relative; align-self: stretch; text-align: left; }
.ak-screen .ak-input {
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0 64px 0 16px;
    border: 1.5px solid #E3D3BE;
    border-radius: 14px;
    background: #fff;
    font-family: inherit;
    font-size: 17px;
    letter-spacing: 1.5px;
    color: var(--ak-ink);
    box-shadow: none;
    outline: none;
}
.ak-screen .ak-input::placeholder { color: transparent; }
.ak-screen .ak-input:focus::placeholder { color: #B9A58C; }
.ak-screen .ak-input:focus { border-color: var(--ak-acc); box-shadow: 0 0 0 4px rgba(255, 159, 10, .18); }
.ak-float { position: absolute; left: 13px; top: 28px; z-index: 2; transform: translateY(-50%); margin: 0; padding: 0 5px; border-radius: 6px; font-size: 16px; font-weight: 500; line-height: 1.2; color: #8C7458; pointer-events: none; transition: top .15s ease, font-size .15s ease, color .15s ease, background .15s ease; }
.ak-input:focus + .ak-float,
.ak-input:not(:placeholder-shown) + .ak-float { top: 0; font-size: 12.5px; font-weight: 600; color: #6B5540; background: #fff; }
.ak-input:focus + .ak-float { color: var(--ak-accent-text); }
.ak-counter { position: absolute; right: 16px; top: 18px; font-size: 13px; color: #8C7458; }
.ak-field.has-error .ak-input { border-color: var(--ak-err); box-shadow: 0 0 0 4px rgba(179, 38, 30, .12); }
.ak-field.has-error .ak-float { color: var(--ak-err); }

@media (max-width: 700px) {
    .ak-screen { padding: 24px 12px 40px; gap: 24px; }
    .ak-screen--center { justify-content: flex-start; padding-top: 40px; }
    .ak-screen-logo { height: 40px; }
    .ak-card,
    .ak-card--narrow { padding: 28px 20px 24px; border-radius: 24px; }
    .ak-screen .ak-card-title { font-size: 28px; }
    .ak-screen .ak-card-title--sm { font-size: 26px; }
}

/* ---------- Modale (js/offers.js) ---------- */
.ak-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(30, 14, 1, .62); backdrop-filter: blur(3px); animation: ak-fade .2s ease-out; }
.ak-modal-box { position: relative; overflow: hidden; width: 100%; max-width: 500px; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 40px 26px; border-radius: 28px; background: #fff; box-shadow: 0 30px 80px rgba(122, 61, 0, .22); text-align: center; animation: ak-up .25s ease-out; }
.ak-modal-box--wide { max-width: 540px; gap: 18px; padding-bottom: 28px; }
.ak-modal-close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 12px; background: #FFF6EA; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ak-modal-close:hover, .ak-modal-close:focus { background: #FFEBD2; }
.ak-modal-icon { width: 72px; height: 72px; border-radius: 36px 36px 36px 10px; background: #FFF1DE; display: flex; align-items: center; justify-content: center; }
.ak-modal-text { display: flex; flex-direction: column; gap: 8px; }
.ak-modal .ak-modal-title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.3px; }
.ak-modal .ak-modal-desc { margin: 0; font-size: 16px; line-height: 1.55; color: #5A4330; }
.ak-modal-desc strong { color: var(--ak-ink); }
.ak-modal-actions { align-self: stretch; display: flex; flex-direction: column; gap: 10px; }
.ak-modal-box > .ak-btn,
.ak-modal-actions .ak-btn--accent { align-self: stretch; height: 58px; font-size: 18px; }
.ak-modal-actions .ak-btn--light { height: 52px; font-size: 16px; font-weight: 600; }
.ak-modal-count { font-size: 13px; color: #8C7458; }
.ak-modal-count strong { color: var(--ak-accent-text); }
.ak-modal-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #FFF1DE; }
.ak-modal-progress span { display: block; height: 100%; background: var(--ak-acc); transform-origin: left; animation: ak-shrink 5s linear forwards; }

@media (max-width: 700px) {
    .ak-modal { align-items: flex-end; padding: 12px; }
    .ak-modal-box { padding: 36px 22px 22px; }
    .ak-modal .ak-modal-title { font-size: 22px; }
}

@keyframes ak-spin { to { transform: rotate(360deg); } }
@keyframes ak-pulse { 0% { transform: scale(.55); opacity: .55; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes ak-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ak-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ak-shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.ak-spin { animation: ak-spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) {
    .ak-ring, .ak-spin, .ak-modal, .ak-modal-box, .ak-o-pill[aria-busy="true"]::before { animation: none; }
}
