/* Approved I2 gift logo and W1 wall. Each gift remains a real, keyboard-accessible date button. */
#calendar.gift-wall{display:block;position:relative;isolation:isolate;aspect-ratio:1374/1145;width:100%;padding:0;margin-top:8px;background:#fff6e5 var(--gift-wall-image) center/100% 100% no-repeat;border-radius:20px;overflow:visible}
#calendar.gift-wall .door{position:absolute;left:calc(3.4% + var(--gift-column)*15.8%);top:calc(7.8% + var(--gift-row)*20.1%);width:14.6%;height:18.1%;min-height:0;aspect-ratio:auto;padding:0;background:none!important;box-shadow:none;filter:none;transform:none!important;border-radius:10px;transition:box-shadow .18s ease}
#calendar.gift-wall .door:nth-child(6n+1){--gift-column:0}
#calendar.gift-wall .door:nth-child(6n+2){--gift-column:1}
#calendar.gift-wall .door:nth-child(6n+3){--gift-column:2}
#calendar.gift-wall .door:nth-child(6n+4){--gift-column:3}
#calendar.gift-wall .door:nth-child(6n+5){--gift-column:4}
#calendar.gift-wall .door:nth-child(6n+6){--gift-column:5}
#calendar.gift-wall .door:nth-child(n+1):nth-child(-n+6){--gift-row:0}
#calendar.gift-wall .door:nth-child(n+7):nth-child(-n+12){--gift-row:1}
#calendar.gift-wall .door:nth-child(n+13):nth-child(-n+18){--gift-row:2}
#calendar.gift-wall .door:nth-child(n+19):nth-child(-n+24){--gift-row:3}
#calendar.gift-wall .door:hover{background:#fff3cd14!important;box-shadow:0 0 22px #f6ca7460;filter:none}
#calendar.gift-wall .door:focus-visible{outline:3px solid #ffdf9e;outline-offset:3px;box-shadow:0 0 22px #f6ca7470}
#calendar.gift-wall .day{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#calendar.gift-wall .state{bottom:0;top:auto;left:50%;max-width:none;transform:translateX(-50%);font:600 clamp(8px,.75vw,10px)/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:0;padding:3px 6px;color:#f7ebd6;background:#092637f2;border-radius:10px;white-space:nowrap}
#calendar.gift-wall .state:empty{display:none}
#calendar.gift-wall .filled .state{background:#8c2c39;color:#fff2d7}
#calendar.gift-wall .opened .state{background:#f5da9f;color:#57391e}
#calendar.gift-wall .own::after{display:none}
.calendar-area .calendar-caption{font-size:12px;margin-top:14px;color:#f0dfbc}
.calendar-area .calendar-legend{gap:8px 14px;flex-wrap:wrap;font-size:9px}
.product .calendar-area{display:flex;flex-direction:column;align-items:center;min-width:0;padding:0;margin-top:0}
#calendar.gift-wall{width:min(100%,calc(var(--peer-card-height,600px)*1.2));flex:none;margin-top:0}
@media(max-width:1000px){
  .product .product-grid{grid-template-columns:minmax(0,1fr);max-width:620px;margin-inline:auto}
  .product-grid .calendar-area{order:2}
  #calendar.gift-wall{width:100%;margin-top:0}
}
@media(max-width:520px){
  #calendar.gift-wall{border-radius:14px}
  #calendar.gift-wall .state{font-size:8px;max-width:calc(100% + 5px);overflow:hidden;text-overflow:ellipsis;padding:2px 4px}
  .calendar-area .calendar-caption{font-size:11px}
  .calendar-area .calendar-legend{font-size:8px;gap:5px 9px}
}
@media(prefers-reduced-motion:reduce){#calendar.gift-wall .door{transition:none}}

/* All calendar views share the same gift-first, form-second layout. */
@media(min-width:1001px){.product .product-grid{grid-template-columns:minmax(0,1fr) minmax(300px,390px)}.product .calendar-area{grid-column:1;grid-row:1}.product #productInfo{grid-column:2;grid-row:1}}
@media(max-width:1000px){.product .calendar-area{order:-1}.product #productInfo{order:0}}

/* Approved pale gift walls: existing stored theme IDs retain their calendars. */
.product{--gift-wall-image:url('/assets/gift-wall-cream-gold.jpg')}
.product.night{--gift-wall-image:url('/assets/gift-wall-snow-blue.jpg')}
.product.rose{--gift-wall-image:url('/assets/gift-wall-pale-sage.jpg')}
.product .theme-options button{display:inline-flex;align-items:center;gap:7px}
.theme-options button[data-theme]::before{content:"";display:inline-block;width:12px;height:12px;flex:0 0 12px;border-radius:50%;background:#ebc77f}
.theme-options button[data-theme=night]::before{background:#bad9ef}
.theme-options button[data-theme=rose]::before{background:#b8ceae}

/* Every gift wall is capped by its adjacent form height. */
#product #calendar.gift-wall{width:min(100%,calc(var(--peer-card-height,600px)*1.2))}
@media(min-width:1001px){#product #calendar.gift-wall{width:min(85%,calc(var(--peer-card-height,600px)*1.2))}}

/* Size the wall in the same CSS layout pass as its form, without a JS height update. */
@supports(container-type:size){
  @media(min-width:1001px){
    .product .calendar-area{container-type:size;align-self:stretch}
    #product #calendar.gift-wall{width:min(85%,calc(100cqh * 1.2));flex:none}
  }
}
@media(max-width:1000px){
  .product .product-grid{grid-template-columns:minmax(0,1fr)}
  #product #calendar.gift-wall{width:100%;flex:none}
}
