/* Photo selection and result screens. Requires event-experience.css (shared .lof-ev tokens, header, buttons). */
.lof-photo-experience.photo-closed{max-width:560px;margin:0 auto;padding:40px 20px;text-align:center;background:#fff;color:#111;font:16px/1.5 "Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif}
.lof-photo-experience.photo-closed h2{font-size:26px;font-weight:800;margin:0 0 8px}
.lof-photo-experience.photo-closed p{color:#575757;margin:0}

/* Event page: title, photo, the invitation, then the two ways in. */
.ev-upload .ev-hero img{aspect-ratio:3/2;object-position:50% 75%}
.ev-invite{margin:0 0 22px}
.ev-invite-title{font-size:clamp(26px,7.4vw,32px);line-height:1.1;font-weight:800;letter-spacing:-.02em;margin-bottom:8px}
.ev-lede{font-size:18px;line-height:1.45;color:var(--ev-ink);margin:0}
/* The real entry deadline: plain text with the event's orange rule, not a badge or timer. */
.ev-deadline{margin-top:14px;padding:12px 0 0;border-top:1px solid var(--ev-line);font-size:17px;font-weight:600}
.ev-deadline time{font-weight:800;white-space:nowrap}
.ev-start{border-radius:var(--ev-radius);transition:background-color .15s}
.ev-start.is-dragging{background:var(--ev-soft);outline:2px dashed var(--ev-orange);outline-offset:8px}
.ev-actions{display:grid;gap:12px}
.ev-actions .ev-btn{width:100%}
.ev-actions:has(input:focus-visible){outline:3px solid var(--ev-ink);outline-offset:4px;border-radius:var(--ev-radius)}
.ev-file{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.ev-upload label.ev-btn{cursor:pointer}
.lof-ev .ev-actions .photo-choose-button{border-color:var(--ev-ink);border-width:2px}
.ev-start .ev-links--center{margin-top:24px}

/* Print-first event page: invitation, the event's framed print shown whole, the two ways in, then quieter notes. */
.ev-start--print{display:grid;gap:18px}
.ev-start--print .ev-invite{margin:0}
.ev-print-hero{margin:0;display:flex;justify-content:center}
/* Never cropped: the printed frame keeps its own shape and stays compact enough for the actions to follow. */
.ev-print-hero img{display:block;width:auto;max-width:100%;height:auto;max-height:min(46vh,420px);max-height:min(46svh,420px);object-fit:contain}
.ev-main--print>.ev-print-hero{margin-top:8px}
.ev-print-notes{display:grid;gap:6px}
.ev-support{font-size:16px;line-height:1.45;color:var(--ev-muted)}
.ev-print-off{font-size:16px;line-height:1.45;font-weight:600}
/* The real deadline, after the actions and smaller than them. */
.ev-deadline--quiet{margin-top:2px;padding-top:0;border-top:0;font-size:14px;font-weight:500;color:var(--ev-muted)}
.ev-deadline--quiet time{font-weight:700;color:var(--ev-ink)}
.ev-start--print .ev-links--center{margin-top:6px}

/* Review: the whole photo, then what to do with it. */
.ev-step-title{font-size:clamp(30px,8.4vw,36px);line-height:1.1;font-weight:800;letter-spacing:-.02em}
.ev-preview{display:grid;gap:14px;padding-top:4px}
.ev-preview>.ev-btn{justify-self:center;min-width:180px}
/* Full image at its own orientation: never cropped, centred, no letterbox bars. */
.ev-photo{display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:120px}
.ev-photo img,.ev-photo video{display:block;width:auto;max-width:100%;height:auto;max-height:62vh;object-fit:contain}
.ev-photo video{width:100%;background:var(--ev-ink)}
.ev-photo p{width:100%;background:var(--ev-ink);color:#fff;padding:56px 20px;text-align:center}
/* While reviewing on a phone, the whole photo stays visible but compact so the choices start on screen. */
.ev-preview .ev-photo{background:var(--ev-soft)}
.ev-preview .ev-photo img,.ev-preview .ev-photo video{max-height:min(42vh,380px)}
.ev-next{margin:4px 0 12px;font-size:15px}

.ev-fields{margin-top:22px}
.ev-field{margin:0 0 18px}
.lof-ev label{font-weight:600}
/* Field labels sit above their input; checkbox rows (.ev-check) keep their own flex layout. */
.ev-field>label:not(.ev-check),.ev-panel-body>label:not(.ev-check){display:block;font-size:17px;margin-bottom:6px}
.lof-ev label>span:not(.ev-sr){font-weight:400}
.ev-field label>span,.ev-group legend>span,.ev-panel-body label>span{color:var(--ev-muted)}
.lof-ev input[type=text],.lof-ev input[type=email],.lof-ev input[type=tel]{display:block;width:100%;min-height:52px;padding:12px 14px;font-size:17px;background:#fff;color:var(--ev-ink);border:1.5px solid var(--ev-edge);border-radius:var(--ev-radius);margin:0 0 6px}
.lof-ev input[type=text]:focus,.lof-ev input[type=email]:focus,.lof-ev input[type=tel]:focus{border-color:var(--ev-ink);outline:2px solid var(--ev-ink);outline-offset:0}
.lof-ev input::placeholder{color:#767676;opacity:1}
.lof-ev input[type=checkbox],.lof-ev input[type=radio]{accent-color:var(--ev-orange);width:22px;height:22px;flex:0 0 22px;margin:1px 0 0}
.ev-count{text-align:right;font-size:13px}

.ev-group{border:0;border-top:1.5px solid var(--ev-line);margin:0 0 18px;padding:18px 0 0;min-width:0}
.ev-group legend{font-size:18px;font-weight:700;padding:0;margin-bottom:10px;float:left;width:100%}
.ev-group legend+*{clear:left}
.ev-group--nested{border-top:0;padding:4px 0 0 34px;margin:0}
.ev-group--nested legend{font-size:16px}
.ev-group--details .ev-field:last-child{margin-bottom:0}
/* Choices wrap whole: each tile is wide enough for its label, and words never break mid-word. */
.ev-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9.5rem),1fr));gap:8px}
.lof-ev .ev-choice{display:flex;align-items:center;gap:10px;min-width:0;min-height:48px;padding:10px 14px;border:1.5px solid var(--ev-edge);border-radius:var(--ev-radius);cursor:pointer;font-weight:600;line-height:1.3}
.ev-choice>span,.ev-check>span{min-width:0;overflow-wrap:break-word;hyphens:manual}
.ev-choice:has(input:checked){border-color:var(--ev-orange);box-shadow:inset 0 0 0 1px var(--ev-orange)}
.lof-ev .ev-check{display:flex;align-items:flex-start;gap:12px;font-size:17px;line-height:1.4;margin:10px 0 14px;cursor:pointer}
.lof-ev .ev-check>input{margin-top:1px}
.ev-check>span{font-weight:500}
.ev-check small{display:block;font-size:14px;color:var(--ev-muted);margin-top:3px;font-weight:400}

.ev-progress{margin:14px 0}
.ev-progress progress{width:100%;height:8px;accent-color:var(--ev-orange)}
.ev-progress p{font-size:15px;margin-top:6px}
#lof-submit{margin-top:6px;min-height:56px}

/* While reviewing, the event header steps back and the hero gives way to the guest's own photo. */
.ev-upload .ev-main:has(#lof-preview:not([hidden]))>.ev-hero{display:none}
.ev-upload .ev-main:has(#lof-preview:not([hidden]))>.ev-header{padding-top:16px;padding-bottom:10px}
.ev-upload .ev-main:has(#lof-preview:not([hidden]))>.ev-header .ev-logo{width:48px;height:48px}
.ev-upload .ev-main:has(#lof-preview:not([hidden]))>.ev-header .ev-brand{flex-direction:row;align-items:center;gap:12px}
.ev-upload .ev-main:has(#lof-preview:not([hidden]))>.ev-header .ev-title{font-size:20px;letter-spacing:-.01em}
.ev-upload .ev-main:has(#lof-preview:not([hidden]))>.ev-header .ev-dates{font-size:15px;margin-top:0}
.ev-upload .ev-main:has(#lof-preview:not([hidden]))>.ev-header .ev-menu{top:16px}

/* Result */
.ev-result-layout{display:grid;gap:16px}
.ev-result-head h1{font-size:clamp(36px,10vw,44px);line-height:1.05;font-weight:800;letter-spacing:-.025em}
.ev-result-head .ev-sub{margin-top:6px}
.ev-result-head.is-entered .ev-sub{color:var(--ev-ink)}
@keyframes ev-pop{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.12);opacity:1}100%{transform:scale(1)}}
/* Shown above Share my entry: why sharing matters, in the guest's words. */
.ev-share-invite{font-size:17px;line-height:1.4;font-weight:600}
.ev-result-media{display:grid;gap:10px;align-content:start}
.ev-screening{display:flex;gap:14px;align-items:flex-start;border:1.5px solid var(--ev-line);border-radius:var(--ev-radius);padding:16px}
.ev-screening-title{font-weight:700;font-size:18px;margin-bottom:4px}
.ev-screening p:not(.ev-screening-title){color:var(--ev-muted)}
.ev-result .ev-photo img,.ev-result .ev-photo video{max-height:70vh}
.ev-result .lof-receipt-info{color:var(--ev-muted);font-size:15px}
.ev-result .lof-receipt-info p+p{margin-top:2px}
.ev-result-actions{display:grid;gap:12px;align-content:start}
.ev-result-actions .ev-status{margin:0}
.ev-result-actions>.ev-links{margin-top:6px;border-top:1.5px solid var(--ev-line);padding-top:10px}

.ev-panel{border:1.5px solid var(--ev-edge);border-radius:var(--ev-radius);background:#fff}
.ev-panel-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:54px;padding:12px 18px;background:none;border:0;font-family:var(--ev-font);font-size:18.7px;font-weight:700;text-align:left;cursor:pointer;border-radius:var(--ev-radius)}
.ev-panel-toggle:hover{background:#fafafa}
.ev-panel-body{padding:4px 18px 18px}
.ev-panel-body .ev-btn{margin-top:6px}
.ev-delivery-cancel{display:flex;flex-wrap:wrap;gap:8px}
.ev-manage{display:grid;gap:10px;border-top:1.5px solid var(--ev-line);padding-top:6px}
.ev-manage .ev-status,.ev-manage .ev-alert{margin:0}
.ev-manage-disclosure summary{display:flex;align-items:center;gap:8px;min-height:48px;font-size:17px;font-weight:700;cursor:pointer}
.ev-manage-body{display:grid;gap:10px;padding:2px 0 8px}
.ev-manage-item{display:grid;gap:10px}
.ev-linkbtn{justify-self:start;background:none;border:0;padding:10px 0;min-height:44px;font-family:var(--ev-font);font-size:17px;font-weight:600;color:var(--ev-ink);text-decoration:underline;text-underline-offset:4px;cursor:pointer}
.ev-linkbtn:hover{text-decoration-thickness:2px}
.ev-confirm{border:1.5px solid var(--ev-alert);border-radius:var(--ev-radius);padding:14px 16px;display:grid;gap:12px}
.ev-confirm p{font-size:17px}
.ev-confirm-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
/* Print: a quiet card under the keep-and-share actions. */
.ev-print{padding:18px;border-color:var(--ev-line);background:var(--ev-soft)}
.ev-print h2{font-size:20px;font-weight:800;letter-spacing:-.01em;margin-bottom:6px}
.ev-print p{margin-bottom:8px}
.ev-print .ev-field{margin:6px 0 10px}
.ev-print .ev-btn{margin-top:4px}
/* Two matching 4x3 prints: the cleared photo twice, whole (contain), with a cut line between. */
.ev-print-pair{margin:6px 0 12px}
.ev-print-pair-sheet{display:grid;grid-template-columns:1fr 1fr;background:#fff;border:1.5px solid var(--ev-line);border-radius:var(--ev-radius);padding:8px}
.ev-print-pair-sheet img{display:block;width:100%;height:150px;object-fit:contain;padding:0 6px}
.ev-print-pair-sheet img+img{border-left:1.5px dashed var(--ev-edge)}
.ev-print-pair figcaption{margin-top:6px}
/* "See both prints": the illustrative two-up stays folded so the print button and saving stay near the top. */
.ev-print-preview{margin:0 0 8px}
.ev-print-preview summary{display:flex;align-items:center;min-height:44px;cursor:pointer;font-size:16px;font-weight:600}
.ev-print .ev-print-count{margin:10px 0 0}
/* Optional contest: status, share and join, after saving and sending. */
.ev-contest-group{display:grid;gap:12px;border-top:1.5px solid var(--ev-line);padding-top:14px}
.ev-contest-group .ev-sub{margin:0;font-size:17px;line-height:1.4;color:var(--ev-ink)}
.ev-woo{grid-column:1/-1;border-top:1.5px solid var(--ev-line);padding-top:20px;margin-top:10px}
.ev-woo h2{font-size:20px;font-weight:800;margin-bottom:10px}
.ev-woo .lof-woo-buttons{display:grid;gap:10px}
.ev-woo form{margin:0}
.ev-details{margin:10px 0}
.ev-details summary{cursor:pointer;min-height:44px;padding:10px 0;font-weight:600}
.ev-details p{font-size:13px;color:var(--ev-muted);margin:0 0 8px}
.ev-footer{border-top:1.5px solid var(--ev-line);margin-top:32px;padding-top:6px}

@media (min-width:761px) and (hover:hover){
  .photo-camera-button,#lof-camera-input{display:none}
  .lof-ev .ev-actions label.photo-choose-button{background:var(--ev-orange);color:#fff;border-color:var(--ev-orange)}
  .lof-ev .ev-actions label.photo-choose-button:hover{background:var(--ev-orange-hover);border-color:var(--ev-orange-hover)}
}

/* Desktop: a designed page around 1100px wide. */
@media (min-width:900px){
  .lof-ev.ev-upload,.lof-ev.ev-result{max-width:1140px;padding-left:32px;padding-right:32px}
  /* Event page without a hero: one centred column. */
  .ev-upload .ev-main:not(.ev-main--hero){max-width:640px;margin:0 auto}
  /* Event page with a hero: photo on the left, title and actions balanced on the right. */
  .ev-upload .ev-main--hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:1fr auto auto 1fr;column-gap:56px;padding-top:40px}
  .ev-upload .ev-main--hero>.ev-hero{grid-column:1;grid-row:1/5;align-self:center;margin:0}
  .ev-upload .ev-main--hero>.ev-hero img{aspect-ratio:4/3}
  .ev-upload .ev-main--hero>:not(.ev-hero){grid-column:2}
  .ev-upload .ev-main--hero>.ev-header{grid-row:2;padding-top:0}
  .ev-upload .ev-main--hero>.ev-header .ev-title{font-size:48px}
  .ev-upload .ev-main--hero>.ev-header .ev-dates{font-size:18px}
  .ev-upload .ev-main--hero>.ev-form,.ev-upload .ev-main--hero>.ev-state{grid-row:3}
  .ev-upload .ev-main--hero>.ev-state{text-align:left;padding:8px 0}
  .ev-upload .ev-main--hero .ev-links--center{justify-content:flex-start}
  .ev-upload .ev-main:not(.ev-main--hero)>.ev-header .ev-title{font-size:48px}
  /* Print-first with a print example: the whole print on the left, invitation and actions centred on the right. */
  .ev-upload .ev-main--print.has-print-hero{max-width:1080px}
  .ev-start--print.has-print-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:1fr auto auto auto auto 1fr;column-gap:56px}
  .ev-start--print.has-print-hero>.ev-print-hero{grid-column:1;grid-row:1/-1;align-self:center}
  .ev-start--print.has-print-hero>.ev-invite{grid-column:2;grid-row:2}
  .ev-start--print.has-print-hero>.ev-actions{grid-column:2;grid-row:3}
  .ev-start--print.has-print-hero>.ev-print-notes{grid-column:2;grid-row:4}
  .ev-start--print.has-print-hero>.ev-links{grid-column:2;grid-row:5;justify-content:flex-start}
  .ev-start--print .ev-print-hero img{max-height:72vh}
  /* Review: the guest's photo beside the choices, full width. */
  .ev-upload .ev-main:has(#lof-preview:not([hidden])){display:block;max-width:none;padding-top:0}
  .ev-form:has(.ev-fields:not([hidden])){display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:48px;align-items:start}
  .ev-form:has(.ev-fields:not([hidden])) .ev-fields{margin-top:52px}
  .ev-form:has(.ev-fields:not([hidden])) .ev-preview{position:sticky;top:24px}
  .ev-photo img,.ev-photo video,.ev-preview .ev-photo img,.ev-preview .ev-photo video{max-height:72vh}
  /* Result: photo left, keep-and-share actions right. */
  .ev-result-layout{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);column-gap:48px;row-gap:20px;align-items:start}
  .ev-result-head{grid-column:1/-1}
  .ev-result-media{position:sticky;top:24px}
  .ev-result .ev-photo{background:var(--ev-soft)}
  .ev-result .ev-photo img,.ev-result .ev-photo video{max-height:74vh}
  .ev-result .ev-footer{max-width:none}
}

/* Embedded in an existing page: the page provides its own header. */
.lof-embed .ev-header{display:none}
.lof-embed .lof-ev{padding-top:8px}

/* Keep the whole portrait visible while bringing save/share into the first phone screen. */
@media(max-width:899px){
.ev-result-head h1{font-size:30px;line-height:1.1}
.ev-result .ev-photo{background:var(--ev-soft)}
.ev-result .ev-photo img,.ev-result .ev-photo video{max-height:min(34svh,320px)}
.ev-result .ev-share-invite{font-size:16px;line-height:1.45}
}

.lof-ev.ev-result .lof-receipt-info{margin:0}

/* Let the finished portrait show the border at full phone width without a surrounding mat. */
@media(max-width:899px){.lof-ev.ev-result #photo-result-frame > #lof-receipt-image{width:100%;height:auto;max-height:none;object-fit:contain}}

/* With site navigation, begin directly with the photo invitation. */
.ev-upload .ev-main.ev-main--direct{padding-top:24px}
