/* =============================================
   FarmBrawl — Oficina de Venta de Parcelas UI
   Real-estate listing panel (Don Ramón)
   ============================================= */

.plot-sales-modal {
  position: fixed;
  inset: 0;
  z-index: 32050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  pointer-events: auto;
}

.plot-sales-modal.hidden {
  display: none !important;
}

.plot-sales-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(109, 204, 90, 0.12), transparent 55%),
    rgba(6, 10, 8, 0.78);
  backdrop-filter: blur(2px);
}

.plot-sales-sheet {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(86vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(ellipse 100% 60% at 0% 0%, rgba(201, 162, 39, 0.16), transparent 50%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(47, 107, 58, 0.18), transparent 50%),
    linear-gradient(165deg, #1a2818 0%, #121a12 50%, #0c120c 100%);
  box-shadow:
    0 0 0 2px #6a8f3a,
    0 0 0 4px #0a1208,
    0 0 0 5px rgba(240, 208, 96, 0.28),
    0 18px 48px rgba(0, 0, 0, 0.55);
  color: #eef5e6;
  font-family: Nunito, system-ui, sans-serif;
}

.plot-sales-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 8px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.22);
}

.plot-sales-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.plot-sales-ico {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35));
}

#plot-sales-title,
.plot-sales-header h2 {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  line-height: 1.45;
  color: #f0d060;
  text-shadow: 1px 1px 0 #0a1208;
}

.plot-sales-sub {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: #9cb890;
}

.plot-sales-close {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid #1a1208;
  background: #c23b3b;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 #7a1f1f;
}

.plot-sales-close:hover {
  filter: brightness(1.1);
}

.plot-sales-intro {
  margin: 0;
  padding: 10px 14px 0;
  font-size: 12px;
  line-height: 1.4;
  color: #c5d6b8;
}

.plot-sales-balance {
  margin: 8px 14px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(240, 208, 96, 0.22);
  font-size: 12px;
  color: #d8e8cc;
}

.plot-sales-balance b {
  color: #f0d060;
  font-weight: 800;
}

.plot-sales-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.plot-sales-card {
  border-radius: 8px;
  padding: 10px 6px;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 32, 22, 0.75);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.plot-sales-card-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: #e8f0e0;
  margin-bottom: 4px;
}

.plot-sales-card-status {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.plot-sales-card-price {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #f0d060;
  line-height: 1.35;
}

.plot-sales-card--owned {
  border-color: rgba(93, 204, 106, 0.45);
  background: linear-gradient(160deg, rgba(47, 107, 58, 0.35), rgba(16, 28, 18, 0.85));
}

.plot-sales-card--owned .plot-sales-card-status {
  color: #6dcc5a;
}

.plot-sales-card--available {
  border-color: rgba(240, 208, 96, 0.75);
  background: linear-gradient(160deg, rgba(201, 162, 39, 0.28), rgba(24, 28, 14, 0.9));
  box-shadow: 0 0 0 1px rgba(240, 208, 96, 0.25), 0 4px 14px rgba(240, 208, 96, 0.12);
  animation: plot-sales-pulse 1.8s ease-in-out infinite;
}

.plot-sales-card--available .plot-sales-card-status {
  color: #ffe08a;
}

.plot-sales-card--soon {
  opacity: 0.55;
  border-color: rgba(255, 255, 255, 0.05);
}

.plot-sales-card--soon .plot-sales-card-status {
  color: #8a9a80;
}

.plot-sales-card--soon .plot-sales-card-price {
  color: #9a8874;
}

@keyframes plot-sales-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.plot-sales-footer {
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(201, 162, 39, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plot-sales-buy {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  line-height: 1.4;
  padding: 12px 10px;
  border-radius: 6px;
  border: 2px solid #1a2810;
  background: linear-gradient(180deg, #8fd45a 0%, #4c9a32 100%);
  color: #0a1208;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 0 #2a5a18;
}

.plot-sales-buy:hover:not(:disabled) {
  filter: brightness(1.08);
}

.plot-sales-buy:disabled {
  cursor: not-allowed;
  background: linear-gradient(180deg, #5a6454 0%, #3a4238 100%);
  color: #c0c8b8;
  box-shadow: 0 3px 0 #252a22;
  opacity: 0.85;
}

.plot-sales-hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: #9cb890;
  text-align: center;
}

@media (max-width: 420px) {
  .plot-sales-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #plot-sales-title,
  .plot-sales-header h2 {
    font-size: 8px;
  }
}
