/* =========================================================
   GOC Portal — birthdays.css
   Birthday popup, topbar chip and "Birthdays" widget.
   Uses the tokens defined in styles.css (:root).
   ========================================================= */

:root {
  --bday-gold: #e2ad4f;
  --bday-gold-soft: #f6c45b;
  --font-celebrate: Georgia, "Cambria", "Times New Roman", serif;
}

/* ---------------- Topbar chip ---------------- */

.btn-bday {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(246, 196, 91, 0.22), rgba(201, 134, 44, 0.18));
  color: #fde9bf;
  border: 1px solid rgba(246, 196, 91, 0.45);
  padding: 5px 11px 5px 8px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  animation: bday-chip-glow 2.8s ease-in-out infinite;
}
.btn-bday:hover {
  border-color: rgba(246, 196, 91, 0.8);
  color: #fff6e0;
  transform: translateY(-1px);
}
.btn-bday svg { flex: none; }
.bday-chip-count {
  display: none;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--bday-gold-soft);
  color: #2b1c04;
  font-size: 10.5px;
  line-height: 17px;
  text-align: center;
}
@keyframes bday-chip-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246, 196, 91, 0); }
  50% { box-shadow: 0 0 0 4px rgba(246, 196, 91, 0.14); }
}
@media (max-width: 760px) {
  .btn-bday .bday-chip-label { display: none; }
  .btn-bday .bday-chip-count { display: inline-block; }
  .btn-bday { padding: 5px 7px; }
}

/* ---------------- Birthdays widget ---------------- */

.bday-row {
  width: 100%;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  align-items: center;
}
.bday-row-text { min-width: 0; }
.bday-row--today {
  background: linear-gradient(90deg, rgba(246, 196, 91, 0.16), rgba(246, 196, 91, 0) 75%);
}
.bday-row--today .bday-row-avatar {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bday-gold);
}
.bday-row--today .widget-sub {
  color: #9a6216;
  font-weight: 600;
}

/* ---------------- Popup ---------------- */

body.bday-lock { overflow: hidden; }

.bday-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 32, 34, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.bday-overlay.is-open { opacity: 1; }
.bday-overlay[hidden] { display: none; }

.bday-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--paper-card);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 30, 32, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  transform: translateY(14px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.bday-overlay.is-open .bday-panel { transform: none; }

.bday-confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.bday-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  color: var(--teal-900);
  transition: background-color 0.15s ease;
}
.bday-close:hover { background: #fff; }
.bday-panel--self .bday-close { background: rgba(255, 255, 255, 0.14); color: #fff; }
.bday-panel--self .bday-close:hover { background: rgba(255, 255, 255, 0.26); }

.bday-test-badge {
  position: absolute;
  top: 16px;
  left: 14px;
  z-index: 4;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: repeating-linear-gradient(135deg, #c9862c 0 8px, #b9761f 8px 16px);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.bday-test-badge[hidden] { display: none; }

.bday-slide[hidden] { display: none; }
.bday-slide { animation: bday-slide-in 0.35s ease; }
@keyframes bday-slide-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}

/* ---- hero ---- */

.bday-hero {
  position: relative;
  text-align: center;
  padding: 34px 28px 26px;
  overflow: hidden;
}

/* Colleague: light, airy */
.bday-hero--colleague {
  background:
    radial-gradient(circle at 15% 20%, rgba(246, 196, 91, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 82% 30%, rgba(0, 115, 119, 0.25) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 78%, rgba(246, 196, 91, 0.3) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 25% 72%, rgba(0, 115, 119, 0.2) 0 1.5px, transparent 2.5px),
    radial-gradient(120% 90% at 50% 0%, #fdf3df 0%, var(--teal-100) 60%, #f7faf9 100%);
  border-bottom: 1px solid var(--line);
}

/* Birthday person: deep teal, gold */
.bday-hero--self {
  color: #f4fbfb;
  padding-top: 30px;
  background:
    radial-gradient(circle at 12% 18%, rgba(246, 196, 91, 0.7) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 86% 26%, rgba(255, 255, 255, 0.6) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 78% 70%, rgba(246, 196, 91, 0.55) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 20% 64%, rgba(255, 255, 255, 0.4) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 50% 120%, rgba(226, 173, 79, 0.35), transparent 55%),
    linear-gradient(160deg, var(--teal-700) 0%, var(--teal-900) 70%, #022a2c 100%);
}

.bday-cake {
  display: block;
  margin: 0 auto 6px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

.bday-eyebrow {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--teal-700);
}
.bday-hero--self .bday-eyebrow { color: var(--bday-gold-soft); margin: 14px 0 6px; }

.bday-photo,
.bday-avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--bday-gold), 0 12px 28px rgba(0, 60, 63, 0.25);
}
.bday-photo {
  width: 84px;
  height: 84px;
  background: var(--teal-600);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 6px var(--bday-gold), 0 12px 28px rgba(0, 0, 0, 0.3);
}
.bday-photo img,
.bday-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bday-title {
  margin: 0;
  font-family: var(--font-celebrate);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.2;
  color: #ffffff;
}
.bday-title em {
  font-style: italic;
  font-size: 38px;
  color: var(--bday-gold-soft);
  display: inline-block;
  margin-top: 2px;
}

.bday-name {
  margin: 18px 0 2px;
  font-family: var(--font-celebrate);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.2;
  color: var(--teal-900);
}
.bday-date {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-600);
}

/* ---- body ---- */

.bday-body { padding: 20px 26px 22px; }

.bday-message {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-900);
}
.bday-signoff {
  margin: 0 0 16px;
  font-family: var(--font-celebrate);
  font-style: italic;
  font-size: 14.5px;
  color: var(--teal-800);
}
.bday-note {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fdf5e4;
  color: #6b4610;
  font-size: 12.5px;
  line-height: 1.5;
}

.bday-lead {
  margin: 0 0 14px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-900);
}

.bday-textarea-wrap { position: relative; }
.bday-textarea {
  width: 100%;
  resize: vertical;
  min-height: 78px;
  padding: 11px 13px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfc;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-900);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.bday-textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(10, 139, 143, 0.15);
}
.bday-counter {
  position: absolute;
  right: 11px;
  bottom: 8px;
  font-size: 10.5px;
  color: var(--ink-400);
  pointer-events: none;
}

.bday-hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: var(--ink-400);
  text-align: center;
}
.bday-error {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--danger);
  text-align: center;
}
.bday-sent {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--teal-100);
  color: var(--teal-800);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

.bday-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

.bday-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.bday-btn--primary {
  background: var(--teal-700);
  color: #fff;
}
.bday-btn--primary:hover:not(:disabled) { background: var(--teal-600); }
.bday-btn--primary:disabled { opacity: 0.45; cursor: default; }
.bday-btn--ghost {
  background: #fff;
  color: var(--teal-800);
  border-color: var(--line);
}
.bday-btn--ghost:hover { border-color: var(--teal-600); background: var(--teal-100); }

/* ---- carousel nav ---- */

.bday-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 0 18px;
}
.bday-nav[hidden] { display: none; }
.bday-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--teal-800);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bday-nav-btn:hover { background: var(--teal-100); }
.bday-dots { display: flex; gap: 6px; }
.bday-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: var(--line);
  transition: width 0.2s ease, background-color 0.2s ease;
}
.bday-dot.active { width: 22px; background: var(--bday-gold); }

@media (max-width: 480px) {
  .bday-hero { padding: 30px 18px 22px; }
  .bday-body { padding: 18px 18px 20px; }
  .bday-title { font-size: 23px; }
  .bday-title em { font-size: 32px; }
  .bday-name { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-bday { animation: none; }
  .bday-overlay, .bday-panel, .bday-slide { transition: none; animation: none; }
}
