/* Winter is a complete visual theme; the user's own wallpaper remains stored. */
html[data-theme="winter"]:not([data-theme-custom]),
html[data-theme-decor="winter"]:not([data-theme-custom]),
html.theme-winter:not([data-theme-custom]){
  --rail: #10305a;
  --sidebar: #214e82;
  --sidebar-head: #153b6b;
  --accent: #1764cc;
  --accent-hover: #1253ae;
  --accent-soft: #e7f3ff;
  --accent-mark: #a6d7ff;
  --mention-bg: #e3f2ff;
  --login-bg: #10305a;
  --login-glow: rgba(141, 200, 255, .35);
  --text-strong: #183a69;
}

html[data-theme="winter"]:not([data-theme-custom]) .chat-wallpaper,
html[data-theme-decor="winter"]:not([data-theme-custom]) .chat-wallpaper,
html.theme-winter:not([data-theme-custom]) .chat-wallpaper{
  background-color: #a8cff4 !important;
  background-image: var(--theme-chat-image, url('/wallpapers/winter-landscape-v2.jpg')) !important;
  background-position: var(--theme-chat-position, center center) !important;
  background-size: var(--theme-chat-size, cover) !important;
  background-repeat: var(--theme-chat-repeat, no-repeat) !important;
}

html[data-theme="winter"]:not([data-theme-custom]) .sidebar,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar,
html.theme-winter:not([data-theme-custom]) .sidebar{
  isolation: isolate;
  background-color: #174574 !important;
  background-image: url('/wallpapers/winter-sidebar-painted-v2.png') !important;
  background-position: left bottom !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
html[data-theme="winter"]:not([data-theme-custom]) .sidebar-header,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar-header,
html.theme-winter:not([data-theme-custom]) .sidebar-header{ background: transparent !important; }

html[data-theme="winter"]:not([data-theme-custom]) .sidebar-footer,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar-footer,
html.theme-winter:not([data-theme-custom]) .sidebar-footer{ background: transparent !important; }

html[data-theme="winter"]:not([data-theme-custom]) .team-rail,
html[data-theme-decor="winter"]:not([data-theme-custom]) .team-rail,
html.theme-winter:not([data-theme-custom]) .team-rail{
  background-color: #10305a !important;
  background-image: linear-gradient(165deg, #102e58, #174a7f) !important;
}
html[data-theme="winter"]:not([data-theme-custom]) .team-rail .team-mark.rail-home,
html[data-theme="winter"]:not([data-theme-custom]) .sidebar-team-mark,
html[data-theme-decor="winter"]:not([data-theme-custom]) .team-rail .team-mark.rail-home,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar-team-mark,
html.theme-winter:not([data-theme-custom]) .team-rail .team-mark.rail-home,
html.theme-winter:not([data-theme-custom]) .sidebar-team-mark{ position: relative !important; overflow: visible !important; }

html[data-theme="winter"]:not([data-theme-custom]) .team-rail .team-mark.rail-home::after,
html[data-theme="winter"]:not([data-theme-custom]) .sidebar-team-mark::after,
html[data-theme-decor="winter"]:not([data-theme-custom]) .team-rail .team-mark.rail-home::after,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar-team-mark::after,
html.theme-winter:not([data-theme-custom]) .team-rail .team-mark.rail-home::after,
html.theme-winter:not([data-theme-custom]) .sidebar-team-mark::after{
  content: "" !important;
  position: absolute !important;
  left: 5px !important;
  right: 5px !important;
  top: 79% !important;
  height: 27px !important;
  background: url('/wallpapers/winter-icicles.svg') center top / 100% 100% no-repeat !important;
  pointer-events: none !important;
  filter: drop-shadow(0 1px 2px rgba(23, 88, 143, .45)) !important;
}
html[data-theme="winter"]:not([data-theme-custom]) .sidebar .filter,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar .filter,
html.theme-winter:not([data-theme-custom]) .sidebar .filter{
  background: rgba(154, 205, 246, .18) !important;
  border: 1px solid rgba(212, 240, 255, .46) !important;
  box-shadow: inset 0 1px 4px rgba(219, 244, 255, .16) !important;
  color: #fff !important;
}
html[data-theme="winter"]:not([data-theme-custom]) .sidebar .nav-item.active,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar .nav-item.active,
html.theme-winter:not([data-theme-custom]) .sidebar .nav-item.active{
  background: rgba(131, 195, 255, .34) !important;
  box-shadow: inset 0 0 0 1px rgba(225, 246, 255, .54), 0 2px 12px rgba(6, 35, 73, .18) !important;
}
html[data-theme="winter"]:not([data-theme-custom]) .sidebar .nav-item:hover,
html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar .nav-item:hover,
html.theme-winter:not([data-theme-custom]) .sidebar .nav-item:hover{ background: rgba(160, 215, 255, .22) !important; }

html[data-theme="winter"]:not([data-theme-custom]) .channel-header,
html[data-theme="winter"]:not([data-theme-custom]) .composer-shell,
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-header,
html[data-theme-decor="winter"]:not([data-theme-custom]) .composer-shell,
html.theme-winter:not([data-theme-custom]) .channel-header,
html.theme-winter:not([data-theme-custom]) .composer-shell{
  background: rgba(218, 238, 255, .68) !important;
  border: 1px solid rgba(255, 255, 255, .96) !important;
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, .76), 0 3px 18px rgba(62, 119, 181, .24) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
}
/* Snow rests on the chat window, above the separate glass header.
   Keep it for saved winter themes too (they set data-theme-custom). */
html:is([data-theme="winter"], [data-theme-decor="winter"], .theme-winter) .channel-header::before{
  content: none !important;
}
html:is([data-theme="winter"], [data-theme-decor="winter"], .theme-winter).chat-chrome-overlay .main::before{
  content: "";
  position: absolute;
  inset: 3px 10px 10px;
  border-radius: 24px;
  border: solid transparent;
  border-width: 32px 34px 9px;
  border-image: url('/wallpapers/winter-header-frost.png') 145 150 80 / 32px 34px 9px / 0 stretch;
  filter: drop-shadow(0 2px 3px rgba(235, 250, 255, .65));
  pointer-events: none;
  z-index: 13;
}
html:is([data-theme="winter"], [data-theme-decor="winter"], .theme-winter) .app:is(.settings-open, .rail-feature-open, .mail-mode) .main::before{
  content: none;
}
@media (max-width: 800px) {
  html:is([data-theme="winter"], [data-theme-decor="winter"], .theme-winter).chat-chrome-overlay .main::before {
    top: max(0px, calc(var(--chat-win-top, 6px) - 5px));
    left: var(--chat-win-side, 6px);
    right: var(--chat-win-side, 6px);
    bottom: var(--chat-win-bottom, 6px);
    border-width: 25px 25px 7px;
    border-image-width: 25px 25px 7px;
  }
}
html[data-theme="winter"]:not([data-theme-custom]) .channel-header > .menu-toggle,
html[data-theme="winter"]:not([data-theme-custom]) .channel-header > .channel-avatar-btn,
html[data-theme="winter"]:not([data-theme-custom]) .channel-header > .channel-heading,
html[data-theme="winter"]:not([data-theme-custom]) .channel-header > .header-actions,
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-header > .menu-toggle,
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-header > .channel-avatar-btn,
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-header > .channel-heading,
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-header > .header-actions,
html.theme-winter:not([data-theme-custom]) .channel-header > .menu-toggle,
html.theme-winter:not([data-theme-custom]) .channel-header > .channel-avatar-btn,
html.theme-winter:not([data-theme-custom]) .channel-header > .channel-heading,
html.theme-winter:not([data-theme-custom]) .channel-header > .header-actions{ position: relative !important; z-index: 1 !important; }

html[data-theme="winter"]:not([data-theme-custom]) .composer-shell,
html[data-theme-decor="winter"]:not([data-theme-custom]) .composer-shell,
html.theme-winter:not([data-theme-custom]) .composer-shell{
  box-shadow: inset 0 1px 12px rgba(255, 255, 255, .82), 0 0 0 2px rgba(227, 246, 255, .36), 0 3px 18px rgba(62, 119, 181, .24) !important;
}
html[data-theme="winter"]:not([data-theme-custom]) .channel-title,
html[data-theme="winter"]:not([data-theme-custom]) .channel-topic,
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-title,
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-topic,
html.theme-winter:not([data-theme-custom]) .channel-title,
html.theme-winter:not([data-theme-custom]) .channel-topic{ color: #ffffff !important; }
html[data-theme="winter"]:not([data-theme-custom]) .channel-header :is(.menu-toggle, .icon-btn, .header-btn),
html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-header :is(.menu-toggle, .icon-btn, .header-btn),
html.theme-winter:not([data-theme-custom]) .channel-header :is(.menu-toggle, .icon-btn, .header-btn){ color: #ffffff !important; }
html[data-theme="winter"]:not([data-theme-custom]) .composer :is(.icon-btn, .composer-fmt-btn, .composer-attach-src),
html[data-theme-decor="winter"]:not([data-theme-custom]) .composer :is(.icon-btn, .composer-fmt-btn, .composer-attach-src),
html.theme-winter:not([data-theme-custom]) .composer :is(.icon-btn, .composer-fmt-btn, .composer-attach-src){ color: #B0CCE8 !important; }

html[data-theme="winter"]:not([data-theme-custom]) .theme-choice-preview-winter,
html[data-theme-decor="winter"]:not([data-theme-custom]) .theme-choice-preview-winter,
html.theme-winter:not([data-theme-custom]) .theme-choice-preview-winter{
  background: url('/wallpapers/winter-landscape-v2.jpg') center / cover !important;
}
.theme-choice-preview-winter { background: url('/wallpapers/winter-landscape-v2.jpg') center / cover !important; }
.theme-choice-preview-winter .theme-choice-side { background: rgba(185, 220, 249, .3) !important; }

@media (min-width: 801px) {
  html[data-theme="winter"]:not([data-theme-custom]).chat-chrome-overlay .main::after,
  html[data-theme-decor="winter"]:not([data-theme-custom]).chat-chrome-overlay .main::after,
  html.theme-winter:not([data-theme-custom]).chat-chrome-overlay .main::after,
  html[data-theme="winter"]:not([data-theme-custom]) .main::after,
  html[data-theme-decor="winter"]:not([data-theme-custom]) .main::after,
  html.theme-winter:not([data-theme-custom]) .main::after {
    background: var(--glass-window-bg, rgba(230, 246, 255, .55)) !important;
    border: 1px solid rgba(255, 255, 255, .92) !important;
    box-shadow: inset 0 0 0 3px rgba(214, 239, 255, .38), inset 0 2px 14px rgba(255, 255, 255, .88), 0 12px 35px rgba(32, 87, 145, .22) !important;
  }
}
@media (max-width: 800px) {
  html[data-theme="winter"]:not([data-theme-custom]) .chat-wallpaper,
  html[data-theme-decor="winter"]:not([data-theme-custom]) .chat-wallpaper,
  html.theme-winter:not([data-theme-custom]) .chat-wallpaper { background-position: 72% center !important; }

  html[data-theme="winter"].ios-device:not([data-theme-custom]) .sidebar,
  html[data-theme="winter"]:not([data-theme-custom]) .sidebar,
  html[data-theme-decor="winter"].ios-device:not([data-theme-custom]) .sidebar,
  html[data-theme-decor="winter"]:not([data-theme-custom]) .sidebar,
  html.theme-winter.ios-device:not([data-theme-custom]) .sidebar,
  html.theme-winter:not([data-theme-custom]) .sidebar{
    background-image: url('/wallpapers/winter-sidebar-painted-v2.png') !important;
    background-position: left bottom !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
  }
  html[data-theme="winter"].chat-chrome-overlay:not([data-theme-custom]) .main::after,
  html[data-theme-decor="winter"].chat-chrome-overlay:not([data-theme-custom]) .main::after,
  html.theme-winter.chat-chrome-overlay:not([data-theme-custom]) .main::after{
    background: var(--glass-window-bg, rgba(230, 246, 255, .55)) !important;
    border: 1px solid rgba(255, 255, 255, .88) !important;
    box-shadow: inset 0 0 0 2px rgba(214, 239, 255, .35), inset 0 2px 12px rgba(255, 255, 255, .72), 0 9px 28px rgba(32, 87, 145, .19) !important;
  }
  html[data-theme="winter"]:not([data-theme-custom]) .channel-header,
  html[data-theme="winter"]:not([data-theme-custom]) .composer-shell,
  html[data-theme-decor="winter"]:not([data-theme-custom]) .channel-header,
  html[data-theme-decor="winter"]:not([data-theme-custom]) .composer-shell,
  html.theme-winter:not([data-theme-custom]) .channel-header,
  html.theme-winter:not([data-theme-custom]) .composer-shell{ border-radius: 14px !important; }
}

/* The default brand has its own snowy artwork; keep workspace logos intact. */
html:is([data-theme="winter"], [data-theme-decor="winter"], .theme-winter) :is(.rail-home, .sidebar-team-mark) > img[src*="/logo.png"] {
  content: url('/wallpapers/winter-logo-v2.png');
}
html[data-theme]:is([data-theme="winter"], [data-theme-decor="winter"], .theme-winter) :is(.team-rail .team-mark.rail-home, .sidebar-team-mark):has(> img[src*="/logo.png"])::after {
  content: none !important;
}
