#mf-holiday[hidden], .mf-holiday-toggle[hidden] { display: none !important; }
.mf-holiday-garland {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  margin-top: -2px;
  flex: 0 0 auto;
  height: 64px;
  z-index: 1;                 /* below every menu: dropdowns (z-index 99 landing header, 1000 Bootstrap) open over the garland */
  background: url('/images/holiday-garland.svg') repeat-x top center / 320px 64px;
  pointer-events: none;
  user-select: none;
  contain: layout paint style;
}
.mf-holiday-snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1035;
  pointer-events: none;
  contain: strict;
  transform: translateZ(0);
  will-change: transform;
}
.mf-holiday-toggle {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1060;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 15px;
  border: 1px solid rgba(168, 211, 229, .28);
  border-radius: 999px;
  background: rgba(12, 22, 31, .94);
  box-shadow: 0 5px 24px rgba(0, 0, 0, .25);
  color: #e5f4ff;
  font: 600 12px/1.2 system-ui, sans-serif;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.mf-holiday-toggle svg { width: 18px; height: 18px; color: #a1e8ff; flex: 0 0 auto; }
.mf-holiday-toggle:hover { border-color: #a1e8ff; background: #152b39; color: #fff; }
.mf-holiday-toggle:focus-visible { outline: 2px solid #a1e8ff; outline-offset: 3px; }
.mf-holiday-toggle[aria-pressed="false"] { color: #a9bbca; }

.mf-holiday-toggle-item { flex: 0 0 auto; }
/* The header snow button has the id #holiday-snow-toggle and is styled by the same rules as #theme-toggle. */
.mf-holiday-toggle--header {
  position: static; right: auto; bottom: auto; z-index: auto;   /* the floating pill is fixed; in the header it is an ordinary item */
  min-height: 0; padding: 0; gap: 0; font: inherit;
  width: 36px; height: 36px;                                    /* size/colours/hover come from the shared #theme-toggle rules */
}
.mf-holiday-toggle--header span { display: none; }
.mf-holiday-toggle--header > i { font-size: 1rem; line-height: 1; color: inherit; background: transparent; }

/* Snow caps on the round header buttons (JS marks the buttons while the holiday mode is on). */
button.mf-holiday-cap { position: relative; }
button.mf-holiday-cap::before {
  content: '';
  position: absolute;
  z-index: 3;
  left: 50%;
  top: -7px;
  width: 36px;
  height: 14px;
  margin-left: -18px;
  transform: rotate(-5deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 14'%3E%3Cpath d='M1 12.5C2.4 7 6.5 6.4 9 5.6 11.5 1.2 17 -.4 22 1.6c2 .8 3.400 2 4.200 3.400C30.500 5 34 7.600 35 12.500c-1.300.8-2.600.3-3.400-.9-.9 1.900-3 2.400-4.300.8-1.200 1.800-3.600 2-4.800.2-1.400 1.800-4.200 1.600-5-.4-1.200 1.500-3.800 1.600-4.800-.3-1.200 1.600-3.600 1.600-4.700-.2-1 1.300-2.600 1.600-3.500.7C2.600 13.700 1.700 13.500 1 12.500Z' fill='%23fff'/%3E%3Cpath d='M3 11.500c1.200-3.400 4-4 6-4.200M25 3.800c3.200.7 6 3 7 6.500' fill='none' stroke='%23d6e7f7' stroke-width='1.200' stroke-linecap='round'/%3E%3Ccircle cx='15' cy='4' r='.9' fill='%23cfe3f5'/%3E%3Ccircle cx='23' cy='8' r='.7' fill='%23cfe3f5'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 1px 1px rgba(70, 110, 160, .55));
  pointer-events: none;
}
/* The red notification counter always stays on top of the bell's cap, and the cap leans left so they do not collide. */
button.mf-holiday-cap .notif-badge { z-index: 6; }
button#notif-bell-toggle.mf-holiday-cap::before { left: 38%; width: 30px; height: 12px; margin-left: -15px; }
[data-theme="dark"] button.mf-holiday-cap::before { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .6)); }
@media (max-width: 991px) {
  button.mf-holiday-cap::before { top: -8px; width: 40px; height: 15px; margin-left: -20px; }
  button#notif-bell-toggle.mf-holiday-cap::before { width: 32px; height: 13px; margin-left: -16px; }
}

/* A Santa hat on the logo in the dashboard sidebar (JS marks the brand link while the holiday mode is on). */
a.sidebar-brand.mf-holiday-hat { position: relative; padding-top: 33px !important; }   /* the hat rests on the logo's top edge */
a.sidebar-brand.mf-holiday-hat::before {
  content: '';
  position: absolute;
  z-index: 3;
  left: 14px;
  top: 2px;
  width: 56px;
  height: 36px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 34'%3E%3Cpath d='M7 25C8 12 17 3 29 4c7 1 12 6 14 13 1 3 1 6 1 8Z' fill='%23d8343c'/%3E%3Cpath d='M7 25C8 17 12 10 18 6c-3 5-4 11-3 19ZM33 5c5 2 9 7 10 13 1 2 1 5 1 7h-7c1-8-1-15-4-20Z' fill='%23b32229' opacity='.55'/%3E%3Cpath d='M12 12C15 8 20 5 26 5' fill='none' stroke='%23ff7a80' stroke-width='1.600' stroke-linecap='round' opacity='.7'/%3E%3Crect x='3' y='23' width='46' height='9' rx='4.500' fill='%23fff'/%3E%3Cpath d='M7 28h38' stroke='%23d6e7f7' stroke-width='1.200' stroke-linecap='round'/%3E%3Ccircle cx='44' cy='14' r='5.500' fill='%23fff'/%3E%3Ccircle cx='42.500' cy='12.500' r='1.400' fill='%23d6e7f7'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: rotate(-7deg);
  transform-origin: 70% 90%;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .5));
  pointer-events: none;
}

/* A Santa hat on the first letter of the landing logo (sized in em, so it follows the logo's font size). */
a.navbar-brand .lp-nav-logo-text.mf-holiday-hat { position: relative; display: inline-block; }
a.navbar-brand .lp-nav-logo-text.mf-holiday-hat::before {
  content: '';
  position: absolute;
  z-index: 3;
  left: -.17em;
  top: -.4em;
  width: 1.26em;
  height: .82em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 34'%3E%3Cpath d='M7 25C8 12 17 3 29 4c7 1 12 6 14 13 1 3 1 6 1 8Z' fill='%23d8343c'/%3E%3Cpath d='M7 25C8 17 12 10 18 6c-3 5-4 11-3 19ZM33 5c5 2 9 7 10 13 1 2 1 5 1 7h-7c1-8-1-15-4-20Z' fill='%23b32229' opacity='.55'/%3E%3Cpath d='M12 12C15 8 20 5 26 5' fill='none' stroke='%23ff7a80' stroke-width='1.600' stroke-linecap='round' opacity='.7'/%3E%3Crect x='3' y='23' width='46' height='9' rx='4.500' fill='%23fff'/%3E%3Cpath d='M7 28h38' stroke='%23d6e7f7' stroke-width='1.200' stroke-linecap='round'/%3E%3Ccircle cx='44' cy='14' r='5.500' fill='%23fff'/%3E%3Ccircle cx='42.500' cy='12.500' r='1.400' fill='%23d6e7f7'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: rotate(-9deg);
  transform-origin: 70% 90%;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .5));
  pointer-events: none;
}

/* A long snowdrift along the top of the faucet's Anti-Bot box (the pattern repeats seamlessly across any width). */
.abl-instructions.mf-holiday-drift-wide { position: relative; }
.abl-instructions.mf-holiday-drift-wide::before {
  content: '';
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  top: -13px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22'%3E%3Cpath d='M0 20C2 14 8 12 14 11 17 6 24 4 30 7 34 1 44-1 52 3 58 0 68 0 74 4 80 1 90 2 94 7 100 5 108 8 110 12 115 13 119 16 120 20 112 18 108 21 100 19 94 22 86 20 80 21 72 23 64 21 58 22 50 23 44 21 38 21 30 23 22 21 18 20 12 22 6 21 0 20Z' fill='%23fff'/%3E%3Cpath d='M6 18C9 14 13 13 17 12M36 9C41 4 48 3 54 5M78 6C84 4 90 5 94 9M102 11C106 11 110 13 112 16' fill='none' stroke='%23d6e7f7' stroke-width='1.300' stroke-linecap='round'/%3E%3Ccircle cx='24' cy='9' r='1' fill='%23cfe3f5'/%3E%3Ccircle cx='66' cy='6' r='.9' fill='%23cfe3f5'/%3E%3Ccircle cx='88' cy='12' r='.8' fill='%23cfe3f5'/%3E%3C/svg%3E") 0 0 / 120px 22px repeat-x;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .5));
  pointer-events: none;
}

/* A snowdrift on top of the "Invite a Friend" button (JS marks it while the holiday mode is on). */
a.btn-invite.mf-holiday-drift { position: relative; }
a.btn-invite.mf-holiday-drift::before {
  content: '';
  position: absolute;
  z-index: 2;
  left: -5px;
  right: -5px;
  top: -13px;
  height: 23px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 22' preserveAspectRatio='none'%3E%3Cpath d='M0 20C2 14 8 12 14 11 17 6 24 4 30 7 34 1 44-1 52 3 58 0 68 0 74 4 80 1 90 2 94 7 100 5 108 8 110 12 115 13 119 16 120 20 112 18 108 21 100 19 94 22 86 20 80 21 72 23 64 21 58 22 50 23 44 21 38 21 30 23 22 21 18 20 12 22 6 21 0 20Z' fill='%23fff'/%3E%3Cpath d='M6 18C9 14 13 13 17 12M36 9C41 4 48 3 54 5M78 6C84 4 90 5 94 9M102 11C106 11 110 13 112 16' fill='none' stroke='%23d6e7f7' stroke-width='1.300' stroke-linecap='round'/%3E%3Ccircle cx='24' cy='9' r='1' fill='%23cfe3f5'/%3E%3Ccircle cx='66' cy='6' r='.9' fill='%23cfe3f5'/%3E%3Ccircle cx='88' cy='12' r='.8' fill='%23cfe3f5'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(0 1px 1px rgba(70, 110, 160, .5));
  pointer-events: none;
}
[data-theme="dark"] a.btn-invite.mf-holiday-drift::before { filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .6)); }

/* On public pages the garland hangs over the top of the content (like a real one) instead of being a band in the
   page flow: a band showed the white page background behind it. */
.mf-holiday-garland--overlay {
  position: absolute;
  left: 0;
  right: 0;
  width: auto;
  margin: 0;
  z-index: 50;                /* below the landing header (z-index 99) and its menus, above the page content */
}
@media (max-width: 600px) {
  .mf-holiday-toggle:not(.mf-holiday-toggle--header) {
    padding: 10px 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
}
