/* ceneXcani — Custom Styles */

:root {
  --cxc-primary: #d35400;
  --cxc-primary-dark: #b34600;
  --cxc-accent: #c0392b;
  --cxc-warm-bg: #fdf6ee;
  --cxc-warm-surface: #fff8f0;
  --cxc-muted: #8b7355;
}

[data-bs-theme="dark"] {
  --cxc-warm-bg: #1a1410;
  --cxc-warm-surface: #2a2018;
  --cxc-muted: #a89880;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--cxc-warm-bg);
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Stat cards */
.stat-card {
  border-left: 4px solid var(--cxc-primary);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cxc-primary);
}

/* Map */
#map {
  border-radius: 12px;
  z-index: 1;
}

/* Badges */
.badge-pianificato { background-color: #3498db; }
.badge-completato { background-color: #27ae60; }
.badge-annullato { background-color: #e74c3c; }
.badge-aperta { background-color: #27ae60; }
.badge-accettata { background-color: #3498db; }
.badge-rifiutata { background-color: #e74c3c; }
.badge-visitata { background-color: #8e44ad; }

/* Vote button */
.btn-vote {
  border: 2px solid var(--cxc-primary);
  border-radius: 20px;
  padding: 4px 16px;
  transition: all 0.2s;
}

.btn-vote:hover,
.btn-vote.voted {
  background-color: var(--cxc-primary);
  color: white;
}

/* Score bar */
.score-bar {
  height: 8px;
  border-radius: 4px;
  background-color: #e0d5c8;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--cxc-primary), var(--cxc-primary-dark));
  transition: width 0.5s ease;
}

/* Avatar */
.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-initials {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--cxc-primary);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

/* Proposal card */
.proposal-card {
  border-left: 4px solid var(--cxc-primary);
}

/* Admin toggle */
.form-check-input:checked {
  background-color: var(--cxc-primary);
  border-color: var(--cxc-primary);
}

/* Footer */
footer {
  color: var(--cxc-muted);
  font-size: 0.9rem;
}

/* Main container — responsive padding */
.cxc-main-container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 992px) {
  .cxc-main-container {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .stat-card .stat-value {
    font-size: 2.25rem;
  }
}

@media (min-width: 1200px) {
  .cxc-main-container {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .stat-card .stat-value {
    font-size: 2.5rem;
  }
}

/* Mobile responsive */
@media (max-width: 576px) {
  .stat-card .stat-value {
    font-size: 1.5rem;
  }

  #map {
    height: 250px !important;
  }

  .table-responsive-cards tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.5rem;
  }

  .table-responsive-cards thead {
    display: none;
  }

  .table-responsive-cards td {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    border: none;
  }

  .table-responsive-cards td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 1rem;
  }
}
