/* ==========================================================================
   GestIA · Bienestar y cultura: check-in de ánimo, muro de reconocimientos, vista Bienestar y panel de
   RR. HH. Las animaciones quedan neutralizadas por el bloque prefers-reduced-motion de base.css.
   ========================================================================== */

/* ---------- Check-in de ánimo (portada y Mi ánimo) ---------- */
.mood { display: grid; gap: 8px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: var(--surface-2); animation: rise .4s var(--ease) both; }
.mood[hidden] { display: none; }
.mood-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.mood-q { font-size: 14px; font-weight: 750; color: var(--ink); }
.mood-q b { color: var(--violet-700); }
.mood-faces { display: flex; gap: 6px; }
.mood-face {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  animation: pop .3s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: transform .2s var(--spring), border-color .2s var(--ease), box-shadow .2s var(--ease), opacity .2s var(--ease);
}
.mood-face:hover { transform: translateY(-3px) scale(1.08); border-color: var(--violet-200); box-shadow: var(--shadow-sm); }
.mood-face:active { transform: scale(.92); }
.mood-face:focus-visible { outline: 3px solid var(--ring-focus); outline-offset: 2px; }
.mood-face.is-on { border-color: var(--violet-500); box-shadow: 0 0 0 3px var(--violet-100); transform: scale(1.1); }
.mood.is-done .mood-face:not(.is-on) { opacity: .55; }
.mood-face:disabled { cursor: progress; }
.mood-dewi { --dewi-size: 46px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mood-dewi-art { display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--dewi-glow); }
.mood-dewi .dewi-bubble { flex: 1; min-width: 200px; padding: 8px 12px; font-size: 13.5px; }
.mood-note { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-muted); }
.mood-note .i { width: 13px; height: 13px; flex: none; }

/* ---------- Muro de reconocimientos ---------- */
.kudos-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.kudos-list.is-compact { grid-template-columns: 1fr; gap: 8px; }
.kudos-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px 16px 14px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  animation: rise .4s var(--ease) backwards;
  animation-delay: calc(min(var(--i, 0), 8) * 45ms);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.kudos-item::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tone); }
.kudos-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kudos-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kudos-who { display: grid; flex: 1; min-width: 0; }
.kudos-who strong { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.kudos-who small { font-size: 12px; color: var(--ink-3); }
.kudos-tag { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 750; color: var(--tone-ink); background: var(--tone-soft); }
.kudos-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.kudos-remove { justify-self: start; font-size: 12px; }
.kudos-sk { height: 110px; border-radius: var(--r-lg); }
.kudos-more { justify-self: center; margin-top: 12px; }
.kudos-home .card-head, .wb-card > .card-head { flex-wrap: wrap; gap: 10px; }
.kudos-card .eyebrow, .wb-form .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.kudos-card .eyebrow .i, .wb-form .eyebrow .i { width: 14px; height: 14px; }
.kudos-home-actions { display: flex; align-items: center; gap: 12px; }
.kudos-home-body { display: grid; padding: 12px 22px 20px; }
.kudos-received { display: grid; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.kudos-received .eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.my-card[data-my-kudos] .kudos-received { margin: 0; padding: 18px 22px 20px; border: 0; }

/* ---------- Diálogo «Reconocer a alguien» ---------- */
.kudos-body { display: grid; gap: 14px; }
.kudos-chosen { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-lg); background: var(--grad-dewi-card); animation: pop .3s var(--spring) both; }
.kudos-chosen > div { display: grid; flex: 1; min-width: 0; }
.kudos-chosen small { font-size: 12.5px; color: var(--ink-3); }
.kudos-values { margin: 0; padding: 0; border: 0; }
.kudos-values legend { margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.kudos-value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kudos-value {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  color: var(--ink-2);
  background: var(--surface);
  cursor: pointer;
  animation: pop .3s var(--spring) both;
  animation-delay: calc(var(--i, 0) * 30ms);
  transition: transform .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.kudos-value input { position: absolute; opacity: 0; pointer-events: none; }
.kudos-emoji { font-size: 24px; line-height: 1; }
.kudos-value:hover { transform: translateY(-2px); border-color: var(--tone-soft); }
.kudos-value:has(input:checked) { color: var(--tone-ink); border-color: var(--tone); background: var(--tone-soft); }
.kudos-value:has(input:focus-visible) { outline: 3px solid var(--ring-focus); outline-offset: 2px; }
.kudos-message { resize: vertical; min-height: 84px; }
.kudos-count { justify-self: end; font-size: 11.5px; color: var(--ink-3); }
.kudos-public { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); }
.kudos-public .i { width: 15px; height: 15px; flex: none; color: var(--teal-500); }

/* ---------- Esta semana: días temáticos y felicitar ---------- */
.week-theme { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; font-size: 18px; color: var(--tone-ink); background: var(--tone-soft); }
.week-cheer { flex: none; color: var(--pink-500); }
.week-cheer:hover { transform: scale(1.12); }
.bday-cheer { flex: none; }

/* ---------- Vista Bienestar ---------- */
.wb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; align-items: start; }
.wb-card { display: flex; flex-direction: column; }
.wb-pad { padding: 14px 22px 22px; }
.wb-note { display: flex; align-items: center; gap: 8px; margin: 0 22px 18px; font-size: 12.5px; color: var(--ink-muted); }
.wb-note .i { width: 15px; height: 15px; flex: none; }
.mood-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: end; gap: 3px; height: 140px; margin: 12px 22px 8px; }
.mood-bar { display: block; height: 100%; border-radius: 6px 6px 3px 3px; background: var(--line-soft); transform-origin: bottom; transform: scaleY(var(--h)); animation: mood-grow .45s var(--ease) backwards; animation-delay: calc(var(--i) * 15ms); }
@keyframes mood-grow { from { transform: scaleY(0); } }
.mood-bar.is-1, .mood-dot.is-1 { background: var(--red-500, var(--pink-500)); }
.mood-bar.is-2, .mood-dot.is-2 { background: var(--amber-500, var(--pink-500)); }
.mood-bar.is-3, .mood-dot.is-3 { background: var(--violet-200); }
.mood-bar.is-4, .mood-dot.is-4 { background: var(--teal-400); }
.mood-bar.is-5, .mood-dot.is-5 { background: var(--green-500); }
.mood-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 22px 14px; font-size: 12px; color: var(--ink-3); }
.mood-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mood-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.wb-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 22px 0; }
.wb-filter { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 99px; border: 1.5px solid var(--line); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2); background: var(--surface); cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease); }
.wb-filter .i { width: 14px; height: 14px; }
.wb-filter:hover { transform: translateY(-1px); border-color: var(--violet-200); }
.wb-filter[aria-pressed="true"] { color: var(--violet-700); border-color: var(--violet-500); background: var(--violet-50); }
.wb-filter:focus-visible { outline: 3px solid var(--ring-focus); outline-offset: 2px; }
.wb-break { display: grid; justify-items: start; gap: 10px; padding: 22px; border: 1px solid var(--line-soft); font: inherit; text-align: left; color: var(--ink-2); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.wb-break strong { font-size: 18px; font-weight: 800; color: var(--ink); }
.wb-break:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.wb-break:focus-visible { outline: 3px solid var(--ring-focus); outline-offset: 2px; }

/* ---------- Panel de RR. HH. ---------- */
.wb-areas { display: grid; gap: 10px; padding: 14px 22px 22px; }
.wb-area { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr) auto auto; align-items: center; gap: 12px; animation: rise .4s var(--ease) backwards; animation-delay: calc(var(--i) * 40ms); }
.wb-area-name { overflow: hidden; font-size: 13.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.wb-area-bar { height: 10px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.wb-area-bar i { display: block; height: 100%; border-radius: inherit; background: var(--tone); transform-origin: left; transition: transform .45s var(--ease); }
.wb-area b { font-size: 15px; font-weight: 800; }
.wb-area small { font-size: 12px; color: var(--ink-3); }
.wb-area.is-hidden { grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); }
.wb-area-hidden { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.wb-area-hidden .i { width: 14px; height: 14px; flex: none; }
.wb-days { display: grid; gap: 8px; margin: 0; padding: 14px 22px 22px; list-style: none; }
.wb-day { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface-2); animation: rise .4s var(--ease) backwards; animation-delay: calc(var(--i) * 40ms); }
.wb-day .list-main { flex: 1; min-width: 0; }
.wb-day-emoji { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; font-size: 18px; color: var(--tone-ink); background: var(--tone-soft); }
.wb-tones { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.wb-tones legend { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.wb-tone { position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--tone); cursor: pointer; transition: transform .2s var(--spring); }
.wb-tone input { position: absolute; opacity: 0; }
.wb-tone:has(input:checked) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--tone); transform: scale(1.08); }
.wb-tone:has(input:focus-visible) { outline: 3px solid var(--ring-focus); outline-offset: 4px; }

@media (max-width: 640px) {
  .mood-row { flex-direction: column; align-items: flex-start; }
  .mood-faces { width: 100%; justify-content: space-between; }
  .kudos-value-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kudos-head { flex-wrap: wrap; }
  .kudos-who { flex: 1 1 calc(100% - 48px); }
  .kudos-tag { order: 3; margin-left: 42px; }
  .wb-card > .card-head > .btn { width: 100%; justify-content: center; }
  .kudos-home-body, .wb-pad { padding: 12px 14px 16px; }
  .mood-chart { margin: 10px 14px 8px; gap: 2px; height: 110px; }
  .wb-area { grid-template-columns: minmax(0, 1fr) auto; }
  .wb-area-bar { grid-column: 1 / -1; order: 3; }
}
