/* ============================================================
   Solitaire-specific styles
   (Shared styles in ../arcade.css)
   ============================================================ */

#move-counter {
  margin-left: auto;
  color: #a07090;
  font-size: 0.85rem;
}

/* ---- Table ---- */
#table {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 16px;
  min-height: 0;
}

/* ---- Top row ---- */
#top-row {
  display: flex;
  flex-direction: row;
  gap: var(--card-gap);
  align-items: flex-start;
}

#top-row .spacer {
  flex: 1;
}

/* ---- Tableau ---- */
#tableau {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  flex: 1;
  align-items: flex-start;
}

/* ---- Foundation ---- */
.foundation {
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.foundation .card {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.foundation.drop-target {
  border-color: #8a7560;
  box-shadow: 0 0 12px rgba(138, 117, 96, 0.4);
}

/* Foundation suit indicators */
#foundation-0::after { content: "♥"; }
#foundation-1::after { content: "♦"; }
#foundation-2::after { content: "♣"; }
#foundation-3::after { content: "♠"; }

.foundation::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(90, 80, 65, 0.35);
  pointer-events: none;
}

/* ---- Stock empty state ---- */
#stock:not(:has(.card))::after,
#stock.empty::after {
  content: "↻";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--pile-border);
}

/* ---- Auto-complete button ---- */
#auto-complete-btn {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  border-radius: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #4a3f35;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 28px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: background 0.15s ease, transform 0.15s ease;
}

#auto-complete-btn:hover {
  background: rgba(255, 255, 255, 0.98);
  transform: translateX(-50%) translateY(-2px);
}

#auto-complete-btn.hidden {
  display: none;
}

/* ---- Play again button ---- */
#play-again-btn {
  border-radius: 20px;
  border: none;
  background: rgba(255, 255, 255, 0.75);
  color: #4a3f35;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 28px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

#play-again-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* ---- Rotate prompt (hidden) ---- */
#rotate-prompt {
  display: none;
}

/* ---- Mobile portrait adjustments ---- */
@media (max-width: 700px) and (orientation: portrait) {
  #controls {
    padding-bottom: 2px;
    gap: 6px;
  }

  .foundation::after,
  #stock:not(:has(.card))::after,
  #stock.empty::after {
    font-size: 1.3rem;
  }
}

/* ---- Tablet adjustments ---- */
@media (min-width: 701px) and (max-width: 1000px) {
  #controls {
    padding-bottom: 4px;
    gap: 8px;
  }

  .foundation::after,
  #stock:not(:has(.card))::after,
  #stock.empty::after {
    font-size: 1.4rem;
  }

  #win-message h1 {
    font-size: 32px;
  }
}
