/* Christmas palette and optional page decorations. */
.theme-christmas {
  --wallpaper: url("/static/themes/christmas/background.svg");
  --wallpaper-size: 480px 600px;
  --wallpaper-color: #203e35;
  --paper: #fcf8ee;
  --ink: #332e28;
  --muted: #776c60;
  --line: #e4d9c6;
  --accent: #8d343c;
  --accent-hover: #6f2730;
  --soft: #e8ecdf;
  --soft-hover: #dae2ce;
  --tag-ink: #355847;
  --hero-paper: #f1e5d0;
  --card-paper: #fffaf1;
  --input-paper: #fffdf6;
  --control-line: #c7baa4;
  --focus: #8d343c;
}

.theme-christmas .collection-heading h1,
.theme-christmas .collection-title,
.theme-christmas .collection-initial { color: var(--accent); }
.theme-christmas .folder-tabs span:nth-child(1) { background: #658268; }
.theme-christmas .folder-tabs span:nth-child(2) { background: #d9b679; }
.theme-christmas .folder-tabs span:nth-child(3) { background: #a74e50; }
.theme-christmas .toolbar { background: var(--soft); }
.theme-christmas .toolbar button:hover:not(:disabled),
.theme-christmas .toolbar-more summary:hover { background: var(--soft-hover); }
.theme-christmas .toolbar button[aria-pressed="true"] { background: var(--hero-paper); border-color: var(--control-line); }
.theme-christmas .notice { background: var(--soft); border-color: var(--control-line); }
.theme-christmas .tags .tag, .theme-christmas .tag-directory .tag { border-color: var(--line); }

@media screen {
  body.theme-christmas .site-paper { position: relative; margin-top: 64px; border-top: 4px solid #fffdf7; }
  body.theme-christmas .site-header { padding-top: 46px; }
  body.theme-christmas[data-signed-in] .brand .wordmark { width: 280px; }
  body.theme-christmas .site-paper > .theme-top-decoration > :is(.theme-decoration-wide, .theme-decoration-compact) {
    position: absolute; top: -31px; left: 0; width: 100%; height: 68px; z-index: 2;
  }
  .theme-christmas .theme-decoration-compact { display: none; }
  .theme-christmas .theme-corner {
    position: absolute; top: -15px; left: -10px; width: 180px; height: 82px; z-index: 1;
    filter: drop-shadow(0 2px 1.5px #34483a26);
  }
  .theme-christmas .theme-corner-right { left: auto; right: -10px; transform: scaleX(-1); }
  body.theme-christmas[data-signed-in] main { min-height: 0; padding-bottom: 16px; }
  body.theme-christmas .theme-scene { margin-top: -5px; }
  body.theme-christmas .theme-scene picture img { aspect-ratio: 1040 / 280; }
  body.theme-christmas .theme-scene .theme-footer-button {
    left: 63.75%; top: 61.4286%; width: 7.7731%; min-width: 0; min-height: 0;
  }
  body.theme-christmas .site-footer { border-top: none; justify-content: flex-end; }

  /* The narrow sign-in sheet uses the compact strand even on a wide screen. */
  body.theme-christmas:is(.view-login, .view-passkey-choice) .theme-decoration-wide { display: none; }
  body.theme-christmas:is(.view-login, .view-passkey-choice) .site-paper > .theme-top-decoration > .theme-decoration-compact { display: block; height: auto; top: -21px; }

  /* Appearance cards show the decorations without changing the active theme. */
  .theme-preview.theme-christmas .theme-preview-paper { position: relative; padding-top: 35px; }
  .theme-preview.theme-christmas .theme-decoration-wide { display: none; }
  .theme-preview.theme-christmas .theme-decoration-compact { display: block; position: absolute; top: -12px; left: 0; width: 100%; height: auto; }
  .theme-preview.theme-christmas .theme-corner { width: 67.5px; height: auto; top: -6px; left: -3.75px; }
  .theme-preview.theme-christmas .theme-corner-right { left: auto; right: -3.75px; }
  .theme-preview.theme-christmas .theme-preview-wordmark { width: 160px; }
  .theme-preview.theme-christmas .theme-preview-scene { display: block; width: 160px; max-width: 100%; height: auto; margin-left: auto; }
}
@media screen and (min-width: 640px) and (max-width: 760px) {
  body.theme-christmas[data-signed-in] .brand .wordmark { width: 220px; }
}
@media screen and (max-width: 639px) {
  body.theme-christmas .site-paper { margin-top: 48px; }
  body.theme-christmas .site-header { padding-top: 35px; }
  body.theme-christmas[data-signed-in] .brand .wordmark { width: clamp(138px, 38vw, 166px); }
  body.theme-christmas .theme-decoration-wide { display: none; }
  body.theme-christmas .site-paper > .theme-top-decoration > .theme-decoration-compact { display: block; height: auto; top: -21px; }
  body.theme-christmas .theme-corner { width: 107.56px; height: 49px; top: -11px; left: -5.98px; }
  body.theme-christmas .theme-corner-right { left: auto; right: -5.98px; }
  body.theme-christmas .theme-scene { margin-top: 4px; }
  body.theme-christmas .theme-scene picture img { aspect-ratio: 400 / 280; }
  body.theme-christmas .theme-scene .theme-footer-button { left: 5.75%; width: 20.21%; }
  body.theme-christmas .site-footer { padding-top: 20px; }
}
