/* Yahoo Messenger Classic - Indigo Skin */
:root {
  --ym-purple: #5c2d91;
  --ym-purple-dark: #3d1d63;
  --ym-purple-light: #7b4bb5;
  --ym-lavender: #e8dff5;
  --ym-lavender-dark: #d4c4e8;
  --ym-yellow: #ffcc00;
  --ym-border: #9b7fc7;
  --ym-text: #1a1a1a;
  --ym-white: #ffffff;
  --ym-online: #00cc00;
  --ym-away: #ff9900;
  --ym-busy: #ff0000;
  --ym-offline: #999999;
  --ym-bg-gradient: linear-gradient(180deg, #f0e8f8 0%, #ddd0ef 50%, #c8b8e0 100%);
  --font-ui: Tahoma, "Segoe UI", Arial, sans-serif;
  --font-chat: Tahoma, Verdana, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ym-text);
  background: var(--ym-bg-gradient);
  overflow: hidden;
  user-select: none;
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
}

input, select, textarea {
  font-family: var(--font-ui);
}

.ym-btn {
  background: linear-gradient(180deg, #f8f4fc 0%, #e0d4f0 45%, #c8b4e4 100%);
  border: 1px solid var(--ym-border);
  border-radius: 3px;
  padding: 3px 14px;
  font-size: 11px;
  color: var(--ym-text);
  min-height: 22px;
}

.ym-btn:hover {
  background: linear-gradient(180deg, #fff 0%, #ece4f8 45%, #d8c8f0 100%);
}

.ym-btn:active {
  background: linear-gradient(180deg, #d0c0e8 0%, #c0b0dc 100%);
}

.ym-btn-primary {
  background: linear-gradient(180deg, #8b5fc8 0%, #6b3fa8 50%, #5c2d91 100%);
  color: white;
  border-color: var(--ym-purple-dark);
  font-weight: bold;
}

.ym-btn-primary:hover {
  background: linear-gradient(180deg, #9b6fd8 0%, #7b4fb8 50%, #6c3da1 100%);
}

.ym-btn-danger {
  background: linear-gradient(180deg, #d9534f 0%, #c9302c 50%, #a02622 100%);
  color: white;
  border-color: #8b211e;
  font-weight: bold;
}

.ym-btn-danger:hover {
  background: linear-gradient(180deg, #e9635f 0%, #d9403c 50%, #b03632 100%);
}

.ym-titlebar {
  background: linear-gradient(180deg, var(--ym-purple-light) 0%, var(--ym-purple) 40%, var(--ym-purple-dark) 100%);
  color: white;
  padding: 4px 8px;
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.available { background: var(--ym-online); box-shadow: 0 0 3px #0f0; }
.status-dot.away { background: var(--ym-away); }
.status-dot.busy { background: var(--ym-busy); }
.status-dot.phone { background: var(--ym-busy); }
.status-dot.lunch { background: var(--ym-away); }
.status-dot.invisible,
.status-dot.offline { background: var(--ym-offline); }

.ym-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ym-dialog {
  background: var(--ym-bg-gradient);
  border: 2px solid var(--ym-purple);
  border-radius: 4px;
  box-shadow: 4px 4px 12px rgba(0,0,0,0.4);
  min-width: 300px;
}

.ym-dialog-header {
  background: linear-gradient(180deg, var(--ym-purple-light), var(--ym-purple));
  color: white;
  padding: 6px 10px;
  font-weight: bold;
}

.ym-dialog-body { padding: 16px; }

.ym-dialog-footer {
  padding: 8px 16px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ym-field { margin-bottom: 10px; }

.ym-field label {
  display: block;
  margin-bottom: 3px;
  font-weight: bold;
}

.ym-field input,
.ym-field select {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--ym-border);
  border-radius: 2px;
  font-size: 11px;
}

.login-error {
  background: #ffe0e0;
  border: 1px solid #ff6666;
  color: #cc0000;
  padding: 6px 8px;
  margin-bottom: 10px;
  border-radius: 3px;
  font-size: 10px;
}

.hidden { display: none !important; }

/* Buzz shake — messenger + chat (mobile PWA + desktop web) */
body.buzzing {
  animation: yoyo-buzz-shake 0.85s ease-in-out;
}

@keyframes yoyo-buzz-shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-10px, 4px); }
  20% { transform: translate(10px, -4px); }
  30% { transform: translate(-10px, -4px); }
  40% { transform: translate(10px, 4px); }
  50% { transform: translate(-6px, 2px); }
  60% { transform: translate(6px, -2px); }
  70% { transform: translate(-4px, 1px); }
  80% { transform: translate(4px, 1px); }
  90% { transform: translate(-2px, 0); }
}

.yoyo-buzz-toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(120%);
  z-index: 11000;
  max-width: min(90vw, 360px);
  padding: 12px 18px;
  background: linear-gradient(180deg, #5c2d91, #3d1d63);
  color: #fff;
  font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.yoyo-buzz-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: #e0d4f0; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c8b4e4, #a080c8);
  border: 1px solid var(--ym-border);
  border-radius: 2px;
}
