/* ==== The "desktop": XP taskbar dock bottom-right, Messenger toasts, BonziBUDDY ================== */
.page { padding-bottom: 70px; }   /* room for the dock */

/* ---- dock ---------------------------------------------------------------------------------------- */
.dock {
  position: fixed; right: 0; bottom: 0; z-index: 350;
  display: flex; align-items: stretch; gap: 4px;
  height: 34px; padding: 3px 0 3px 6px;
  background: linear-gradient(#3168d5 0%, #4993e6 8%, #245edb 40%, #245edb 88%, #1941a5 100%);
  border-top: 1px solid #0f3fa0; border-left: 1px solid #0f3fa0;
  border-radius: 6px 0 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .4);
  font: 11px Tahoma, "Segoe UI", Verdana, sans-serif;
  padding-bottom: calc(3px + env(safe-area-inset-bottom));
  height: calc(34px + env(safe-area-inset-bottom));
}
.dock .task {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  min-width: 150px; max-width: 220px; padding: 0 10px 0 6px;
  border: 1px solid #1a49a8; border-radius: 3px; cursor: pointer;
  background: linear-gradient(#3c81f3, #2f6fe3 45%, #2864d4); color: #fff;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .35);
  font: 11px Tahoma, "Segoe UI", Verdana, sans-serif; text-align: left;
}
.dock .task:hover { filter: brightness(1.1); }
.dock .task.active { background: linear-gradient(#1a4fbd, #1d55c8); box-shadow: inset 1px 1px 3px rgba(0, 0, 20, .5); }
.dock .task.flash { animation: taskflash 1s steps(2) infinite; }
@keyframes taskflash { 50% { background: linear-gradient(#ffb347, #f28c1e); border-color: #b95d00; } }
.dock .task .ic { font-size: 16px; }
.dock .task .lb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock .task .sh { display: none; }
.dock .task .badge:empty { display: none; }
.dock .task .badge { position: absolute; right: -4px; top: -6px; background: #e33; color: #fff; font-weight: bold; font-size: 10px; line-height: 15px; min-width: 15px; padding: 0 4px; border-radius: 8px; text-align: center; border: 1px solid #fff; }
.dock .tray { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 8px; margin-left: 4px; border-left: 1px solid #0f3fa0; box-shadow: inset 1px 0 0 #4c8ae8; background: linear-gradient(#0f9ff2, #0a7ad8 20%, #0a63c4 88%, #0a4fa3); color: #fff; }
.dock .tray span { font-size: 12px; }
.dock .clock { font-size: 11px; }
@media (max-width: 520px) {
  .dock .task { min-width: 0; padding: 0 8px 0 6px; }
  .dock .task .lb { display: none; }
  .dock .task .sh { display: inline; }
  .dock .tray span:not(.clock) { display: none; }
}

/* ---- toasts, springing from the Messenger button ------------------------------------------------- */
#toasts { position: fixed; right: 8px; bottom: calc(44px + env(safe-area-inset-bottom)); z-index: 360; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.msn-toast {
  pointer-events: auto;
  width: 260px; max-width: calc(100vw - 16px);
  font: 11px/1.35 Tahoma, "Segoe UI", sans-serif; color: #123;
  background: linear-gradient(#f3f8ff, #d3e2f7);
  border: 1px solid #5c86c5; border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  transform-origin: 90% 100%;
  animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2);
  cursor: pointer; overflow: hidden;
}
.msn-toast.out { animation: toast-out .3s ease-in forwards; }
@keyframes toast-in { from { transform: translateY(30px) scale(.2); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(30px) scale(.2); opacity: 0; } }
.msn-toast .tt { display: flex; align-items: center; gap: 5px; padding: 3px 7px; background: linear-gradient(#0997ff, #0053ee 30%, #06f); color: #fff; font-weight: bold; font-size: 10px; text-shadow: 1px 1px 0 #0a1f6b; }
.msn-toast .tt .x { margin-left: auto; font-weight: bold; cursor: pointer; padding: 0 3px; }
.msn-toast .tb { display: flex; gap: 8px; padding: 8px; align-items: center; }
.msn-toast .tb .av { font-size: 22px; width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: #fff; border: 1px solid #9bb6dc; border-radius: 3px; }
.msn-toast .tb b { color: #1d3f7a; }
.msn-toast .tb > div { min-width: 0; overflow-wrap: anywhere; }

/* ---- BonziBUDDY ------------------------------------------------------------------------------------ */
.bonzi { position: fixed; right: 14px; bottom: calc(40px + env(safe-area-inset-bottom)); z-index: 340; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
.bonzi > * { pointer-events: auto; }
.bz-fig { background-repeat: no-repeat; image-rendering: auto; cursor: pointer; filter: drop-shadow(2px 4px 4px rgba(0, 0, 0, .45)); }
.bz-bubble {
  position: relative; max-width: 290px; margin: 0 40px 6px 0;
  background: #ffffe1; border: 1px solid #000; border-radius: 10px;
  padding: 8px 10px; font: 13px/1.35 "MS Sans Serif", Tahoma, Verdana, sans-serif; color: #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .25);
}
.bz-bubble::after { content: ""; position: absolute; right: 26px; bottom: -12px; border: 12px solid transparent; border-top-color: #000; border-bottom: 0; border-right: 0; }
.bz-bubble::before { content: ""; position: absolute; right: 27px; bottom: -10px; border: 11px solid transparent; border-top-color: #ffffe1; border-bottom: 0; border-right: 0; z-index: 1; }
.bz-bubble.pop { animation: bzpop .25s ease-out; }
@keyframes bzpop { 0% { transform: scale(.9); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.bz-text { min-height: 18px; }
.bz-menu { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; padding-top: 6px; border-top: 1px dotted #999; }
.bz-menu button { font: 11px Tahoma, Verdana, sans-serif; padding: 2px 8px; border: 1px solid #003c74; border-radius: 3px; background: linear-gradient(#fff, #ecebe5 40%, #d6d2c2); cursor: pointer; }
.bz-menu button:hover { box-shadow: inset 0 0 0 1px #ffc73c; }
.bz-menu .bz-away { margin-left: auto; }
.bz-menu .bz-mute { padding: 2px 5px; }
@media (max-width: 520px) {
  .bonzi { right: 6px; }
  .bz-fig { transform: scale(.75); transform-origin: bottom right; margin-bottom: -20px; }
  .bz-bubble { max-width: calc(100vw - 30px); margin-right: 20px; font-size: 12px; }
}
