/* Stili aggiuntivi per dashboard, modifica anagrafica e buoni sconto */

/* ==========================
   DASHBOARD UTENTE MIGLIORATA
   ========================== */
.dashboard-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 30px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #333;
}

.user-info-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 20px;
  margin: 15px auto;
  max-width: 550px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Titolo delle sezioni */
.user-info-section h2 {
  text-align: center;
  color: #006400;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 100, 0, 0.2);
  margin-bottom: 20px;
  font-size: 22px;
}

.user-info-section h2 {
  color: #006400;
  font-size: 20px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(0, 80, 0, 0.3);
  padding-bottom: 8px;
}

/* Ogni riga di informazioni */
.info-row {
  display: flex;
  margin-bottom: 15px;
  align-items: center;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
  padding-bottom: 10px;
}

/* Etichetta (label) */
.info-label {
  width: 180px;
  font-weight: bold;
  color: #333;
  text-align: right;
  padding-right: 15px;
  flex-shrink: 0;
}

.info-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.info-item {
  display: flex;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
  padding: 12px 5px;
  align-items: flex-start;
}

/* Valore */
.info-value {
  flex-grow: 1;
  text-align: left;
  color: #000;
  font-weight: 500;
}

/* Stile speciale per email */
#user-email {
  word-break: break-word;
  font-size: 0.95em;
}

/* Badge di stato */
.status-active {
  display: inline-block;
  padding: 4px 12px;
  background-color: rgba(40, 167, 69, 0.15);
  color: #218838;
  border-radius: 20px;
  font-weight: bold;
  border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-inactive {
  color: #bd2130;
  font-weight: bold;
}

.status-details {
  font-style: italic;
  font-size: 0.9em;
}

.status-badge {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 10px;
  font-weight: normal;
  white-space: nowrap;
}

.status-badge.pending {
  background-color: #ffc107;
  color: #212529;
}

#stagione-attuale,
#tipo-socio {
  font-weight: bold;
  color: #9c27b0;
}

#ore-disponibili {
  font-weight: bold;
  font-size: 1.2em;
  color: #2196f3;
}

.user-actions-container {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.action-button-container {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  text-align: center;
}

.btn-primary {
  background-color: #007bff;
}

.btn-primary:hover {
  background-color: #0069d9;
}

.btn-secondary {
  background-color: #28a745;
}

.btn-secondary:hover {
  background-color: #218838;
}

.activation-notice {
  margin-top: 30px;
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.activation-content {
  max-width: 500px;
  margin: 0 auto;
}

.activation-notice h3 {
  color: #856404;
  margin-bottom: 15px;
}

.activation-notice p {
  color: #684c0e;
  margin-bottom: 20px;
}

.btn-activation {
  background-color: #ffc107;
  color: #212529;
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn-activation:hover {
  background-color: #e0a800;
}

/* ==========================
   MODIFICA ANAGRAFICA
   ========================== */
.section-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 25px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section-container h2 {
  color: #006400;
  font-size: 20px;
  margin-bottom: 15px;
  border-bottom: 1px solid rgba(0, 100, 0, 0.2);
  padding-bottom: 8px;
}

.two-columns-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.form-buttons-row {
  grid-column: span 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-style: italic;
}

/* ==========================
   RESPONSIVE
   ========================== */
@media screen and (max-width: 768px) {
  .dashboard-container {
    padding: 20px;
    margin: 10px;
  }

  .user-info-section {
    padding: 15px;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-left: 10px;
  }

  .info-item {
    flex-direction: column;
    padding: 8px 5px;
  }

  .info-label {
    width: 100%;
    text-align: left;
    padding: 5px 0;
    color: #006400;
    font-size: 0.9em;
  }

  .info-value {
    width: 100%;
    padding-left: 10px;
    font-size: 1.1em;
  }

  .two-columns-form {
    grid-template-columns: 1fr;
  }

  .form-buttons-row {
    grid-column: 1;
  }

  .user-actions-container {
    flex-direction: column;
  }

  .action-button-container {
    max-width: 100%;
  }
}

/* ==========================
   STILI PER BUONI SCONTO
   ========================== */
.buoni-modal {
  max-width: 500px;
  padding: 25px;
}

.buoni-container {
  margin-top: 20px;
}

.buono-card {
  border: 2px solid #28a745;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.buono-header {
  background: #28a745;
  color: white;
  padding: 12px 15px;
  display: flex;
  align-items: center;
}

.buono-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: white;
  border-radius: 50%;
  padding: 3px;
  margin-right: 10px;
}

.buono-title {
  font-size: 18px;
  font-weight: bold;
}

.buono-body {
  padding: 15px;
  background: white;
}

.buono-description {
  color: #333;
  margin-bottom: 15px;
}

.buono-description p {
  margin: 5px 0;
}

.buono-code-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f5f5f5;
  padding: 10px 15px;
  border-radius: 5px;
  border: 1px dashed #ccc;
}

.buono-code {
  font-family: monospace;
  font-size: 18px;
  font-weight: bold;
  color: #d9534f;
}

.copy-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 5px 15px;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: #218838;
}

.copy-btn.copied {
  background: #218838;
}

.buono-info {
  text-align: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 5px;
  color: #666;
  font-style: italic;
}

/* Placeholder per logo mancante */
.placeholder-logo {
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 10px;
  text-align: center;
}

/* ==========================
   MENU DROPDOWN MIGLIORATO
   ========================== */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown-icon {
  font-size: 10px;
  transition: transform 0.3s;
}

.dropdown.open .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-header {
  padding: 10px 15px;
  background-color: #f1f1f1;
  color: #006400;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
}

.dropdown-divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 5px 0;
}

.dropdown-menu a {
  color: #333;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s;
}

.dropdown-menu a:hover {
  background-color: #f5f5f5;
}

/* Media query per dispositivi mobili */
@media (max-width: 576px) {
  .buoni-modal {
    width: 90%;
    padding: 15px;
  }

  .buono-code-container {
    flex-direction: column;
    gap: 10px;
  }

  .dropdown-menu {
    position: fixed;
    top: 60px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

/* ==========================
   PULSANTI PERSONALIZZATI
   ========================== */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  border-radius: 0.2rem;
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 0.3rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-danger {
  color: #fff;
  background-color: #dc3545;
  border-color: #dc3545;
}

.btn-danger:hover {
  background-color: #c82333;
  border-color: #bd2130;
}

.btn-warning {
  color: #212529;
  background-color: #ffc107;
  border-color: #ffc107;
}

.btn-warning:hover {
  background-color: #e0a800;
  border-color: #d39e00;
}

.btn-info {
  color: #fff;
  background-color: #17a2b8;
  border-color: #17a2b8;
}

.btn-info:hover {
  background-color: #138496;
  border-color: #117a8b;
}

.btn-light {
  color: #212529;
  background-color: #f8f9fa;
  border-color: #f8f9fa;
}

.btn-light:hover {
  background-color: #e2e6ea;
  border-color: #dae0e5;
}

.btn-dark {
  color: #fff;
  background-color: #343a40;
  border-color: #343a40;
}

.btn-dark:hover {
  background-color: #23272b;
  border-color: #1d2124;
}

.btn-outline-primary {
  color: #007bff;
  background-color: transparent;
  border-color: #007bff;
}

.btn-outline-primary:hover {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

.btn-outline-secondary {
  color: #28a745;
  background-color: transparent;
  border-color: #28a745;
}

.btn-outline-secondary:hover {
  color: #fff;
  background-color: #28a745;
  border-color: #28a745;
}

@media screen and (max-width: 767px) {
  .dropdown-menu {
    position: fixed !important;
    top: 60px !important; /* Adjust to match your header height */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: calc(100vh - 60px) !important;
    overflow-y: auto !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    animation: none !important;
  }

  /* Make menu items larger and easier to tap on mobile */
  .dropdown-menu a {
    padding: 15px !important;
    font-size: 16px !important;
  }

  /* Fix menu header on mobile */
  .dropdown-header {
    position: sticky;
    top: 0;
    background: rgba(0, 80, 0, 0.95);
    z-index: 2;
  }

  /* Ensure the dropdown button is visible */
  .dropdown-toggle {
    z-index: 1001;
    position: relative;
  }

  .info-table,
  .info-table tbody,
  .info-table tr,
  .info-table td {
    display: block;
    width: 100%;
  }

  .info-table .info-label {
    text-align: left;
    padding: 10px 0 0 0;
    color: #006400;
    font-size: 0.9em;
    border-bottom: none;
    width: 100%;
  }

  .info-table .info-value {
    padding: 5px 0 10px 10px;
    font-size: 1.1em;
    width: 100%;
  }
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Aggiunto per controllare meglio le larghezze */
}

.info-table tr {
  border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
}

.info-table td {
  padding: 12px 5px;
  vertical-align: top;
}

.info-table .info-label {
  width: 40%; /* Cambiato da valore fisso a percentuale */
  text-align: right;
  font-weight: bold;
  color: #333;
  padding-right: 15px;
  white-space: nowrap; /* Evita che l'etichetta vada a capo */
}

.info-table .info-value {
  width: 60%; /* Cambiato da auto a percentuale */
  text-align: left;
  color: #000;
  font-weight: 500;
  word-break: break-word; /* Permette di spezzare parole lunghe come email */
}

.user-actions-container {
    display: flex !important;
}