/* ── Full-bleed override that works WITHOUT body class ──────────────────
   Uses :has() (Chrome 105+, FF 121+, Safari 15.4+) to neutralize ancestor
   containers whenever #psico-root is on the page. Combined with direct
   high-specificity rules that beat the :where()-based Gutenberg constraint.
   ─────────────────────────────────────────────────────────────────────── */
.wp-site-blocks:has(#psico-root),
.wp-block-post-content:has(#psico-root),
.is-layout-constrained:has(#psico-root),
.has-global-padding:has(#psico-root),
.entry-content:has(#psico-root) {
    max-width: none !important;
    --wp--style--global--content-size: 100vw !important;
    --wp--style--global--wide-size: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
    contain: none !important;
}
/* High-specificity rule beats the zero-specificity :where() Gutenberg rule */
.is-layout-constrained > #psico-root {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── Neutralize Gutenberg block theme constraints on the booking page ── */
body.has-psico-booking {
    background: #f8fafc !important;
    overflow-x: hidden;
}
body.has-psico-booking .site-header,
body.has-psico-booking header.site-header,
body.has-psico-booking #masthead,
body.has-psico-booking .site-footer,
body.has-psico-booking footer.site-footer,
body.has-psico-booking #colophon,
body.has-psico-booking nav.navbar,
body.has-psico-booking .wp-block-template-part {
    display: none !important;
}
body.has-psico-booking .wp-site-blocks,
body.has-psico-booking .wp-block-post-content,
body.has-psico-booking .entry-content,
body.has-psico-booking .has-global-padding,
body.has-psico-booking .is-layout-constrained,
body.has-psico-booking .wp-block-post-content-is-layout-constrained,
body.has-psico-booking #primary,
body.has-psico-booking #content,
body.has-psico-booking main:not(.ep-main),
body.has-psico-booking article,
body.has-psico-booking .site-content,
body.has-psico-booking .container {
    max-width: none !important;
    --wp--style--global--content-size: 100vw !important;
    --wp--style--global--wide-size: 100vw !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow: visible !important;
    contain: none !important;
    float: none !important;
}

.psico-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

:root {
    --p-teal:   #0f6466;
    --p-dark:   #0b4d4f;
    --p-light:  #f0fafa;
    --p-ring:   rgba(15,100,102,.12);
    --p-s50:    #f8fafc;
    --p-s100:   #f1f5f9;
    --p-s200:   #e2e8f0;
    --p-s300:   #cbd5e1;
    --p-s400:   #94a3b8;
    --p-s500:   #64748b;
    --p-s600:   #475569;
    --p-s700:   #334155;
    --p-s800:   #1e293b;
    --p-s900:   #0f172a;
}

.psico-wrap {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    background: linear-gradient(145deg, #f8fafc 0%, rgba(240,250,250,.6) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    color: var(--p-s800);
    box-sizing: border-box;
}
.psico-wrap * { box-sizing: border-box; }

/* Fade in */
.psico-fade { animation: pFadeIn .4s ease-out both; }
@keyframes pFadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ── STEP 1 ── */
.psico-step1 { width: 100%; max-width: 920px; }

/* Header */
.psico-header { text-align: center; margin-bottom: 36px; }
.psico-brand {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--p-teal); font-weight: 700; font-size: 13px;
    background: white; padding: 7px 16px; border-radius: 99px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06); border: 1px solid rgba(15,100,102,.12);
    margin-bottom: 20px;
}
.psico-header h1 { font-size: 2.4rem; font-weight: 800; color: var(--p-s900); margin: 0 0 10px; line-height: 1.1; }
.psico-header .psico-subtitle { color: var(--p-s500); font-size: 15px; margin: 0; }
.psico-header .psico-subtitle strong { color: var(--p-s800); font-weight: 700; }

/* Card */
.psico-card {
    background: white;
    border-radius: 28px;
    box-shadow: 0 8px 48px rgba(0,0,0,.06);
    border: 1px solid var(--p-s100);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
@media (min-width: 720px) { .psico-card { flex-direction: row; } }

/* Calendar column */
.psico-cal-col { padding: 32px; flex: 1; border-bottom: 1px solid var(--p-s100); }
@media (min-width: 720px) { .psico-cal-col { border-bottom: none; border-right: 1px solid var(--p-s100); } }

.psico-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.psico-col-head h2 { font-size: 13px; font-weight: 700; color: var(--p-s800); margin: 0; display: flex; align-items: center; gap: 8px; }

.psico-step-badge {
    width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
    background: var(--p-s100); color: var(--p-s500);
    font-size: 10px; font-weight: 800; display: inline-flex;
    align-items: center; justify-content: center;
}
.psico-step-badge.dim { background: var(--p-s100); color: var(--p-s300); }

.psico-nav-btns { display: flex; gap: 6px; }
.psico-nav-btns button {
    width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid var(--p-s200); background: white;
    color: var(--p-s400); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px; transition: all .15s;
}
.psico-nav-btns button:hover { color: var(--p-s800); border-color: var(--p-s400); }

.psico-month-lbl { text-align: center; font-weight: 600; font-size: 14px; color: var(--p-s700); margin: 0 0 14px; }

.psico-wk-hdr { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; margin-bottom: 6px; }
.psico-wk-hdr span { font-size: 10px; font-weight: 700; color: var(--p-s400); padding: 2px 0; }
.psico-wk-hdr span.wknd { color: var(--p-s300); }

/* Calendar grid */
.psico-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }

.psico-day {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all .15s;
    border: none; background: none; color: var(--p-s700);
    font-family: inherit;
}
.psico-day:hover { background: var(--p-s100); }
.psico-day.past,
.psico-day.wknd { color: var(--p-s300); cursor: default; pointer-events: none; }
.psico-day.today { border: 1.5px solid var(--p-teal); color: var(--p-teal); font-weight: 700; }
.psico-day.today:hover { background: var(--p-light); }
.psico-day.sel { background: var(--p-teal); color: white; font-weight: 700; }
.psico-day.sel:hover { background: var(--p-dark); }
.psico-day.sel.today { border-color: transparent; }

/* Times column */
.psico-times-col { padding: 32px; flex: 1; background: rgba(248,252,252,.7); display: flex; flex-direction: column; }
.psico-times-col h2 { font-size: 13px; font-weight: 700; color: var(--p-s800); margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.psico-date-lbl { font-size: 12px; color: var(--p-s400); margin: 0 0 20px 30px; min-height: 18px; }

.psico-time-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; flex: 1; align-content: start; margin-bottom: 20px; min-height: 140px; }
@media (min-width: 360px) { .psico-time-grid { grid-template-columns: repeat(3,1fr); } }

.psico-time-placeholder { grid-column: 1/-1; text-align: center; padding: 28px 0; color: var(--p-s300); }
.psico-time-placeholder i { display: block; font-size: 28px; margin-bottom: 10px; }
.psico-time-placeholder p { font-size: 12px; line-height: 1.4; margin: 0; color: var(--p-s400); }

.psico-time-btn {
    border: 1.5px solid var(--p-s200); border-radius: 10px;
    padding: 9px 4px; font-size: 13px; font-weight: 600;
    color: var(--p-s600); background: white; cursor: pointer;
    transition: all .15s; font-family: inherit; text-align: center;
}
.psico-time-btn:hover { border-color: var(--p-teal); color: var(--p-teal); }
.psico-time-btn.sel { border-color: var(--p-teal); background: var(--p-light); color: var(--p-teal); box-shadow: 0 0 0 3px var(--p-ring); }
.psico-time-btn.booked { opacity: .35; cursor: not-allowed; text-decoration: line-through; pointer-events: none; }

/* Confirm button */
.psico-confirm-btn {
    width: 100%; padding: 13px; border-radius: 12px;
    font-size: 14px; font-weight: 700; cursor: not-allowed;
    border: none; background: var(--p-s200); color: var(--p-s400);
    transition: all .2s; font-family: inherit;
}
.psico-confirm-btn.ready {
    cursor: pointer; background: var(--p-teal); color: white;
    box-shadow: 0 4px 18px rgba(15,100,102,.28);
}
.psico-confirm-btn.ready:hover { background: var(--p-dark); }
.psico-confirm-btn.loading { cursor: default; opacity: .75; }

/* Session counter badge */
.psico-scount {
    margin-left: 6px; font-size: 10px; font-weight: 700;
    background: var(--p-light); color: var(--p-teal);
    border: 1px solid rgba(15,100,102,.2); border-radius: 99px;
    padding: 2px 8px; white-space: nowrap;
}

/* Booked sessions list (below calendar) */
.psico-booked-list { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.psico-booked-item {
    display: flex; align-items: center; gap: 8px;
    background: var(--p-light); border: 1px solid rgba(15,100,102,.15);
    border-radius: 10px; padding: 7px 10px; font-size: 12px;
}
.psico-booked-num {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    background: var(--p-teal); color: white;
    font-size: 9px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.psico-booked-lbl { flex: 1; color: var(--p-s700); font-weight: 500; }
.psico-booked-chk { color: var(--p-teal); font-size: 11px; }

/* Success sessions list (step 2) */
.psico-success-sessions { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.psico-success-session {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px;
}
.psico-success-sn {
    width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
    background: var(--p-teal); color: white;
    font-size: 9px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.psico-success-sl { color: var(--p-s700); font-weight: 600; }

/* Meta bar */
.psico-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; margin-top: 20px; }
.psico-meta span { font-size: 11px; color: var(--p-s400); display: flex; align-items: center; gap: 5px; font-weight: 500; }
.psico-meta i { color: var(--p-teal); opacity: .8; font-size: 12px; }

/* ── STEP 2 ── */
.psico-step2 { width: 100%; max-width: 500px; display: none; }

.psico-success-card {
    background: white; border-radius: 28px;
    box-shadow: 0 8px 48px rgba(0,0,0,.06); border: 1px solid var(--p-s100);
    padding: 40px 32px; text-align: center;
}

.psico-check-icon {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--p-light); border: 1px solid rgba(15,100,102,.18);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px; color: var(--p-teal); font-size: 26px;
}
.psico-success-card h2 { font-size: 1.7rem; font-weight: 800; color: var(--p-s900); margin: 0 0 8px; }
.psico-success-card > p { color: var(--p-s500); font-size: 14px; margin: 0 0 28px; }

.psico-detail-box { background: var(--p-s50); border: 1px solid var(--p-s100); border-radius: 18px; padding: 20px; text-align: left; margin-bottom: 24px; }
.psico-detail-ttl { font-size: 10px; font-weight: 700; color: var(--p-s400); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 16px; }

.psico-detail-row { display: flex; align-items: flex-start; gap: 12px; }
.psico-detail-row + .psico-detail-row { margin-top: 16px; }
.psico-detail-ico {
    width: 34px; height: 34px; border-radius: 50%; background: white;
    border: 1px solid var(--p-s200); display: flex; align-items: center;
    justify-content: center; color: var(--p-teal); flex-shrink: 0; font-size: 13px;
}
.psico-detail-k { font-size: 10px; font-weight: 600; color: var(--p-s400); margin-bottom: 2px; }
.psico-detail-v { font-size: 14px; font-weight: 700; color: var(--p-s800); }
.psico-detail-v-sm { font-size: 13px; font-weight: 600; color: var(--p-s700); }
.psico-hr { border: none; border-top: 1px solid var(--p-s200); margin: 16px 0; }

.psico-link-row { display: flex; gap: 8px; margin-top: 8px; }
.psico-link-inp {
    flex: 1; border: 1px solid var(--p-s200); border-radius: 8px;
    padding: 8px 10px; font-size: 11px; color: var(--p-s600);
    background: white; font-family: monospace; outline: none; min-width: 0;
}
.psico-link-inp:focus { border-color: var(--p-teal); }
.psico-copy-btn {
    border: none; background: var(--p-s100); border-radius: 8px;
    padding: 8px 12px; font-size: 11px; font-weight: 700; color: var(--p-s700);
    cursor: pointer; display: flex; align-items: center; gap: 5px;
    white-space: nowrap; font-family: inherit; transition: background .15s; flex-shrink: 0;
}
.psico-copy-btn:hover { background: var(--p-s200); }
.psico-link-note { font-size: 11px; color: var(--p-s400); margin-top: 6px; display: flex; align-items: center; gap: 4px; }

.psico-actions { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 400px) { .psico-actions { flex-direction: row; } }

.psico-btn-outline {
    flex: 1; border: 1px solid var(--p-s200); background: white;
    color: var(--p-s700); font-weight: 600; border-radius: 12px;
    padding: 12px; cursor: pointer; font-size: 13px; font-family: inherit;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: background .15s;
}
.psico-btn-outline:hover { background: var(--p-s50); }
.psico-btn-fill {
    flex: 1; background: var(--p-teal); color: white;
    font-weight: 700; border: none; border-radius: 12px;
    padding: 12px; cursor: pointer; font-size: 13px; font-family: inherit;
    box-shadow: 0 4px 14px rgba(15,100,102,.22); transition: background .15s;
}
.psico-btn-fill:hover { background: var(--p-dark); }

.psico-footer-txt { text-align: center; font-size: 11px; color: var(--p-s400); margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* Loading spinner */
.psico-time-placeholder .fa-spinner { color: var(--p-teal); }

/* Error inline message */
.psico-booking-error {
    display: none;
    background: #fef2f2; border: 1px solid #fecaca;
    color: #b91c1c; border-radius: 10px;
    padding: 10px 14px; font-size: 12px; font-weight: 600;
    margin-top: 10px; text-align: center;
}

/* Amelia not configured notice */
.psico-time-placeholder.error { color: #b91c1c; }
.psico-time-placeholder.error i { color: #f87171; }
