/**
 * hud-dock.css - Player Hand Bottom Dock, Resource Cards, and Realm Bank Supply Strip
 */

/* Bottom Player Hand Dock */
.hud-bottom {
  grid-area: bottom;
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  height: auto;
  min-height: clamp(100px, 11vh, 114px);
  min-width: 0;
  max-width: 100%;
  background: oklch(0.145 0.012 264 / 0.82);
  backdrop-filter: blur(20px) saturate(1.15);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px clamp(8px, 1.2vw, 18px) 8px;
  gap: 6px;
  z-index: 25;
  overflow: visible;
}

body.mode-cities-knights .hud-bottom {
  height: auto;
  min-height: clamp(100px, 11vh, 114px);
  max-height: 250px;
  padding: 6px clamp(8px, 1.2vw, 18px) 8px;
  gap: 6px;
}

.hud-bottom-hand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: clamp(6px, 1vw, 14px);
  min-width: 0;
}

.resource-cards-deck {
  display: flex;
  gap: clamp(4px, 0.6vw, 10px);
  flex-shrink: 1;
  min-width: 0;
}

.res-card {
  width: clamp(52px, 5vw, 70px);
  height: clamp(68px, 6.5vw, 82px);
  border-radius: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: clamp(4px, 0.5vw, 7px) 3px;
  border: 1px solid oklch(1 0 0 / 0.16);
  box-shadow: 0 8px 16px oklch(0 0 0 / 0.28), inset 0 1px 0 oklch(1 0 0 / 0.14);
  position: relative;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: default;
  flex-shrink: 1;
}

.res-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 24px oklch(0 0 0 / 0.38), inset 0 1px 0 oklch(1 0 0 / 0.2);
}

.res-card.wood {
  background: #1e4a38;
}

.res-card.brick {
  background: #7f1d1d;
}

.res-card.wool {
  background: #15803d;
}

.res-card.wheat {
  background: #854d0e;
}

.res-card.ore {
  background: #334155;
}

.res-card.cloth {
  background: #5b21b6;
}

.res-card.coin {
  background: #a16207;
}

.res-card.paper {
  background: #115e59;
}

.res-card.res-card-pulse-gained {
  animation: resCardPulseGained 1.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes resCardPulseGained {
  0% {
    transform: translateY(0) scale(1);
    border-color: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7), 0 8px 16px oklch(0 0 0 / 0.28);
  }
  20% {
    transform: translateY(-5px) scale(1.05);
    border-color: #34d399;
    box-shadow: 0 0 16px 3px rgba(52, 211, 153, 0.6), 0 12px 20px oklch(0 0 0 / 0.35);
  }
  40% {
    transform: translateY(-2px) scale(1.02);
    border-color: #34d399;
    box-shadow: 0 0 10px 2px rgba(52, 211, 153, 0.4);
  }
  100% {
    transform: translateY(0) scale(1);
    border-color: oklch(1 0 0 / 0.16);
    box-shadow: 0 8px 16px oklch(0 0 0 / 0.28);
  }
}

.res-card-float-gain {
  position: absolute;
  top: -5px;
  right: -4px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), 0 0 10px rgba(16, 185, 129, 0.6);
  pointer-events: none;
  z-index: 35;
  animation: floatGainUp 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes floatGainUp {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateY(-2px) scale(1.1);
  }
  70% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
  }
}

.ck-only {
  display: none !important;
}

.ck-hud-widget {
  display: none;
}

body.mode-cities-knights .res-card.ck-only {
  display: flex !important;
}

body.mode-cities-knights .res-stepper-card.ck-only {
  display: flex !important;
}

body.mode-cities-knights .ck-hud-widget {
  display: flex !important;
}

body.mode-cities-knights .ck-improvements-panel.ck-hud-widget {
  display: flex !important;
}

body.mode-cities-knights #die-event.ck-hud-widget {
  display: flex !important;
}

body.mode-cities-knights #btn-buy-dev-card {
  display: none;
}

.ck-build-only {
  display: none !important;
}

body.mode-cities-knights .ck-build-only {
  display: flex !important;
}

body.mode-cities-knights #discard-form .trade-steppers-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.res-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  color: #ffffff;
}

.res-card-icon .ico {
  font-size: 22px;
}

.res-card-label {
  font-size: clamp(9px, 0.8vw, 10.5px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.85;
  color: #f1f5f9;
  white-space: nowrap;
}

.res-card-count {
  background: rgba(0, 0, 0, 0.6);
  padding: 1px clamp(4px, 0.5vw, 8px);
  border-radius: 4px;
  font-weight: 800;
  font-size: clamp(10.5px, 0.9vw, 12px);
  color: #ffffff;
}

.bottom-action-buttons {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.6vw, 10px);
  flex-shrink: 0;
}

.bottom-action-buttons .btn-glass {
  padding: 8px clamp(8px, 0.9vw, 14px);
  font-size: clamp(11.5px, 0.9vw, 13px);
  white-space: nowrap;
}

.vp-counter-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: oklch(0 0 0 / 0.28);
  padding: 6px clamp(6px, 0.8vw, 12px);
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: clamp(11.5px, 0.9vw, 13px);
  white-space: nowrap;
}

.vp-counter-badge .ico {
  font-size: 16px;
  color: var(--gold-primary);
}


/* =========================================================
 * REALM BANK SUPPLY STRIP
 * ========================================================= */
.realm-bank-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: oklch(0.12 0.015 260 / 0.85);
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: 9px;
  padding: 3px 8px;
  margin-bottom: 0;
  font-size: 11px;
}

.bank-strip-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}

.bank-strip-left::-webkit-scrollbar {
  display: none;
}

.bank-strip-title {
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.bank-pills-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.bank-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: oklch(1 0 0 / 0.06);
  border: 1px solid oklch(1 0 0 / 0.12);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.bank-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.bank-pill-icon .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  font-size: 15px;
  line-height: 1;
}

.bank-pill-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}
