/**
 * Hello Plataforma · Pending Payments Screen
 *
 * Pantalla operativa de aprobación de SPEIs.
 */


/* ============================================================
   CONTAINER
   ============================================================ */

.hp-pending-screen {
  padding: 16px;
}


/* ============================================================
   COUNTER SUMMARY
   ============================================================ */

.hp-pending-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.hp-pending-count {
  font-family: var(--hp-font-base);
  font-size: 22px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
  letter-spacing: -0.5px;
  line-height: 1;
}

.hp-pending-summary-text {
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-text-secondary);
  margin: 0;
}

.hp-pending-summary-amount {
  font-family: var(--hp-font-base);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}


/* ============================================================
   LISTA DE PAGOS
   ============================================================ */

.hp-pending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


/* ============================================================
   CARD DE PAGO PENDIENTE
   ============================================================ */

.hp-pending-card {
  background: var(--hp-bg-primary);
  border-radius: 16px;
  padding: 16px;
  box-shadow:
    0 0 0 0.5px var(--hp-border-purple),
    0 1px 3px rgba(105, 73, 158, 0.04);
}


/* ============================================================
   HEADER DEL CARD: FAN INFO + TIMER
   ============================================================ */

.hp-pending-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.hp-pending-fan {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.hp-pending-fan-info {
  min-width: 0;
}

.hp-pending-fan-name {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 600;
  color: var(--hp-text-primary);
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-pending-fan-email {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-tertiary);
  margin: 1px 0 0;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ============================================================
   TIMER BADGE (con código de color semántico)
   ============================================================ */

.hp-pending-timer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: var(--hp-font-base);
  font-size: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.hp-pending-timer i {
  font-size: 12px;
}

.hp-pending-timer--fresh {
  background: rgba(29, 158, 117, 0.10);
  border: 0.5px solid rgba(29, 158, 117, 0.25);
  color: var(--hp-green-success);
}

.hp-pending-timer--warn {
  background: rgba(217, 119, 87, 0.10);
  border: 0.5px solid rgba(217, 119, 87, 0.25);
  color: var(--hp-amber-warning);
}

.hp-pending-timer--urgent {
  background: rgba(192, 69, 69, 0.10);
  border: 0.5px solid rgba(192, 69, 69, 0.30);
  color: var(--hp-red-error);
}


/* ============================================================
   REFERENCIA SPEI (la pieza más importante)
   ============================================================ */

.hp-pending-reference {
  background: linear-gradient(180deg, #FAF8FD 0%, #F4F2F7 100%);
  border-radius: 10px;
  padding: 12px;
  border: 0.5px dashed rgba(149, 117, 205, 0.40);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hp-pending-reference-content {
  flex: 1;
  min-width: 0;
}

.hp-pending-reference-label {
  font-family: var(--hp-font-base);
  font-size: 10px;
  color: var(--hp-purple-deep);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.hp-pending-reference-code {
  font-family: var(--hp-font-mono);
  font-size: 18px;
  margin: 3px 0 0;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--hp-gradient-purple-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

.hp-pending-copy-btn {
  background: var(--hp-bg-primary);
  border: 0.5px solid var(--hp-border-subtle);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--hp-duration-normal) var(--hp-ease);
}

.hp-pending-copy-btn:hover {
  border-color: rgba(149, 117, 205, 0.40);
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8FD 100%);
}

.hp-pending-copy-btn:active {
  transform: scale(0.94);
}

.hp-pending-copy-btn i {
  font-size: 16px;
  color: var(--hp-purple-deep);
}

/* Estado tras copiar */
.hp-pending-copy-btn.is-copied {
  border-color: rgba(29, 158, 117, 0.40);
  background: rgba(29, 158, 117, 0.08);
}

.hp-pending-copy-btn.is-copied i {
  color: var(--hp-green-success);
}


/* ============================================================
   DETALLES COMPACTOS
   ============================================================ */

.hp-pending-details {
  margin-bottom: 14px;
}

.hp-pending-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 0.5px solid #F4F2F7;
}

.hp-pending-detail-row:last-child {
  border-bottom: none;
}

.hp-pending-detail-label {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-tertiary);
}

.hp-pending-detail-value {
  font-family: var(--hp-font-base);
  font-size: 12px;
  color: var(--hp-text-primary);
  font-weight: 500;
}


/* ============================================================
   ACCIONES (grid 1:1:2)
   ============================================================ */

.hp-pending-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 6px;
}

.hp-pending-actions .hp-btn {
  padding: 11px 6px;
  font-size: 11px;
  border-radius: 10px;
}

.hp-pending-actions .hp-btn i {
  font-size: 13px;
}


/* ============================================================
   ÚLTIMO APROBADO
   ============================================================ */

.hp-last-approved-section {
  margin-top: 24px;
}

.hp-last-approved-card {
  background: rgba(29, 158, 117, 0.05);
  border: 0.5px solid rgba(29, 158, 117, 0.20);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hp-last-approved-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2BC596 0%, #1D9E75 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}

.hp-last-approved-icon i {
  font-size: 18px;
  color: #FFFFFF;
  stroke-width: 3;
}

.hp-last-approved-content {
  flex: 1;
  min-width: 0;
}

.hp-last-approved-text {
  font-family: var(--hp-font-base);
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  color: var(--hp-text-primary);
  line-height: 1.3;
}

.hp-last-approved-meta {
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-text-secondary);
  margin: 2px 0 0;
  line-height: 1.3;
}

.hp-last-approved-undo {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-family: var(--hp-font-base);
  font-size: 11px;
  color: var(--hp-green-success);
  font-weight: 500;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background-color var(--hp-duration-normal) var(--hp-ease);
}

.hp-last-approved-undo:hover {
  background: rgba(29, 158, 117, 0.08);
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.hp-pending-empty {
  text-align: center;
  padding: 60px 20px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hp-pending-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2BC596 0%, #1D9E75 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    0 8px 24px -8px rgba(29, 158, 117, 0.40);
}

.hp-pending-empty-icon i {
  font-size: 42px;
  color: #FFFFFF;
  stroke-width: 2;
}

.hp-pending-empty-title {
  font-family: var(--hp-font-base);
  font-size: 22px;
  font-weight: 700;
  color: var(--hp-text-primary);
  margin: 0;
  letter-spacing: -0.5px;
}

.hp-pending-empty-sub {
  font-family: var(--hp-font-base);
  font-size: 13px;
  color: var(--hp-text-secondary);
  margin: 8px 0 0;
  line-height: 1.5;
  max-width: 280px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (min-width: 768px) {
  .hp-pending-screen {
    padding: 24px;
  }

  .hp-pending-card {
    padding: 18px;
  }

  .hp-pending-actions .hp-btn {
    font-size: 12px;
    padding: 12px 8px;
  }
}
