/* =============================================================
   Occamy's Voting — /votar/
   Sólo estilos específicos de esta página.
   Las tarjetas .nominee-card y los orbs .p-orb ya están
   definidos en main.css del tema.
   ============================================================= */

/* ── Página ── */
.votar-main {
  position: relative;
  overflow-x: clip;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.votar-wrap {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Espaciadores que centran verticalmente el contenido inicial
   y colapsan con animación al seleccionar una categoría */
.votar-spacer {
  transition: flex-grow 0.55s cubic-bezier(0.23, 1, 0.32, 1),
              min-height 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}
.votar-spacer--top    { flex-grow: 1; min-height: 60px; }
.votar-spacer--bottom { flex-grow: 1; min-height: 0; }


/* ── Orbs: en la portada GSAP los hace visibles;
        aquí los activamos directo con CSS ── */
.votar-orb {
  opacity: 1 !important;
}

/* ── Header ── */
.votar-header {
  text-align: center;
  padding: 0 0 40px;
  width: 100%;
  max-width: 700px;
  align-self: center;
}

/* El eyebrow y subtítulo se ocultan al seleccionar */
.votar-header .section-eyebrow,
.votar-subtitle {
  overflow: hidden;
  max-height: 60px;
  transition: opacity 0.3s ease,
              max-height 0.45s cubic-bezier(0.23, 1, 0.32, 1),
              margin 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.votar-main.has-selection .votar-header .section-eyebrow,
.votar-main.has-selection .votar-subtitle {
  opacity: 0;
  max-height: 0;
  margin: 0;
}

.votar-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  margin: 16px 0 12px;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 40%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.1em;
  transition: font-size 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              margin 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.votar-main.has-selection .votar-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 8px;
}

.votar-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.42);
  margin: 0;
}

/* ── Estado cerrado ── */
.votar-state-msg {
  text-align: center;
  padding: 72px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.votar-state-icon { font-size: 2.8rem; }

.votar-state-msg strong {
  font-size: 1.2rem;
  color: #fff;
  display: block;
}

.votar-state-msg p {
  color: rgba(255,255,255,0.4);
  margin: 0;
  font-size: 0.9rem;
}

/* ── Selector de categoría ── */
.votar-selector-wrap {
  position: relative;
  z-index: 100;
  width: 100%;
  max-width: 560px;
  margin: 0 auto 36px;
  transition: margin 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.votar-main.has-selection .votar-selector-wrap {
  margin-bottom: 28px;
}

.votar-selector { position: relative; }

.votar-selector-btn {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 18px 24px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-heading);
  color: rgba(255,255,255,0.45);
  transition: border-color 0.2s, background 0.2s;
}

.votar-selector-btn:hover {
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.06);
  color: rgba(255,255,255,0.7);
}

.votar-selector-btn[aria-expanded="true"] {
  border-color: #7c3aed;
  background: rgba(124,58,237,0.08);
  border-radius: 14px 14px 0 0;
  color: #fff;
}

.votar-selector-label {
  flex: 1;
  text-align: left;
  font-weight: 500;
}

.votar-selector-chevron {
  flex-shrink: 0;
  color: rgba(255,255,255,0.3);
  transition: transform 0.22s ease, color 0.2s;
}

.votar-selector-btn[aria-expanded="true"] .votar-selector-chevron {
  transform: rotate(180deg);
  color: #a78bfa;
}

/* Dropdown */
.votar-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #131318;
  border: 1.5px solid #7c3aed;
  border-top: none;
  border-radius: 0 0 14px 14px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(124,58,237,0.35) transparent;
  box-shadow: 0 24px 56px rgba(0,0,0,0.6);
}

.votar-dropdown.is-open {
  display: block;
  animation: votar-dd-in 0.18s ease;
}

@keyframes votar-dd-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.votar-dropdown-group {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.votar-dropdown-group:last-child { border-bottom: none; }

.votar-dropdown-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  padding: 12px 20px 4px;
  pointer-events: none;
  user-select: none;
}

.votar-dropdown-item {
  all: unset;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 20px;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  color: rgba(255,255,255,0.62);
  cursor: pointer;
  transition: background 0.12s, color 0.12s, padding-left 0.15s;
}

.votar-dropdown-item:hover {
  background: rgba(124,58,237,0.14);
  color: #fff;
  padding-left: 26px;
}

.votar-dropdown-item.is-selected {
  color: #c4b5fd;
  background: rgba(124,58,237,0.18);
  padding-left: 26px;
}

/* ── Paneles ── */
.votar-panels {
  position: relative;
  width: 100%;
}

.votar-panel.panel-entering {
  animation: votar-panel-in 0.28s cubic-bezier(0.23,1,0.32,1);
}

@keyframes votar-panel-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.votar-panel-empty {
  text-align: center;
  color: rgba(255,255,255,0.25);
  padding: 60px 0;
  font-size: 0.9rem;
}

/* ── Estados de las cards ── */

/* Seleccionada (antes de votar) */
.nominee-card.is-selected {
  transform: translateY(-10px);
  border-color: rgba(192,132,252,0.7) !important;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.65),
    0 0 0 1px rgba(192,132,252,0.25),
    0 0 52px rgba(115,4,197,0.28) !important;
}

.nominee-card.is-selected .nominee-overlay {
  background: rgba(115,4,197,0.15) !important;
}

/* Votada: borde verde */
.nominee-card.is-voted {
  border-color: rgba(5,150,105,0.65) !important;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.6),
    0 0 0 1px rgba(5,150,105,0.2),
    0 0 40px rgba(5,150,105,0.18) !important;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Overlay centrado con ✓ sobre la imagen */
.nominee-voted-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(5,150,105,0.5);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.nominee-card.is-voted .nominee-voted-overlay { display: flex; }

/* Atenuar las no votadas */
.nominee-card.is-dimmed {
  opacity: 0.3;
  pointer-events: none;
}

/* ── Área de acción (debajo del grid) ── */
.ocv-vote-action {
  margin-top: 32px;
  text-align: center;
  animation: votar-panel-in 0.25s cubic-bezier(0.23,1,0.32,1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ocv-vote-action-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.ocv-selection-hint {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.ocv-selection-hint strong {
  color: #fff;
  font-weight: 700;
}

.ocv-vote-submit-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 36px;
  border-radius: 50px;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.18s, box-shadow 0.2s;
  box-shadow: 0 8px 28px rgba(124,58,237,0.35);
}

.ocv-vote-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(124,58,237,0.48);
}

.ocv-vote-submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Estado post-voto — oculto por defecto, visible con clase */
.ocv-voted-confirm {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 50px;
  background: rgba(5,150,105,0.12);
  border: 1px solid rgba(5,150,105,0.3);
  color: #34d399;
  font-size: 0.92rem;
  font-weight: 500;
}

.ocv-voted-confirm.is-visible { display: flex; }

.ocv-voted-confirm strong { color: #fff; }

/* ── Turnstile ── */
.ocv-turnstile-wrap {
  max-width: 340px;
  margin: 20px auto 8px;
  padding: 20px 24px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  text-align: center;
}

.ocv-turnstile-wrap p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin: 0 0 14px;
}

.cf-turnstile { display: flex; justify-content: center; }

/* ── Feedback del panel ── */
.ocv-panel-feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 480px;
  margin: 20px auto 0;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
}

.ocv-panel-feedback.is-success {
  background: rgba(5,150,105,0.12);
  border: 1px solid rgba(5,150,105,0.3);
  color: #34d399;
}

.ocv-panel-feedback.is-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.25);
  color: #f87171;
}

.ocv-feedback-icon { font-size: 1.1rem; font-weight: 800; }
