/* /store/calendars/ page: covers, open calendar, back-cover slider, picker rows, estimate and Pay (picker.js). */
.cals{max-width:980px;margin:0 auto}
.cals *{box-sizing:border-box}

/* Main image: five front covers laid on a table. Each cover sits in one of five slots;
   tapping a cover swaps its slot with the centre one and brings it to the front.
   Slot positions keep every cover, tilted, fully inside the image. */
.cals-hero{--ratio:900/380;position:relative;aspect-ratio:var(--ratio);background:transparent;border-radius:10px;overflow:hidden;margin-bottom:24px;transition:height .45s ease}
.cals-hero.cals-sized{aspect-ratio:auto}
.cals-cover{position:absolute;width:30%;aspect-ratio:9/7;left:var(--x);top:var(--y);transform:rotate(var(--r));z-index:var(--z);padding:0;margin:0;border:0;border-top:10px solid #fff;border-radius:3px;background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.28);cursor:pointer;transition:transform .35s,box-shadow .35s,left .35s,top .35s,width .35s}
.cals-cover img{display:block;width:100%;height:100%;object-fit:cover;border-radius:0 0 3px 3px}
.cals-cover::before{content:"";position:absolute;top:-9px;left:8px;right:8px;height:6px;background:repeating-linear-gradient(90deg,#555 0 3px,transparent 3px 7px)}
.cals-cover:focus-visible{outline:3px solid #0570de;outline-offset:3px}
.cals-slot-0{--x:3%;--y:30%;--r:-8deg;--z:1;--mx:4%;--my:5%}
.cals-slot-1{--x:19.5%;--y:14%;--r:-3deg;--z:2;--mx:50%;--my:5%}
.cals-slot-2{--x:35%;--y:30%;--r:2deg;--z:5;--mx:27%;--my:31%}
.cals-slot-3{--x:51%;--y:13%;--r:5deg;--z:3;--mx:4%;--my:56%}
.cals-slot-4{--x:65.5%;--y:30%;--r:9deg;--z:4;--mx:49%;--my:56%}
.cals-cover.cals-front{z-index:10;left:50%;top:50%;transform:translate(-50%,-50%) scale(1.26);box-shadow:0 18px 40px rgba(0,0,0,.4)}
.cals-cover.cals-front::after{content:"Look inside";position:absolute;right:6px;bottom:6px;padding:3px 9px;border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font:600 11px/1.3 system-ui,sans-serif;pointer-events:none}

/* Open calendar (picker.js sets --bw/--bh, the page size fitted to the hero width and the
   viewport height, and --sw, the width of the other covers, which wait in a row along the bottom).
   Like a hanging wall calendar the wire runs across the middle of the page: the top half is a
   month's photo, the bottom half its grid, and a sheet turns by swinging over the wire toward the
   viewer. The front cover lies over the top half and lifts up off its own wire at its top edge. */
.cals-open-cal{position:absolute;left:0;right:0;top:0;z-index:20;padding:10px 12px;opacity:0;transition:opacity .3s}
.cals-open .cals-open-cal{opacity:1}
.cals-open-cal:focus{outline:none}
.cals-open-cal:focus-visible{outline:3px solid #0570de;outline-offset:-3px}
.cals-oc-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
.cals-oc-title{flex:1 1 9em;min-width:0;margin:0;font-size:14px;line-height:1.3}
.cals-oc-title strong,.cals-oc-label{display:block}
.cals-oc-btn{width:32px;height:32px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.9);color:#222;font-size:24px;line-height:1;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.2)}
.cals-oc-btn:disabled{opacity:.35;cursor:default}
.cals-oc-close{padding:6px 4px;border:0;background:none;color:inherit;font-size:14px;text-decoration:underline;cursor:pointer}
.cals-oc-btn:focus-visible,.cals-oc-close:focus-visible{outline:3px solid #0570de;outline-offset:2px}
.cals-book{position:relative;width:var(--bw);height:var(--bh);margin:8px auto 0;perspective:1400px;cursor:pointer;border-radius:3px;background:#fbfaf7;box-shadow:0 6px 18px rgba(0,0,0,.25)}
.cals-book::after{content:"";position:absolute;z-index:3;top:calc(50% - 3px);left:8px;right:8px;height:6px;background:repeating-linear-gradient(90deg,#555 0 3px,transparent 3px 7px);pointer-events:none}
.cals-pg,.cals-face{position:absolute;left:0;width:100%;height:50%;background-repeat:no-repeat}
.cals-pg-top{top:0;border-radius:3px 3px 0 0}
.cals-pg-bot{top:50%;border-radius:0 0 3px 3px}
.cals-leaf{position:absolute;z-index:2;left:0;width:100%;height:50%;transform:rotateX(0deg);transform-style:preserve-3d;transition:transform .7s cubic-bezier(.45,.05,.35,1)}
.cals-face{top:0;height:100%;background-color:#fbfaf7;backface-visibility:hidden;box-shadow:0 2px 10px rgba(0,0,0,.22)}
.cals-face.cals-back{transform:rotateX(180deg)}
.cals-lo{top:50%;transform-origin:top center}
.cals-hi{top:0;transform-origin:bottom center}
.cals-lo.cals-turn{transform:rotateX(180deg)}
.cals-hi.cals-turn{transform:rotateX(-180deg)}
.cals-cv{top:0;transform-origin:top center}
.cals-cv::before{content:"";position:absolute;z-index:1;top:-4px;left:8px;right:8px;height:6px;background:repeating-linear-gradient(90deg,#555 0 3px,transparent 3px 7px);backface-visibility:hidden}
.cals-cv.cals-up{transform:rotateX(90deg)}
.cals-open .cals-cover:not(.cals-front){width:var(--sw);left:calc(50% + (var(--k) - 2) * (var(--sw) + 8px) + 4px);top:calc(100% - var(--sw) * 7 / 9 - 10px);transform:none;z-index:1;box-shadow:0 3px 8px rgba(0,0,0,.25)}
.cals-open .cals-cover.cals-front{visibility:hidden}

/* Gallery slider: back covers. */
.cals-gallery{position:relative;margin-bottom:8px}
.cals-slider{position:relative;display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px;padding-bottom:8px}
.cals-slide{flex:0 0 82%;scroll-snap-align:center;margin:0;cursor:pointer}
.cals-slide img{display:block;width:100%;height:auto;border-radius:6px;box-shadow:0 4px 14px rgba(0,0,0,.18)}
.cals-slide figcaption{font-weight:600;margin-top:6px}
/* Nudges that the calendars can be opened: a hint chip on the main image (fades after the first
   tap), a one-time hop of the centre cover, and a "Look inside" pill on each back cover. */
.cals-hint{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);z-index:15;margin:0;padding:5px 12px 5px 10px;border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font:600 12px/1.3 system-ui,sans-serif;white-space:nowrap;pointer-events:none;transition:opacity .4s}
.cals-hint::before{content:"\1F446";margin-right:6px}
.cals-hero.cals-touched .cals-hint,.cals-hero.cals-open .cals-hint{opacity:0}
.cals-slide{position:relative}
.cals-slide::after{content:"Look inside";position:absolute;right:10px;top:10px;padding:3px 9px;border-radius:999px;background:rgba(0,0,0,.72);color:#fff;font:600 11px/1.3 system-ui,sans-serif;pointer-events:none}
@keyframes cals-nudge{0%,40%,80%,100%{translate:0 0}20%{translate:0 -10px}60%{translate:0 -6px}}
.cals-cover.cals-nudge{animation:cals-nudge 1.1s ease-in-out}
@media (prefers-reduced-motion:reduce){.cals-cover.cals-nudge{animation:none}}
.cals-arrow{position:absolute;top:calc(50% - 40px);width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.85);color:#222;font-size:28px;line-height:1;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.25)}
.cals-prev{left:6px}
.cals-next{right:6px}

/* Picker rows. */
.cals-picker{margin-top:26px;border-top:1px solid rgba(128,128,128,.35)}
.cals-row{cursor:pointer;display:grid;grid-template-columns:28px 64px 1fr 84px 96px;align-items:center;gap:12px;padding:10px 6px;border-bottom:1px solid rgba(128,128,128,.2)}
.cals-locked .cals-row{cursor:default}
.cals-row.cals-on{background:rgba(184,74,38,.08)}
.cals-row img{display:block;width:64px;height:auto;border-radius:3px}
.cals-row input[type=checkbox]{width:20px;height:20px;margin:0;cursor:pointer}
.cals-row input[type=number]{width:70px;padding:6px;font-size:15px}
.cals-row input[type=number]:disabled{opacity:.35;pointer-events:none}
.cals-price{opacity:.8;text-align:right;white-space:nowrap}
.cals-price small{font-size:inherit}
.cals-mp{display:none;opacity:.75;font-size:13px}
/* Tip row: same grid as the calendar rows, name in the name column and the amount under the quantities. */
.cals-tip{display:grid;grid-template-columns:28px 64px 1fr 84px 96px;align-items:center;gap:12px;padding:10px 6px;border-bottom:1px solid rgba(128,128,128,.2)}
.cals-tip-img{grid-column:2;display:block;width:64px;height:auto;border-radius:3px}
.cals-tip .cals-nm{grid-column:3}
.cals-tip .cals-nm span,.cals-tip .cals-nm small{display:block}
.cals-tip small{opacity:.75;font-size:13px}
.cals-tip-icon{width:1.2em;height:1.2em;vertical-align:-.25em;margin-right:5px}
.cals-tip-in{grid-column:4;display:flex;align-items:center;gap:4px;margin-left:-14px}
.cals-tip-in input{width:70px;padding:6px;font-size:15px}
.cals-tip-in input:disabled{opacity:.35}
/* The tip's message box: shown once a tip is entered, lined up under the tip's name. */
.cals-tip:has(+ .cals-tip-msg:not([hidden])){border-bottom:0}
.cals-tip-msg{padding:0 6px 12px 122px;border-bottom:1px solid rgba(128,128,128,.2)}
.cals-tip-msg textarea{display:block;box-sizing:border-box;width:100%;max-width:440px;padding:6px 8px;font:inherit;font-size:15px;line-height:1.4;resize:vertical}
.cals-tip-msg textarea:disabled{opacity:.35}

/* Estimate and Pay. */
.cals-pay{margin-top:18px;display:flex;flex-direction:column;align-items:flex-end;gap:10px;text-align:right}
.cals-est{margin:0;font-weight:700;font-size:15px}
.cals-est span{display:block}
.cals-pay-btn{font-size:17px;padding:12px 28px;border:0;border-radius:6px;background:#b84a26;color:#fff;cursor:pointer}
.cals-pay-btn:disabled{opacity:.45;cursor:not-allowed}
/* Last thing on the page, below the picker and the checkout. */
.cals-returns{max-width:980px;margin:32px auto 0;text-align:center;font-size:13px;line-height:1.45;opacity:.75}
.cals-returns a{color:inherit}
#store-checkout:not(:empty){max-width:980px;margin:24px auto 0}
/* Pay scrolls the checkout to the top of the view; keep a little room above the intro. */
#store-checkout{scroll-margin-top:16px}

@media (max-width:600px){
  .cals-hero{--ratio:1/1.05}
  .cals-cover{width:46%;left:var(--mx);top:var(--my)}
  .cals-cover.cals-front{transform:translate(-50%,-50%) scale(1.83)}
  .cals-slide{flex-basis:92%}
  .cals-arrow{display:none}
  .cals-row{grid-template-columns:24px 48px 1fr 64px}
  .cals-row img,.cals-tip-img{width:48px}
  .cals-row input[type=number]{width:64px;justify-self:end;text-align:right}
  .cals-tip{grid-template-columns:24px 48px 1fr 64px}
  .cals-tip-in{margin-left:0;justify-content:flex-end}
  .cals-tip-in input{width:52px;text-align:right}
  .cals-tip-msg{padding-left:102px}
  .cals-price{display:none}
  .cals-mp{display:block}
}
@media (prefers-reduced-motion:reduce){
  .cals-cover,.cals-hero{transition:none}
  .cals-leaf{transition:none}
}
@media (prefers-color-scheme:dark){
  .cals-hero{background:transparent}
  .cals-row.cals-on{background:rgba(255,140,100,.12)}
}
