/* === PLANTING UI — hotbar + cursor preview === */

/* ============================================ */
/*  HOTBAR (bottom-center floating panel)        */
/* ============================================ */
.planting-hotbar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 200;
  background: rgba(10, 6, 4, 0.86);
  border: 1px solid rgba(255, 140, 60, 0.32);
  border-radius: 10px;
  padding: 14px 18px 12px 18px;
  font-family: 'Courier New', monospace;
  color: #ffcf8a;
  min-width: 320px;
  max-width: 720px;
  backdrop-filter: blur(4px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 8px 28px rgba(0, 0, 0, 0.6),
    inset 0 0 18px rgba(255, 120, 40, 0.05);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.planting-hotbar.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.planting-hotbar.hidden {
  display: none;
}

/* Tabs row */
.planting-hotbar .hotbar-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 140, 60, 0.2);
  padding-bottom: 8px;
}
.planting-hotbar .hotbar-tab {
  font-family: 'Consolas', 'JetBrains Mono', 'Menlo', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255, 200, 140, 0.55);
  background: transparent;
  border: 1px solid rgba(255, 140, 60, 0.18);
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.planting-hotbar .hotbar-tab:hover {
  border-color: rgba(255, 140, 60, 0.45);
  color: #ffcf8a;
}
.planting-hotbar .hotbar-tab.active {
  background: rgba(255, 140, 60, 0.18);
  border-color: rgba(255, 160, 60, 0.7);
  color: #ffe7b3;
  box-shadow: 0 0 12px rgba(255, 140, 60, 0.25), inset 0 0 8px rgba(255, 140, 60, 0.12);
  text-shadow: 0 0 6px rgba(255, 140, 60, 0.5);
}

.planting-hotbar .hotbar-slots {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-height: 84px;
  align-items: center;
}

.planting-hotbar .hotbar-empty {
  font-size: 10px;
  color: rgba(255, 200, 140, 0.45);
  font-style: italic;
  padding: 20px 12px;
  text-align: center;
}

.planting-hotbar .hotbar-slot {
  position: relative;
  width: 78px;
  min-height: 84px;
  background: rgba(20, 12, 8, 0.85);
  border: 1px solid rgba(255, 140, 60, 0.22);
  border-radius: 8px;
  padding: 6px 4px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  --slot-glow: rgba(255, 255, 255, 0.3);
  --slot-color: #999;
}

.planting-hotbar .hotbar-slot:hover {
  transform: translateY(-2px);
  border-color: var(--slot-color);
  box-shadow: 0 4px 12px var(--slot-glow), inset 0 0 10px var(--slot-glow);
}

.planting-hotbar .hotbar-slot.selected {
  border-color: var(--slot-color);
  box-shadow:
    0 0 0 1px var(--slot-color),
    0 0 14px var(--slot-glow),
    inset 0 0 12px var(--slot-glow);
  transform: translateY(-2px);
}

.planting-hotbar .slot-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 0 6px var(--slot-glow));
}
.planting-hotbar .slot-icon svg {
  max-width: 100%;
  max-height: 100%;
}

.planting-hotbar .slot-name {
  font-size: 9px;
  color: var(--slot-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.1;
}

.planting-hotbar .slot-count {
  font-size: 10px;
  color: rgba(255, 200, 140, 0.85);
  font-weight: bold;
}

.planting-hotbar .hotbar-hint {
  font-size: 9px;
  color: rgba(255, 200, 140, 0.45);
  text-align: center;
  letter-spacing: 0.5px;
}
.planting-hotbar .hotbar-hint .key {
  display: inline-block;
  background: rgba(255, 140, 60, 0.15);
  border: 1px solid rgba(255, 140, 60, 0.3);
  border-radius: 3px;
  padding: 1px 5px;
  margin: 0 2px;
  color: #ffcf8a;
}

/* ============================================ */
/*  CURSOR PREVIEW                                */
/* ============================================ */
.planting-cursor {
  position: fixed;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 300;
  transform: translate(-50%, -50%);
}

.planting-cursor-plant {
  position: absolute;
  left: 0;
  top: -8px;
  transform: translate(-50%, -100%);
  opacity: 0.85;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
  animation: cursorPlantBob 1.2s ease-in-out infinite;
}
@keyframes cursorPlantBob {
  0%, 100% { transform: translate(-50%, -100%) translateY(0); }
  50%      { transform: translate(-50%, -100%) translateY(-3px); }
}

.planting-cursor-ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 12px;
  border: 1.5px dashed rgba(255, 200, 140, 0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(255, 160, 60, 0.18) 0%, transparent 70%);
  animation: cursorRing 1.6s ease-in-out infinite;
}
@keyframes cursorRing {
  0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: 0.85; }
  50%      { transform: translate(-50%, -50%) scale(1.15); opacity: 0.55; }
}

/* While planting, hide system cursor over the game */
body.planting-active #game,
body.planting-active #game * {
  cursor: none;
}

/* ============================================ */
/*  REJECTION TOAST (clicked sky etc)             */
/* ============================================ */
.planting-reject {
  position: fixed;
  pointer-events: none;
  z-index: 400;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: #ffb060;
  text-shadow: 0 0 6px rgba(255, 140, 60, 0.6), 1px 1px 0 rgba(0, 0, 0, 0.7);
  transform: translate(-50%, -100%);
  animation: rejectFloat 0.7s ease-out forwards;
}
@keyframes rejectFloat {
  0%   { opacity: 0; transform: translate(-50%, -100%) translateY(0); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -100%) translateY(-24px); }
}
