/* Every gift keeps its original calendar footprint, including while opening.
   Load after vault.css. Long reward details scroll inside that same gift. */
.calendar-grid>.gift-slot,
.calendar-grid>.gift-slot.is-selected{
  grid-column:auto;
  grid-row:auto;
  aspect-ratio:.86;
  height:auto;
  min-height:0;
  margin:0;
  align-self:start;
}
.gift-slot>.day.is-unwrapping{animation:none}
.gift-slot.is-selected:not([data-phase=open])>.day,
.gift-slot.is-selected:not([data-phase=open])>.day:hover{transform:none}

/* Selection changes the door state, never its decoration scale. */
.gift-slot .day-number,
.gift-slot.is-selected .day-number{font-size:clamp(35px,3.5vw,59px);top:30%}
.gift-slot .day-top,
.gift-slot.is-selected .day-top{font-size:6px;top:13px;left:13px;right:13px}
.gift-slot .day-symbol,
.gift-slot.is-selected .day-symbol{font-size:15px}
.gift-slot .day-bottom,
.gift-slot.is-selected .day-bottom{font-size:6px;left:14px;right:14px;bottom:13px}
.gift-slot .gift-lock,
.gift-slot.is-selected .gift-lock{width:23px;height:25px;right:16%;border-radius:5px}
.gift-slot .gift-lock:before,
.gift-slot.is-selected .gift-lock:before{width:11px;height:12px;top:-10px;left:5px;border-width:3px}
.gift-slot .gift-lock i,
.gift-slot.is-selected .gift-lock i{width:4px;height:8px;left:9px;top:9px}
.gift-slot .gift-bow:before,
.gift-slot .gift-bow:after,
.gift-slot.is-selected .gift-bow:before,
.gift-slot.is-selected .gift-bow:after{border-width:5px}
.gift-slot .claim-mark,
.gift-slot.is-selected .claim-mark{font-size:75px;top:27%}

.gift-slot>.gift-interior,
.gift-slot[data-revealed=true]>.gift-interior{
  position:absolute;
  inset:0;
  width:auto;
  height:auto;
  min-height:0;
  max-height:100%;
  overflow:hidden;
  justify-content:flex-start;
}

/* Opening/inspection controls also stay inside the normal-sized box. */
.gift-slot:not([data-revealed=true])>.gift-interior{
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
}
.gift-slot .gift-secret{flex:0 0 auto;padding:4px 6px}
.gift-slot .gift-secret>span{font-size:26px;line-height:1}
.gift-slot .gift-secret>p{font-size:12px;line-height:1.35;margin:4px 0}
.gift-slot .gift-opening-controls{flex:0 0 auto;padding:3px 6px 6px;min-width:0}
.gift-slot .gift-opening-caption{font-size:11px;line-height:1.4;min-height:0;margin:3px 0 5px;overflow-wrap:anywhere}
.gift-slot .gift-opening-cancel,
.gift-slot .gift-opening-skip{
  display:block;
  width:100%;
  min-width:44px;
  min-height:44px;
  padding:7px 3px;
  margin:3px 0;
  font-size:11px;
  line-height:1.3;
  white-space:normal;
  overflow-wrap:anywhere;
}

/* One internal scroll surface keeps all conditions and actions reachable.
   There is no line clamp, hidden text, expanded row or separate panel. */
#day-dialog.gift-inline-detail{
  position:relative;
  flex:1 1 auto;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  max-height:100%;
  padding:4px 6px 6px;
  margin:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scroll-padding-block:48px 6px;
  overflow-wrap:anywhere;
  hyphens:auto;
}
.gift-inline-detail .gift-detail-close{
  position:sticky;
  display:flex;
  align-items:center;
  justify-content:center;
  top:0;
  right:auto;
  z-index:6;
  width:44px;
  height:44px;
  min-width:44px;
  min-height:44px;
  padding:0;
  margin:0 0 4px auto;
  background:#f7ecd7;
  border:1px solid #d5c4a5;
  border-radius:4px;
  font-size:25px;
  line-height:1;
}
.gift-inline-detail .gift-from-santa{font-size:9px;line-height:1.35;letter-spacing:.2px;margin:0 0 7px}
.gift-inline-detail .eyebrow{font-size:9px;line-height:1.35;letter-spacing:.2px;margin:0 0 6px}
.gift-inline-detail h2{font-size:16px;line-height:1.18;letter-spacing:-.2px;margin:0 0 8px}
.gift-inline-detail .inline-product{display:block;float:none;width:40px;height:40px;margin:6px auto;object-fit:contain}
.gift-inline-detail .inline-product.product-image{padding:3px}
.gift-inline-detail #dialog-description{font-size:12px;line-height:1.45;margin:8px 0}
.gift-inline-detail .dialog-detail{font-size:12px;line-height:1.45;margin:10px 0;padding:8px 0}
.gift-inline-detail .proposal-label{font-size:10px;line-height:1.4;letter-spacing:.1px;margin:8px 0}
.gift-inline-detail .claim-status{font-size:11px;line-height:1.45;min-height:0;margin:10px 0 6px}
.gift-inline-detail .dialog-action,
.gift-inline-detail .dialog-done{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:3px;
  width:100%;
  min-width:44px;
  min-height:44px;
  padding:8px 4px;
  font-size:12px;
  line-height:1.3;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
}
.gift-inline-detail .dialog-action{margin-top:6px}
.gift-inline-detail .dialog-done{margin:4px 0 0}
.gift-inline-detail .dialog-action>span{display:none}
.gift-inline-detail button:focus-visible,
.gift-opening-controls button:focus-visible{outline-offset:-3px}

@media(max-width:760px){
  .gift-slot .day-number,
  .gift-slot.is-selected .day-number{font-size:47px}
  .gift-slot .day-bottom,
  .gift-slot.is-selected .day-bottom{font-size:5px;left:11px;right:11px}
  .gift-slot .gift-lock,
  .gift-slot.is-selected .gift-lock{width:21px;height:23px;right:14%}
  .gift-slot .gift-lock:before,
  .gift-slot.is-selected .gift-lock:before{left:4px}
  .gift-slot .claim-mark,
  .gift-slot.is-selected .claim-mark{font-size:80px}
}
