/* Like the Christmas theme, these decorations are for tablets and desktops. */
body.chat-theme-easter {
  --island-radio-art: url("images/themes/easter/ostertau.webp");
  --island-edge-art: url("images/themes/easter/strandkante.webp");
  --island-edge-slice: 0 290 0 250 fill;
  --island-edge-right-scale: 3.15;
  --island-edge-left-scale: 2.72;
  --island-logo-art: url("images/themes/easter/hase.webp");
  --island-accent-art: url("images/themes/easter/strandnest.webp");
}

body.chat-theme-halloween {
  --island-radio-art: url("images/themes/halloween/geistertau.webp");
  --island-edge-art: url("images/themes/halloween/nebelkante.webp");
  --island-edge-slice: 0 270 0 270 fill;
  --island-edge-right-scale: 2.7;
  --island-edge-left-scale: 2.7;
  --island-logo-art: url("images/themes/halloween/kuestengeist.webp");
  --island-logo-width: clamp(58px, 4vw, 76px);
  --island-accent-art: url("images/themes/halloween/geisterschiff.webp");
  --island-accent-width: 236px;
  --island-accent-height: 94px;
}

@media (min-width: 481px) {
  body:is(.chat-theme-easter, .chat-theme-halloween) .chat-radio-head .radio-player {
    position: relative;
  }

  body:is(.chat-theme-easter, .chat-theme-halloween) .radio-player::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: calc(100% - 2px);
    height: clamp(12px, 1.75vw, 17px);
    background: var(--island-radio-art) center bottom / 100% 100% no-repeat;
    pointer-events: none;
  }

  /* Keep the edge outside the scrollable chat, even in history mode. */
  body:is(.chat-theme-easter, .chat-theme-halloween) .chat-seasonal-edge {
    --edge-height: clamp(22px, 1.9vw, 36px);
    display: block;
    flex: 0 0 var(--edge-height);
    margin-bottom: -8px;
    /* Only stretch the centre. The two decorated ends retain their shape. */
    border-image: var(--island-edge-art) var(--island-edge-slice)
      / 0 calc(var(--edge-height) * var(--island-edge-right-scale))
        0 calc(var(--edge-height) * var(--island-edge-left-scale)) stretch;
    pointer-events: none;
  }
}

@media (min-width: 1101px) {
  body:is(.chat-theme-easter, .chat-theme-halloween) .sidebar .logo {
    position: relative;
  }

  body:is(.chat-theme-easter, .chat-theme-halloween) .sidebar .logo::before {
    content: "";
    position: absolute;
    top: -10px;
    right: 0;
    width: var(--island-logo-width, clamp(56px, 5vw, 84px));
    height: clamp(48px, 4vw, 68px);
    background: var(--island-logo-art) center / contain no-repeat;
    pointer-events: none;
  }

  body:is(.chat-theme-easter, .chat-theme-halloween) .chat-seasonal-accent {
    display: block;
    width: min(var(--island-accent-width, 178px), 100%);
    height: var(--island-accent-height, 58px);
    margin: 0 auto 10px;
    background: var(--island-accent-art) center / contain no-repeat;
    pointer-events: none;
  }
}
