/* AMB privacy surface only — no theme, cart, body or checkout overrides. */
#amb-consent { --amb-ink:#4f2116; --amb-gold:#c49a63; --amb-cream:#fffaf5; --amb-consent-bottom:20px; --amb-icon-size:48px; --amb-horizontal:16px; --amb-radius:24px; --amb-primary:#4f2116; --amb-primary-label:#fff; --amb-shadow-alpha:.1; direction:rtl; position:fixed; bottom:calc(var(--amb-consent-bottom) + env(safe-area-inset-bottom,0px)); left:max(var(--amb-horizontal),env(safe-area-inset-left,0px)); z-index:9950; width:var(--amb-icon-size); font-family:Tahoma,Arial,sans-serif; font-size:14px; line-height:1.8; color:var(--amb-ink); }
#amb-consent[data-side="right"] { left:auto; right:max(var(--amb-horizontal),env(safe-area-inset-right,0px)); }
#amb-consent *, #amb-consent *::before, #amb-consent *::after { box-sizing:border-box; }
#amb-consent[hidden], #amb-consent [hidden] { display:none!important; }
#amb-consent button { font:inherit; cursor:pointer; letter-spacing:normal; text-transform:none; margin:0; box-shadow:none; min-height:44px; border:1px solid #dac9ba; border-radius:12px; padding:8px 16px; background:var(--amb-cream); color:var(--amb-ink); touch-action:manipulation; }
#amb-consent button:focus-visible, #amb-consent a:focus-visible { outline:3px solid #8b5c25; outline-offset:3px; }
#amb-consent button:disabled { cursor:wait; opacity:.65; }
#amb-consent .amb-consent-launcher { display:grid; place-items:center; width:var(--amb-icon-size); height:var(--amb-icon-size); min-height:var(--amb-icon-size); padding:0; border-radius:var(--amb-radius); color:var(--amb-primary-label); background:var(--amb-primary); border:1px solid var(--amb-gold); box-shadow:0 4px 15px rgba(79,33,22,var(--amb-shadow-alpha)); }
#amb-consent.amb-consent-animated .amb-consent-launcher { animation:amb-privacy-glow var(--amb-animation-duration,2600ms) ease-in-out var(--amb-animation-cycles,2); }
#amb-consent .amb-consent-panel { position:absolute; bottom:calc(var(--amb-icon-size) + 12px); left:0; width:min(370px,calc(100vw - 2 * var(--amb-horizontal) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))); max-height:calc(100dvh - var(--amb-consent-bottom) - env(safe-area-inset-bottom,0px) - var(--amb-icon-size) - 32px); overflow-y:auto; overscroll-behavior:contain; padding:20px; border:1px solid #e1c9ad; border-radius:min(20px,var(--amb-radius)); background:linear-gradient(145deg,#fffdfb,var(--amb-cream)); box-shadow:0 12px 45px rgba(53,24,15,var(--amb-shadow-alpha)); text-align:right; }
#amb-consent[data-side="right"] .amb-consent-panel { left:auto; right:0; }
#amb-consent header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
#amb-consent .amb-consent-brand { font-size:12px; color:#795333; font-weight:700; }
#amb-consent [data-amb-close] { padding:0; min-width:44px; border:0; background:transparent; font-size:26px; line-height:1; }
#amb-consent h2 { color:var(--amb-ink); font-family:inherit; font-size:20px; font-weight:700; line-height:1.6; margin:4px 0 10px; }
#amb-consent p { color:#655248; font-size:13px; line-height:1.9; margin:0 0 12px; }
#amb-consent .amb-consent-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
#amb-consent [data-choice] { border-color:var(--amb-ink); font-weight:700; }
#amb-consent [data-choice="yes"] { color:var(--amb-primary-label); background:var(--amb-primary); }
#amb-consent .amb-consent-settings { display:block; width:100%; margin-top:8px; border:0; background:transparent; text-decoration:underline; font-size:12px; }
#amb-consent [data-amb-details] { border-block:1px solid #e8dbcc; padding-block:10px; margin-bottom:14px; }
#amb-consent a { color:var(--amb-ink); text-decoration:underline; }
#amb-consent [data-amb-status] { font-size:11px; margin:8px 0 0; }
#amb-consent.amb-consent-hidden-mode { position:relative; bottom:auto; left:auto; right:auto; width:auto; margin:10px 16px; z-index:9950; }
#amb-consent .amb-consent-withdraw-link { background:none; border:0; text-decoration:underline; font-size:12px; }
#amb-consent.amb-consent-hidden-mode .amb-consent-panel { position:fixed; bottom:calc(var(--amb-consent-bottom) + env(safe-area-inset-bottom,0px)); left:max(var(--amb-horizontal),env(safe-area-inset-left,0px)); right:auto; }
@keyframes amb-privacy-glow { 50% { box-shadow:0 0 0 5px rgba(var(--amb-accent-rgb,196,154,99),.18),0 4px 15px rgba(79,33,22,var(--amb-shadow-alpha)); } }
@media (prefers-reduced-motion:reduce) { #amb-consent *, #amb-consent *::before, #amb-consent *::after { animation:none!important; transition:none!important; } }
@media (max-width:767px) { #amb-consent .amb-consent-panel { padding:16px; border-radius:min(17px,var(--amb-radius)); } }
@media (max-height:420px) { #amb-consent .amb-consent-panel { bottom:0; max-height:calc(100dvh - var(--amb-consent-bottom) - 32px - env(safe-area-inset-bottom,0px)); } }

#amb-consent.amb-consent-occluded { visibility:hidden; pointer-events:none; }
#amb-consent.amb-consent-hidden-mode[data-side="right"] .amb-consent-panel { left:auto; right:max(var(--amb-horizontal),env(safe-area-inset-right,0px)); }

#amb-consent.amb-consent-animated[data-animation-type="pulse"] .amb-consent-launcher { animation-name:amb-privacy-pulse; }
@keyframes amb-privacy-pulse { 50% { transform:scale(1.045); } }

/* PATCH-032: compact presentation; full explanation remains in explicit settings. */
#amb-consent .amb-consent-panel { bottom:0; width:min(340px,calc(100vw - 2 * var(--amb-horizontal) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))); padding:12px; border-radius:14px; max-height:calc(100dvh - var(--amb-consent-bottom) - env(safe-area-inset-bottom,0px) - 24px); box-shadow:0 5px 20px rgba(53,24,15,var(--amb-shadow-alpha)); }
#amb-consent header { gap:6px; }
#amb-consent h2 { margin:0; font-size:15px; line-height:1.5; }
#amb-consent [data-amb-close] { min-width:32px; min-height:32px; width:32px; height:32px; font-size:24px; }
#amb-consent .amb-consent-summary { margin:3px 0 9px; font-size:12px; line-height:1.65; }
#amb-consent .amb-consent-actions { gap:8px; }
#amb-consent [data-choice] { padding:6px 12px; min-height:40px; font-size:13px; }
#amb-consent .amb-consent-settings { min-height:28px; margin-top:4px; padding:2px 6px; font-size:11px; }
#amb-consent [data-amb-status] { margin-top:4px; }
#amb-consent.amb-consent-panel-open .amb-consent-launcher { display:none!important; }
#amb-consent.amb-consent-panel-open .amb-consent-withdraw-link { visibility:hidden; }
@media (max-width:767px) { #amb-consent .amb-consent-panel { padding:11px; } }

/* PATCH-033: reference ribbon. Visual order is shield, copy, deny/allow, close. */
#amb-consent .amb-consent-panel {
    display:grid; direction:ltr; grid-template-columns:34px minmax(0,1fr) 152px 24px;
    grid-template-rows:auto auto auto; align-items:center; column-gap:8px; row-gap:0;
    width:min(440px,calc(100vw - 2 * var(--amb-horizontal) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));
    padding:10px 12px; border:1px solid #e8e0d8; border-radius:28px;
    background:#fffdfb; box-shadow:0 3px 14px rgba(53,24,15,.10);
}
#amb-consent .amb-consent-panel header { display:contents; }
#amb-consent .amb-consent-badge { grid-column:1; grid-row:1 / 4; display:grid; place-items:center; width:34px; height:38px; border-radius:50%; background:#eee5db; color:#795333; }
#amb-consent h2 { grid-column:2; grid-row:1; direction:rtl; text-align:right; font-size:13px; line-height:1.5; }
#amb-consent .amb-consent-summary { grid-column:2; grid-row:2; direction:rtl; text-align:right; font-size:10.5px; line-height:1.5; margin:1px 0; }
#amb-consent .amb-consent-settings { grid-column:2; grid-row:3; direction:rtl; width:auto; min-height:20px; text-align:right; padding:0; margin:0; font-size:10px; line-height:1.5; border-radius:3px; }
#amb-consent .amb-consent-actions { grid-column:3; grid-row:1 / 4; direction:rtl; grid-template-columns:1fr 1fr; gap:6px; }
#amb-consent [data-choice] { min-width:0; min-height:40px; padding:5px 4px; font-size:12px; line-height:1.4; white-space:nowrap; border-radius:11px; }
#amb-consent [data-amb-close] { grid-column:4; grid-row:1 / 4; width:24px; min-width:24px; height:40px; min-height:40px; padding:0; color:#786b61; border-radius:5px; }
#amb-consent [data-amb-status] { grid-column:1 / -1; direction:rtl; }
#amb-consent button:focus:not(:focus-visible), #amb-consent a:focus:not(:focus-visible) { outline:none!important; box-shadow:none!important; }
#amb-consent button:focus-visible, #amb-consent a:focus-visible { outline:2px solid #9b6b34!important; outline-offset:2px; box-shadow:none!important; }
#amb-consent .amb-consent-launcher { border-radius:var(--amb-radius); }
/* Detail view requires an explicit settings action; the launcher always opens the ribbon. */
#amb-consent.amb-consent-expanded .amb-consent-panel { display:block; direction:rtl; width:min(370px,calc(100vw - 2 * var(--amb-horizontal) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))); padding:16px; border-radius:18px; }
#amb-consent.amb-consent-expanded header { display:flex; }
#amb-consent.amb-consent-expanded .amb-consent-badge { display:none; }
#amb-consent.amb-consent-expanded h2 { font-size:16px; }
#amb-consent.amb-consent-expanded .amb-consent-summary { font-size:12px; margin:6px 0 10px; }
#amb-consent.amb-consent-expanded [data-choice] { min-height:44px; font-size:14px; }
#amb-consent.amb-consent-expanded .amb-consent-settings { margin-top:8px; min-height:28px; text-align:center; width:100%; font-size:12px; }
@media(max-width:767px) {
    #amb-consent .amb-consent-panel { grid-template-columns:30px minmax(0,1fr) 124px 24px; column-gap:6px; padding:8px 10px; border-radius:25px; }
    #amb-consent .amb-consent-badge { width:30px; height:34px; }
    #amb-consent h2 { font-size:12px; }
    #amb-consent [data-choice] { font-size:11px; }
}

/* The ribbon heading itself opens settings, avoiding a third text row. */
#amb-consent:not(.amb-consent-expanded) h2 { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
#amb-consent:not(.amb-consent-expanded) .amb-consent-settings { grid-row:1; font-size:12px; font-weight:700; text-decoration:none; min-height:18px; }
#amb-consent:not(.amb-consent-expanded) .amb-consent-summary { grid-row:2; }
#amb-consent:not(.amb-consent-expanded) .amb-consent-panel { grid-template-rows:auto auto; }
#amb-consent:not(.amb-consent-expanded) .amb-consent-badge,
#amb-consent:not(.amb-consent-expanded) .amb-consent-actions,
#amb-consent:not(.amb-consent-expanded) [data-amb-close] { grid-row:1 / 3; }
@media(max-width:767px) {
    #amb-consent:not(.amb-consent-expanded) .amb-consent-panel { grid-template-columns:28px minmax(0,1fr) 124px 22px; column-gap:4px; padding:8px; }
    #amb-consent:not(.amb-consent-expanded) .amb-consent-badge { width:28px; }
    #amb-consent:not(.amb-consent-expanded) .amb-consent-settings { font-size:11px; }
}

/* PATCH-034: no standalone shield, even during old markup/script loading. */
#amb-consent .amb-consent-launcher { display:none!important; }

/* MKT-01: persistent inline re-entry; the panel alone remains fixed. */
#amb-consent.amb-consent-hidden-mode { position:relative; margin:10px 16px; width:auto; height:auto; }

/* PATCH-036: room for the longer explicit-decision labels. */
@media (min-width:360px) and (max-width:767px) {
    #amb-consent:not(.amb-consent-expanded) .amb-consent-panel { grid-template-columns:28px minmax(0,1fr) 136px 22px; }
}
@media (max-width:359px) {
    #amb-consent:not(.amb-consent-expanded) .amb-consent-panel { grid-template-columns:24px minmax(0,1fr) 124px 20px; column-gap:3px; }
    #amb-consent:not(.amb-consent-expanded) .amb-consent-badge { width:24px; }
    #amb-consent:not(.amb-consent-expanded) .amb-consent-settings { font-size:10px; }
    #amb-consent:not(.amb-consent-expanded) .amb-consent-summary { font-size:9px; }
    #amb-consent:not(.amb-consent-expanded) [data-choice] { font-size:10px; padding-inline:2px; }
}

/* PATCH-03812: the consent surface stays fixed and contributes no footer content. */
#amb-consent.amb-consent-hidden-mode { position:fixed; margin:0; width:var(--amb-icon-size); height:0; }
#amb-consent [data-amb-withdraw] { display:none!important; }
.amb-privacy-content-control button { cursor:pointer; text-decoration:underline; }
.amb-privacy-content-control button:focus-visible { outline:2px solid #9b6b34; outline-offset:3px; }
