/* Hallmark · shape: app screen · theme: custom · idea: wedding gallery covers and a quiet full-screen photo viewer */
/* Hallmark · pre-emit critique: keep photos prominent and keep upload controls readable at phone widths */
.guest-day-tile {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 146px;
  color: var(--cream);
  text-decoration: none;
  background: linear-gradient(136deg, var(--wine), var(--deep));
}

.guest-day-tile:has(.guest-cover-image)::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(to top, var(--deep), transparent 115%);
}

.guest-day-tile .guest-cover-image {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.guest-cover-text { display: grid; gap: .25rem; padding: 1.125rem; }
.guest-cover-text span { font-size: .875rem; }
.guest-cover-text h2 { font: 400 clamp(1.75rem, 7vw, 2.45rem)/1.13 var(--display, Georgia, serif); }
.screen-head .guest-day-title { color: var(--wine); font: 400 clamp(2.5rem, 10vw, 3.35rem)/1.17 var(--display, Georgia, serif); }
.guest-segments .button[aria-current] { border-color: var(--wine); background: var(--wine); color: var(--cream); }
.guest-grid .photo-tile img { transition: opacity .16s ease; }
.guest-grid .photo-tile:focus-visible { z-index: 1; }
.guest-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.guest-facts { display: grid; gap: .75rem; margin: 0; }
.guest-facts div { display: grid; gap: .15rem; }
.guest-facts dt { color: var(--muted); font-size: .875rem; }
.guest-facts dd { margin: 0; }
.sheet .guest-cover-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1rem; }
.guest-switch { min-height: 44px; padding-inline: .5rem; }
.guest-switch input { inline-size: 1.5rem; block-size: 1.5rem; }

.guest-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  margin: 0;
  border: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--deep);
  color: var(--cream);
  overscroll-behavior: contain;
}

.guest-viewer[open] { display: grid; grid-template-rows: auto minmax(140px, 1fr) auto; gap: 12px; }
.guest-viewer::backdrop { background: var(--deep); }
.guest-viewer .button { padding-inline: clamp(8px, 3vw, 16px); }
.guest-viewer .button:focus-visible { outline-color: var(--gold); }
.guest-viewer-controls, .guest-viewer-details { width: min(100%, 38rem); margin-inline: auto; }
.guest-viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}

.guest-viewer-stage img { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.guest-viewer-preview { z-index: -1; filter: blur(8px); }
.guest-viewer-details p { overflow-wrap: anywhere; }

.guest-upload .screen-head { margin-bottom: 0; }
.guest-upload :is(legend, p, summary) { overflow-wrap: anywhere; }
.guest-upload summary { display: list-item; padding-block: 12px; min-height: 44px; cursor: pointer; }
.guest-upload [role="status"]:empty { display: none; }
.guest-picker {
  border: 1px dashed var(--rule);
  border-radius: 1rem;
  background: var(--surface);
  padding: .875rem;
}

.guest-picker input { max-width: 100%; min-height: 44px; }
.guest-picker input::file-selector-button {
  min-height: 44px;
  margin-inline-end: .5rem;
  border: 1px solid var(--wine);
  border-radius: .7rem;
  padding-inline: .7rem;
  background: var(--wine);
  color: var(--cream);
  font: inherit;
}

.guest-upload-item {
  min-inline-size: 0;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  padding: .75rem;
  background: var(--surface);
}

.guest-upload-item legend { max-width: 100%; padding-inline: .25rem; color: var(--muted); }
.guest-upload-thumb { width: 74px; height: 74px; border-radius: .7rem; object-fit: cover; background: var(--blush); }
.guest-tag-list { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; }
.guest-tag { position: relative; cursor: pointer; }
.guest-tag input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.guest-tag span { display: grid; align-items: center; min-height: 44px; border: 1px solid var(--rule); border-radius: 2rem; padding-inline: .7rem; }
.guest-tag input:checked + span { border-color: var(--wine); background: var(--blush); color: var(--wine); }
.guest-tag input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 3px; }
.guest-upload progress { width: 100%; }
.guest-error { color: var(--wine); }

.guest-success { justify-items: center; padding: 1.25rem 1rem; text-align: center; }
.guest-diya { width: 3.5rem; height: 1.1rem; border-radius: 0 0 2rem 2rem; margin-top: 2.75rem; background: linear-gradient(var(--gold), var(--wine)); }
.guest-diya::before {
  display: block;
  content: "";
  width: 1rem;
  height: 1.5rem;
  margin: auto;
  border-radius: 80% 10% 70% 70%;
  background: linear-gradient(var(--cream), var(--gold));
  box-shadow: 0 0 1.25rem var(--gold);
  transform: translateY(-100%) rotate(9deg);
  animation: guest-light .45s ease-out both;
}

@keyframes guest-light {
  from { opacity: 0; transform: translateY(-85%) scale(.4); }
  to { opacity: 1; transform: translateY(-100%) rotate(9deg); }
}

@media (prefers-reduced-motion: reduce) {
  .guest-diya::before { animation: none; }
  .guest-grid .photo-tile img { transition: none; }
}
