/* Theme 2.6.1: installed customer card gets its own light, compact app surface.
   The full editorial landing page remains unchanged in normal web browsers. */
.paolinos-customer-masthead { display:none; }

/* Core is authoritative: inactive native Wallet providers have no visible CTA.
   The tiny visibility bridge adds/removes hidden on each individual button. */
.loyalty-wallet-preview[hidden],
.loyalty-wallet-preview button[hidden] { display:none!important; }

html.paolinos-customer-app-mode { scroll-padding-top:0; }
html.paolinos-customer-app-mode,
html.paolinos-customer-app-mode body { min-height:100%; background:#fff6e8; }
html.paolinos-customer-app-mode body { min-height:100dvh; }
html.paolinos-customer-app-mode #wpadminbar,
html.paolinos-customer-app-mode .site-header,
html.paolinos-customer-app-mode .site-footer,
html.paolinos-customer-app-mode .loyalty-hero,
html.paolinos-customer-app-mode .loyalty-story,
html.paolinos-customer-app-mode .loyalty-faq,
html.paolinos-customer-app-mode .paolinos-loyalty-page > .page-content,
html.paolinos-customer-app-mode .paolinos-loyalty-page > .entry-content,
html.paolinos-customer-app-mode .loyalty-install { display:none!important; }
html.paolinos-customer-app-mode { margin-top:0!important; }
html.paolinos-customer-app-mode body.admin-bar { margin-top:0!important; }
html.paolinos-customer-app-mode .paolinos-customer-masthead {
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0;
  padding:calc(10px + env(safe-area-inset-top, 0px)) 18px 11px;
  min-height:96px;
  background:var(--burgundy);
  color:#f8e8d0;
  text-align:center;
}
html.paolinos-customer-app-mode .paolinos-customer-masthead__brand {
  display:block;width:114px;max-width:35vw;line-height:0;
}
html.paolinos-customer-app-mode .paolinos-customer-masthead__brand img {
  display:block;width:100%;height:64px;object-fit:contain;
}
html.paolinos-customer-app-mode .paolinos-customer-masthead__caption {
  color:#f4d7b8;font:700 9px/1.4 var(--sans);letter-spacing:.14em;
}
html.paolinos-customer-app-mode #hauptinhalt {
  min-height:0;
  padding:0;
  width:100%;
}
html.paolinos-customer-app-mode .paolinos-loyalty-page { overflow:visible; }
html.paolinos-customer-app-mode .loyalty-section {
  background:#fff6e8;
  padding:clamp(14px,3vw,28px) 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
html.paolinos-customer-app-mode .loyalty-section__grid {
  display:block;
  width:100%;
  max-width:570px;
  margin:0 auto;
  padding-inline:clamp(12px,3.8vw,28px);
}
html.paolinos-customer-app-mode .loyalty-app {
  width:100%;max-width:none;min-width:0;margin:0;
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
html.paolinos-customer-app-mode .loyalty-app__topline { display:none; }
html.paolinos-customer-app-mode .loyalty-app__panel { min-height:0; }
html.paolinos-customer-app-mode .loyalty-view { padding-top:8px; }
html.paolinos-customer-app-mode .loyalty-view--card { padding-top:0; }
html.paolinos-customer-app-mode .loyalty-view__intro { margin-bottom:22px; }
html.paolinos-customer-app-mode .loyalty-view h2 { font-size:clamp(30px,7.5vw,43px); }
html.paolinos-customer-app-mode .loyalty-card {
  padding:clamp(20px,5vw,32px);
}
html.paolinos-customer-app-mode .loyalty-card h2 {
  font-size:clamp(28px,7vw,39px);
  margin:9px 0 20px;
}
html.paolinos-customer-app-mode .loyalty-card__hello { margin:9px 0 5px; }
html.paolinos-customer-app-mode .loyalty-stamps { gap:clamp(6px,2vw,12px);margin-bottom:18px; }
html.paolinos-customer-app-mode .loyalty-stamp { font-size:clamp(15px,4vw,22px); }
html.paolinos-customer-app-mode .loyalty-card__reward {margin-top:16px;padding-top:11px;}
html.paolinos-customer-app-mode .loyalty-qr {
  gap:16px;
  padding:17px 3px 16px;
}
html.paolinos-customer-app-mode .loyalty-qr__placeholder {
  width:108px;height:108px;flex:0 0 108px;
}
html.paolinos-customer-app-mode .loyalty-qr :is(canvas,img,svg) {
  max-width:100%;height:auto;
}
html.paolinos-customer-app-mode .loyalty-app__links--card {margin-top:14px;}
html.paolinos-customer-app-mode .loyalty-wallet-preview { margin-top:15px; }
html.paolinos-customer-app-mode .loyalty-view__fine { margin-top:11px; }
@media(max-width:360px){
  html.paolinos-customer-app-mode .loyalty-section__grid {padding-inline:12px;}
  html.paolinos-customer-app-mode .loyalty-qr__placeholder {width:92px;height:92px;flex-basis:92px;}
  html.paolinos-customer-app-mode .loyalty-qr {gap:10px;}
  html.paolinos-customer-app-mode .loyalty-qr strong {font-size:15px;}
}

/* v2.6.2 – The Core may focus the heading when the card view opens so screen
   readers know where they are. Headings are not keyboard controls: do not show
   Safari's sometimes bright-blue programmatic-focus rectangle on the pass. */
#loyalty-card-heading:focus,
#loyalty-card-heading:focus-visible { outline:none!important;box-shadow:none!important; }

/* Enlarge the existing, Core-generated QR without altering its payload. */
.loyalty-qr__visual {position:relative;flex:0 0 94px;width:94px;min-width:0;}
.loyalty-qr__visual .loyalty-qr__placeholder {width:100%;height:auto;min-height:94px;flex:none;}
.loyalty-qr__visual .loyalty-qr__placeholder :is(img,canvas,svg) {display:block;max-width:100%;height:auto;}
.loyalty-qr__trigger {position:absolute;inset:0;display:grid;place-items:end;border:0;border-radius:0;padding:0;background:transparent;color:#850919;cursor:zoom-in;-webkit-tap-highlight-color:transparent;}
.loyalty-qr__trigger>span {display:grid;place-items:center;min-width:25px;min-height:25px;padding:2px 4px;background:#850919;color:#fff4e3;font:700 18px/1 var(--sans);}
.loyalty-qr__trigger:disabled {cursor:default;}
.loyalty-qr__trigger:disabled>span {display:none;}
.loyalty-qr__trigger:focus-visible {outline:3px solid var(--burgundy);outline-offset:4px;}
.loyalty-qr__copy {min-width:0;}
.loyalty-qr__hint {display:block;margin-top:6px;color:#8a182b;font:600 11px/1.5 var(--sans);}
html.paolinos-customer-app-mode .loyalty-qr__visual {width:108px;flex-basis:108px;}
html.paolinos-customer-app-mode .loyalty-qr__visual .loyalty-qr__placeholder {min-height:108px;}
@media(max-width:360px){
 .loyalty-qr__visual,html.paolinos-customer-app-mode .loyalty-qr__visual {width:92px;flex-basis:92px;}
 .loyalty-qr__visual .loyalty-qr__placeholder,html.paolinos-customer-app-mode .loyalty-qr__visual .loyalty-qr__placeholder {min-height:92px;}
}
/* Native <dialog> uses the browser's top layer, safely above the PWA header and
   card animation. The red surface and QR are both viewable on smaller iPhones. */
.loyalty-qr-lightbox {position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;border:0;border-radius:0;padding:0;overflow:auto;overscroll-behavior:contain;background:#850919;color:#fff5e6;box-sizing:border-box;}
.loyalty-qr-lightbox::backdrop {background:rgba(31,1,9,.88);}
.loyalty-qr-lightbox:not([open]) {display:none!important;}
.loyalty-qr-lightbox__content {position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;min-height:100%;box-sizing:border-box;padding:calc(72px + env(safe-area-inset-top,0px)) 22px calc(36px + env(safe-area-inset-bottom,0px));text-align:center;}
.loyalty-qr-lightbox__close {position:absolute;right:max(14px,env(safe-area-inset-right,0px));top:calc(14px + env(safe-area-inset-top,0px));width:48px;height:48px;border:1px solid rgba(255,241,225,.5);border-radius:50%;background:transparent;color:#fff4e3;display:grid;place-items:center;cursor:pointer;}
.loyalty-qr-lightbox__close span {font:400 36px/1 var(--sans);transform:translateY(-2px);}
.loyalty-qr-lightbox__eyebrow {color:#f3caaa;font:700 11px/1.5 var(--sans);letter-spacing:.12em;}
.loyalty-qr-lightbox h2 {margin:13px 0 7px;color:#fff5e6;font:400 clamp(39px,10vw,64px)/1.07 var(--display);letter-spacing:-.03em;}
.loyalty-qr-lightbox h2 em {color:#f2c4a2;font-weight:400;}
.loyalty-qr-lightbox__intro {max-width:320px;margin:0 0 22px;font:400 14px/1.6 var(--sans);color:#ffe6d5;}
.loyalty-qr-lightbox__paper {width:min(78vw,356px,calc(100dvh - 290px));min-width:180px;aspect-ratio:1;box-sizing:border-box;padding:clamp(16px,5vw,26px);background:#fff;display:grid;place-items:center;box-shadow:0 15px 44px rgba(34,0,5,.20);}
.loyalty-qr-lightbox__paper :is(img,canvas,svg) {display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain;image-rendering:pixelated;}
.loyalty-qr-lightbox__code {margin:16px 0 0;max-width:100%;overflow-wrap:anywhere;font:500 12px/1.5 var(--sans);letter-spacing:.05em;color:#f5d3bd;}
.loyalty-qr-lightbox__done {margin-top:22px;padding:12px 22px;min-height:46px;border:1px solid #ffecd5;background:transparent;color:#fff4e2;font:700 12px/1.45 var(--sans);letter-spacing:.04em;cursor:pointer;}
.loyalty-qr-lightbox :is(button):focus-visible {outline:2px solid #ffe9c9;outline-offset:4px;}
@media(max-height:600px){.loyalty-qr-lightbox__content{justify-content:flex-start;padding-top:75px}.loyalty-qr-lightbox__paper{width:min(65vw,280px,calc(100dvh - 255px));min-width:150px}.loyalty-qr-lightbox h2{font-size:36px}.loyalty-qr-lightbox__intro{margin-bottom:13px}.loyalty-qr-lightbox__done{margin-top:12px}}
