/* Shared ATOM X ticket. Campaign rules and the surrounding page stay independent. */
.gift-ticket{
  --ticket-paper:#fff;--ticket-ink:#111;--ticket-secondary:#444;--ticket-gold:#d6a51e;--ticket-line:#d9d9d9;
  --ticket-font:'ATOMX Montserrat',Montserrat,Arial,Helvetica,sans-serif;
  --ticket-padding:24px;
  --ticket-edge-top:max(16px,env(safe-area-inset-top,0px));
  --ticket-edge-bottom:max(16px,env(safe-area-inset-bottom,0px));
  --ticket-edge-left:max(16px,env(safe-area-inset-left,0px));
  --ticket-edge-right:max(16px,env(safe-area-inset-right,0px));
  --ticket-usable-height:calc(var(--ticket-viewport-height,100dvh) - var(--ticket-edge-top) - var(--ticket-edge-bottom));
  --ticket-max-height:min(560px,68dvh,var(--ticket-usable-height));
  box-sizing:border-box;color:var(--ticket-ink);font:400 14px/21px var(--ticket-font);text-align:left;color-scheme:light;
}
.gift-ticket *,.gift-ticket *::before,.gift-ticket *::after{box-sizing:border-box}
.gift-ticket[hidden],.gift-ticket [hidden]{display:none!important}
.gift-ticket--floating{
  position:fixed;inset:auto;
  left:calc(var(--ticket-viewport-x,50vw) + (var(--ticket-edge-left) - var(--ticket-edge-right)) / 2);
  top:calc(var(--ticket-viewport-y,50dvh) + (var(--ticket-edge-top) - var(--ticket-edge-bottom)) / 2);
  transform:translate(-50%,-50%);
  width:min(360px,calc(var(--ticket-viewport-width,100vw) - var(--ticket-edge-left) - var(--ticket-edge-right)));
  height:auto;max-width:none;max-height:var(--ticket-max-height);margin:0;padding:0;border:0;border-radius:6px;
  background:var(--ticket-paper);overflow:visible;overscroll-behavior:auto;box-shadow:0 8px 32px #11111124;z-index:90;
}
dialog.gift-ticket--floating:not([open]){display:none}
dialog.gift-ticket--floating[open],.gift-ticket--floating:not(dialog){display:flex}
.gift-ticket--floating[open]{animation:gift-ticket-enter 200ms ease-out both}
.gift-ticket::backdrop,body.atomx-murcia #reward-screen.gift-ticket::backdrop{background:transparent;backdrop-filter:none}
/* Neutralize the old gifts.css scroll lock only for the modeless floating ticket. */
body:has(dialog.gift-ticket--floating[open]){overflow-x:clip;overflow-y:visible}
.gift-ticket--integrated{
  position:relative;display:flex;width:min(360px,100%);max-width:100%;margin:0;padding:0;border:0;
  background:var(--ticket-paper);box-shadow:0 4px 18px #11111112;border-radius:6px;
}
.gift-ticket .gift-ticket__card,#day-dialog.gift-ticket__card{
  position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-width:0;min-height:0;width:100%;max-width:none;
  max-height:var(--ticket-max-height);margin:0;padding:0;border:1px solid var(--ticket-line);border-radius:6px;
  background:var(--ticket-paper);color:var(--ticket-ink);box-shadow:none;overflow:hidden;text-align:left;
}
.gift-ticket--integrated .gift-ticket__card{max-height:none}
/* One folded wrapping corner, outside the reading and action areas. */
.gift-ticket__card::before{
  content:'';position:absolute;top:0;left:0;width:24px;height:24px;background:var(--ticket-gold);
  clip-path:polygon(0 0,100% 0,0 100%);pointer-events:none;
}
.gift-ticket .gift-ticket__header{
  display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:16px;
  padding:16px var(--ticket-padding) 8px;margin:0;border:0;background:var(--ticket-paper);
}
.gift-ticket [data-ticket-slot="brand"]{
  display:block;width:96px;height:28px;max-width:calc(100% - 60px);margin:0;object-fit:contain;object-position:left center;
}
.gift-ticket [data-ticket-slot="close"]{
  position:static;display:grid;flex:0 0 44px;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;
  margin:0 -10px 0 0;padding:0;border:0;border-radius:4px;background:var(--ticket-paper);color:var(--ticket-ink);
  font:400 28px/1 Arial,Helvetica,sans-serif;cursor:pointer;
}
.gift-ticket [data-ticket-slot="close"]:not(:disabled):hover{background:#f3f3f3}
.gift-ticket [data-ticket-slot="close"]:disabled{opacity:.45;cursor:default}
.gift-ticket .gift-ticket__body{
  flex:1 1 auto;min-height:0;padding:8px var(--ticket-padding) 16px;overflow-x:hidden;overflow-y:auto;
  overscroll-behavior:auto;scrollbar-gutter:stable;overflow-wrap:break-word;
}
.gift-ticket [data-ticket-slot="context"]{
  margin:0 0 8px;color:var(--ticket-secondary);font:600 12px/17px var(--ticket-font);letter-spacing:.025em;text-transform:uppercase;
}
.gift-ticket [data-ticket-slot="title"]{
  margin:0 0 16px;color:var(--ticket-ink);font:600 24px/28px var(--ticket-font);letter-spacing:-.025em;
  text-transform:none;overflow-wrap:break-word;
}
.gift-ticket [data-ticket-slot="image"]{
  display:block;float:none;width:100%;height:88px;max-height:88px;margin:0 0 16px;padding:0;border:0;border-radius:0;
  background:var(--ticket-paper);object-fit:contain;object-position:left center;opacity:1;
}
.gift-ticket [data-ticket-slot="description"]{
  margin:0 0 16px;color:var(--ticket-secondary);font:400 14px/21px var(--ticket-font);white-space:pre-line;
}
.gift-ticket [data-ticket-slot="conditions"]{margin:0;border-top:1px solid var(--ticket-line)}
.gift-ticket [data-ticket-slot="conditions"]>summary{
  display:list-item;min-height:44px;margin:0;padding:13px 0;color:var(--ticket-ink);font:600 12px/18px var(--ticket-font);cursor:pointer;
}
.gift-ticket [data-ticket-slot="conditionDetail"]{
  margin:0;padding:0 0 8px;border:0;color:var(--ticket-secondary);font:400 14px/21px var(--ticket-font);white-space:pre-line;
}
.gift-ticket .gift-ticket__footer{
  display:flex;flex:0 0 auto;flex-direction:column;gap:8px;width:auto;margin:0;padding:16px var(--ticket-padding) 24px;
  border:0;border-top:1px solid var(--ticket-line);background:var(--ticket-paper);color:var(--ticket-secondary);overflow-wrap:break-word;
}
.gift-ticket__footer-info{display:flex;flex-direction:column;gap:8px;min-height:0;overscroll-behavior:auto}
.gift-ticket [data-ticket-slot="conditionSummary"]{margin:0;color:var(--ticket-secondary);font:400 12px/17px var(--ticket-font)}
.gift-ticket [data-ticket-slot="testLabel"]{margin:0;color:var(--ticket-secondary);font:600 12px/17px var(--ticket-font);letter-spacing:0}
.gift-ticket [data-ticket-slot="status"]{min-height:0;margin:0;color:var(--ticket-secondary);font:400 12px/17px var(--ticket-font)}
.gift-ticket [data-ticket-slot="status"]:empty{display:none}
.gift-ticket [data-ticket-slot="action"]{
  display:block;flex:0 0 auto;width:100%;min-width:0;min-height:44px;margin:0;padding:11px 14px;border:1px solid var(--ticket-ink);border-radius:4px;
  background:var(--ticket-ink);color:#fff;font:600 14px/20px var(--ticket-font);letter-spacing:0;text-transform:none;white-space:normal;cursor:pointer;
}
.gift-ticket [data-ticket-slot="action"]:not(:disabled):hover{background:#333;border-color:#333}
.gift-ticket [data-ticket-slot="action"]:disabled{border-color:#d9d9d9;background:#e9e9e9;color:#444;opacity:1;cursor:default}
.gift-ticket :is(button,summary,a,[data-ticket-slot="title"]):focus-visible{outline:2px solid #111;outline-offset:3px}
.gift-ticket [data-ticket-slot="title"]:focus{outline-offset:3px}
.gift-ticket :is(.gift-ticket__body,.gift-ticket__footer-info):focus-visible{outline:2px solid #111;outline-offset:-3px}
.gift-ticket--integrated .gift-ticket__body{overflow:visible}
@keyframes gift-ticket-enter{from{opacity:0;transform:translate(-50%,calc(-50% + 8px))}to{opacity:1;transform:translate(-50%,-50%)}}
@media(max-width:767px){
  .gift-ticket{--ticket-padding:20px;--ticket-max-height:min(55dvh,var(--ticket-usable-height))}
  .gift-ticket--floating{width:min(340px,calc(var(--ticket-viewport-width,100vw) - var(--ticket-edge-left) - var(--ticket-edge-right)))}
  .gift-ticket [data-ticket-slot="image"]{height:64px;max-height:64px}
  .gift-ticket .gift-ticket__footer{padding-bottom:20px}
}
@media(max-height:640px){.gift-ticket{--ticket-max-height:var(--ticket-usable-height)}}
.gift-ticket[data-ticket-short-viewport="true"]{--ticket-max-height:var(--ticket-usable-height)}
@media(max-height:400px){
  .gift-ticket .gift-ticket__header{padding-block:8px 4px}
  .gift-ticket .gift-ticket__footer{gap:4px;padding-block:8px 12px}
  .gift-ticket--floating{--ticket-reading-min:clamp(0px,calc(var(--ticket-usable-height) - 127px),64px)}
  .gift-ticket--floating .gift-ticket__body{min-height:var(--ticket-reading-min)}
  .gift-ticket--floating .gift-ticket__footer{flex:0 1 auto;min-height:69px;max-height:calc(var(--ticket-usable-height) - 58px - var(--ticket-reading-min))}
  .gift-ticket--floating .gift-ticket__footer-info{flex:1 1 auto;gap:4px;overflow-y:auto}
}
.gift-ticket[data-ticket-compact-viewport="true"] .gift-ticket__header{padding-block:8px 4px}
.gift-ticket[data-ticket-compact-viewport="true"] .gift-ticket__footer{gap:4px;padding-block:8px 12px}
.gift-ticket--floating[data-ticket-compact-viewport="true"]{--ticket-reading-min:clamp(0px,calc(var(--ticket-usable-height) - 127px),64px)}
.gift-ticket--floating[data-ticket-compact-viewport="true"] .gift-ticket__body{min-height:var(--ticket-reading-min)}
.gift-ticket--floating[data-ticket-compact-viewport="true"] .gift-ticket__footer{flex:0 1 auto;min-height:69px;max-height:calc(var(--ticket-usable-height) - 58px - var(--ticket-reading-min))}
.gift-ticket--floating[data-ticket-compact-viewport="true"] .gift-ticket__footer-info{flex:1 1 auto;gap:4px;overflow-y:auto}
@media(prefers-reduced-motion:reduce){.gift-ticket--floating[open]{animation:none}}
@media(forced-colors:active){
  .gift-ticket__card::before{background:Highlight}
  .gift-ticket :is(button,summary,a,[data-ticket-slot="title"]):focus-visible{outline-color:Highlight}
}
.gift-ticket__claim-result{padding:12px 0;border-top:1px solid #dedede;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.gift-ticket__claim-result[hidden]{display:none}
.gift-ticket__claim-result p{margin:0 0 8px}
.gift-ticket__claim-result a{color:inherit;text-decoration:underline;text-underline-offset:3px}
