/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --surface: #f7f8fa;
  --ink: #1f2430;
  --line: #d8dde7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f9fafc 0%, #edf1f7 100%);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, #fff, transparent 20%);
  backdrop-filter: blur(4px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 700;
}

.site-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.site-nav-actions .button_to {
  margin: 0;
}

.page-shell {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
}

.page-header,
.event-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.button,
input[type="submit"] {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #101626;
  color: #fff;
  cursor: pointer;
  padding: 0.55rem 1rem;
  text-decoration: none;
  font: inherit;
}

.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.button-label {
  line-height: 1;
}

.heroicon {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.button-icon {
  width: 1rem;
  height: 1rem;
  transform: translate(-3px, 2px);
}

.site-brand .heroicon {
  width: 1.15rem;
  height: 1.15rem;
}

.inline-icon-link {
  display: inline-flex;
  align-items: center;
  text-decoration: underline;
}

.inline-icon-link-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.inline-icon-link-label {
  line-height: 1;
}

.flash {
  max-width: 960px;
  margin: 1rem auto 0;
  border-radius: 0.75rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  background: #fff;
}

.flash-notice {
  border-color: color-mix(in srgb, #2c8d3a, white 70%);
  background: #f4fff4;
}

.flash-alert {
  border-color: color-mix(in srgb, #c74343, white 70%);
  background: #fff4f4;
}

.button-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.field-group {
  display: grid;
  gap: 0.65rem;
  max-width: 420px;
}

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"],
.field-group input[type="color"],
.field-group input[type="file"] {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.55rem;
  background: #fff;
}

.auth-shell {
  max-width: 520px;
}

.auth-form input[type="submit"] {
  margin-top: 0.75rem;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.accent-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
}

.event-list {
  display: grid;
  gap: 0.75rem;
}

.event-card {
  border: 1px solid color-mix(in srgb, var(--accent-color), white 75%);
  border-left: 6px solid var(--accent-color);
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
}

.event-header {
  --accent-color: #2d7ff9;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent-color), white 70%);
  border-left: 8px solid var(--accent-color);
  background: #fff;
  margin-bottom: 1rem;
  padding: 1rem;
}

.event-logo {
  max-height: 200px;
  width: auto;
}

.qr-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
  width: 100%;
}

.qr-card-wide {
  width: 100%;
}

.qr-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 2rem;
}

.qr-card-main {
  min-width: 0;
  display: grid;
  gap: 0.75rem;
}

.qr-card-main h2,
.qr-card-main p {
  margin: 0;
}

.qr-card-aside {
  justify-self: end;
  display: grid;
  gap: 0.65rem;
  justify-items: end;
}

.qr-code-graphic svg {
  display: block;
  width: 180px;
  height: 180px;
}

.qr-link-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  max-width: 100%;
}

.qr-url {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px dashed var(--line);
  border-radius: 0.55rem;
  background: #f8fafd;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  font-size: 0.86rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.qr-copy-button {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.qr-copy-button.is-copied,
.qr-link-row.is-copied .qr-copy-button {
  border-color: color-mix(in srgb, #2c8d3a, white 35%);
  color: #1d5b26;
}

.booth-shell {
  --accent-color: #2d7ff9;
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 1.5rem;
  padding: 1.25rem;
  background: radial-gradient(
    circle at top,
    color-mix(in srgb, var(--accent-color), white 78%) 0%,
    #f4f6fa 55%,
    #ebeff5 100%
  );
}

.booth-header {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  text-align: center;
}

.booth-header h1 {
  margin: 0;
}

.booth-actions {
  display: grid;
  gap: 0.85rem;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}

.booth-capture-form {
  width: 100%;
}

.button-large {
  width: 100%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 8.75rem;
  font-size: 1.45rem;
  font-weight: 700;
  text-align: center;
  padding: 1.1rem 1rem 1.25rem;
  line-height: 1.1;
  background: color-mix(in srgb, var(--accent-color), black 18%);
}

.camera-icon {
  display: inline-flex;
}

.camera-icon svg {
  width: 6rem;
  height: 6rem;
  fill: currentColor;
}

.camera-label {
  line-height: 1;
}

.button-small {
  font-size: 0.95rem;
  text-align: center;
  padding: 0.55rem 0.8rem;
}

.booth-upload-note {
  margin: 0;
  color: #4c5566;
  text-align: center;
}

.booth-upload-form {
  margin: 0;
}

.booth-upload-link {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.photo-library {
  margin-top: 1rem;
}

.photo-library-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.photo-library-header h2 {
  margin: 0;
}

.photo-view-toggle {
  display: inline-flex;
  gap: 0.5rem;
}

.photo-view-toggle .button {
  padding: 0.4rem 0.85rem;
}

.photo-view-toggle .button.is-active {
  background: #101626;
  border-color: #101626;
  color: #fff;
}

.photo-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}

.photo-table th,
.photo-table td {
  padding: 0.7rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.photo-table thead {
  background: color-mix(in srgb, #101626, white 92%);
}

.photo-row {
  cursor: pointer;
}

.photo-row:focus-visible {
  outline: 2px solid color-mix(in srgb, #101626, white 10%);
  outline-offset: -2px;
}

.photo-row:hover {
  background: color-mix(in srgb, #101626, white 96%);
}

.photo-table tbody tr:last-child td {
  border-bottom: 0;
}

.photo-thumbnail {
  width: 92px;
}

.photo-thumbnail-image {
  width: 72px;
  max-width: 100%;
  border-radius: 0.65rem;
  display: block;
}

.photo-filename {
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.photo-grid {
  display: grid;
  margin-top: 1rem;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.photo-open-button {
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.photo-grid img {
  width: 100%;
  border-radius: 0.65rem;
  display: block;
}

.photo-grid figure {
  position: relative;
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.photo-modal {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(92vw, 1120px);
  width: 92vw;
}

.photo-modal::backdrop {
  background: rgb(8 12 20 / 75%);
  backdrop-filter: blur(2px);
}

.photo-modal-card {
  margin: 0;
  border: 1px solid #263147;
  border-radius: 0.85rem;
  background: #111827;
  color: #f8fafc;
  padding: 0.75rem;
}

.photo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.photo-modal-filename {
  margin: 0;
  font-family: "SF Mono", "Monaco", "Consolas", monospace;
  font-size: 0.85rem;
  color: #dbe4f0;
  overflow-wrap: anywhere;
}

.photo-modal-close {
  flex: none;
  color: #f8fafc;
  border-color: #3d4a63;
  background: transparent;
}

.photo-modal-image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 0.65rem;
  display: block;
}

.device-photos {
  margin-top: 1rem;
}

.photo-delete-form {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  margin: 0;
}

.photo-delete {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, #9f1f1f, white 10%);
  color: #fff;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
}

.hint {
  color: #4c5566;
}

.errors {
  border: 1px solid #c74343;
  background: #fff4f4;
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
}

@media (max-width: 640px) {
  .page-shell {
    margin-top: 1rem;
  }

  .qr-card-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .qr-link-row {
    flex-direction: column;
    align-items: stretch;
  }

  .qr-copy-button {
    width: fit-content;
  }

  .qr-card-aside {
    justify-self: start;
    justify-items: start;
  }

  .photo-table {
    font-size: 0.92rem;
  }

  .photo-thumbnail {
    width: 76px;
  }

  .photo-thumbnail-image {
    width: 56px;
  }

  .photo-modal {
    width: 96vw;
    max-width: 96vw;
  }
}
