.woocommerce-account .bg-myaccount-wrap h2 {
  margin: 0 0 14px !important;
  padding: 12px 16px !important;
  background: #2f2f2f !important;
  color: #eaeaea !important;
  border: 1px solid #3a3a3a !important;
  border-radius: 4px !important;
  font-size: 18px !important;
}

.woocommerce-account .bg-myaccount-wrap .bg-notice {
  margin: 10px 0 14px !important;
  padding: 12px 14px !important;
  border-radius: 6px !important;
  border: 1px solid #3a3a3a !important;
  background: #2b2b2b !important;
  color: #e6e6e6 !important;
}
.woocommerce-account .bg-myaccount-wrap .bg-notice.bg-error {
  border-color: #e53935 !important;
  background: rgba(229,57,53,0.08) !important;
  color: #ffb3b1 !important;
}

.woocommerce-account .bg-myaccount-wrap .bg-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.woocommerce-account .bg-myaccount-wrap .bg-modal[aria-hidden="true"] { display: none; }
.woocommerce-account .bg-myaccount-wrap .bg-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.woocommerce-account .bg-myaccount-wrap .bg-modal__dialog {
  position: relative;
  width: min(520px, 96vw);
  max-height: 85vh;
  margin: 0 auto;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  color: #e9eef2;
  overflow: auto;
}
.woocommerce-account .bg-myaccount-wrap .bg-modal__header { padding: 14px 16px; border-bottom: 1px solid #333; }
.woocommerce-account .bg-myaccount-wrap .bg-modal__header h3 { margin: 0; font-size: 18px; }
.woocommerce-account .bg-myaccount-wrap .bg-modal__body { padding: 14px 16px; color: #ffb3b1; }
.woocommerce-account .bg-myaccount-wrap .bg-modal__footer { padding: 12px 16px; border-top: 1px solid #333; display: flex; justify-content: flex-end; }
.woocommerce-account .bg-myaccount-wrap #bg-restore-close.button { border-color: #e53935; color: #e53935; background: transparent; min-width: 120px; height: 40px; }
.woocommerce-account .bg-myaccount-wrap #bg-restore-close.button:hover { background: #e53935; color: #fff; }

.woocommerce-account .bg-myaccount-wrap .bg-modal.bg-modal--center .bg-modal__dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

body.bg-modal-open { overflow: hidden; }

/* Media query spostata in bg-smartphone.css */

.woocommerce-account .woocommerce-MyAccount-content {
  padding-left: 16px !important;
  padding-right: 8px !important;
  background: none !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  padding: 12px 14px !important;
  display: block;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  background: rgba(66, 153, 225, 0.12);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
  border-left: 0 !important;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #262626 !important;
  color: #ddd !important;
  border: 1px solid #3a3a3a !important;
}

.woocommerce-account .bg-myaccount-wrap table.shop_table {
  width: 100%;
  border-collapse: collapse;
  background: #2c2c2c;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  overflow: visible;
}
.woocommerce-account .bg-myaccount-wrap table.shop_table thead th {
  background: #3a3a3a;
  color: #f5f5f5;
  font-weight: 600;
  padding: 12px 14px;
}
.woocommerce-account .bg-myaccount-wrap table.shop_table td {
  padding: 12px 14px;
  border-top: 1px solid #3a3a3a;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders thead th {
  background: #333 !important;
  color: #f0f0f0 !important;
  font-weight: 600 !important;
  text-transform: none !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid #3f3f3f !important;
  text-align: center;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders tbody td {
  padding: 14px 16px !important;
  border-bottom: 1px solid #3a3a3a !important;
  vertical-align: middle !important;
  text-align: center;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders tbody tr:not(.is-canceled) td {
  color: #e9eef2 !important; 
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders tbody tr:hover {
  background: #2d2d2d !important;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders tbody tr:nth-child(odd) {
  background: #2a2a2a !important;
}
.woocommerce-account .bg-myaccount-wrap table.my_account_orders tbody tr:nth-child(even) {
  background: #252525 !important;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders td.actions {
  white-space: nowrap;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders tr.is-canceled {
  background: #2a2323 !important; 
}
.woocommerce-account .bg-myaccount-wrap table.my_account_orders tr.is-canceled td:not(.actions) {
  color: #8a8f96 !important; 
}
.woocommerce-account .bg-myaccount-wrap table.my_account_orders tr.is-canceled td.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.woocommerce-account .bg-myaccount-wrap .bg-status.canceled {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #e53935;
  color: #e53935;
  border-radius: 6px;
  font-weight: 600;
  margin-right: 8px;
  line-height: 0.8;
  text-align: center;
}

.woocommerce-account .bg-myaccount-wrap .bg-status.pending {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #ff9800;
  color: #ff9800;
  border-radius: 6px;
  font-weight: 600;
  margin-right: 8px;
  line-height: 0.8;
  text-align: center;
}

.woocommerce-account .bg-myaccount-wrap .bg-status.completed {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid #4caf50;
  color: #4caf50;
  border-radius: 6px;
  font-weight: 600;
  margin-right: 8px;
  line-height: 0.8;
  text-align: center;
}

.woocommerce-account .bg-myaccount-wrap .bg-text-canceled {
  display: inline-block !important;
  color: #e53935 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  text-align: center !important;
  padding: 8px 16px !important;
  min-width: 110px !important;
  box-sizing: border-box !important;
}

.woocommerce-account .bg-myaccount-wrap .bg-text-failed {
  display: inline-block !important;
  color: #e53935 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 1.3 !important;
  text-align: center !important;
  padding: 8px 16px !important;
  min-width: 110px !important;
  box-sizing: border-box !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-edit,
.woocommerce-account .bg-myaccount-wrap a.button.bg-edit {
  background: transparent !important;
  color: #2196f3 !important;
  border: 1px solid #2196f3 !important;
  padding: 8px 16px !important;
  line-height: 1.4 !important;
  border-radius: 4px !important;
  margin: 0 !important;
  transition: all .2s ease !important;
  min-width: 110px !important;
  height: auto !important;
  display: inline-block !important;
  text-align: center !important;
  font-size: 14px !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-edit:hover,
.woocommerce-account .bg-myaccount-wrap a.button.bg-edit:hover {
  background: #2196f3 !important;
  color: #fff !important;
  border-color: #2196f3 !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-cancel,
.woocommerce-account .bg-myaccount-wrap button.button.bg-cancel {
  background: transparent !important;
  color: #e53935 !important;
  border: 1px solid #e53935 !important;
  padding: 8px 16px !important;
  line-height: 1.4 !important;
  border-radius: 4px !important;
  margin: 0 !important;
  transition: all .2s ease !important;
  min-width: 110px !important;
  height: auto !important;
  display: inline-block !important;
  text-align: center !important;
  font-size: 14px !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-cancel:hover,
.woocommerce-account .bg-myaccount-wrap button.button.bg-cancel:hover {
  background: #e53935 !important;
  color: #fff !important;
  border-color: #e53935 !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-pay,
.woocommerce-account .bg-myaccount-wrap button.button.bg-pay {
  background: transparent !important;
  color: #4caf50 !important;
  border: 1px solid #4caf50 !important;
  padding: 8px 16px !important;
  line-height: 1.4 !important;
  border-radius: 4px !important;
  margin: 0 !important;
  transition: all .2s ease !important;
  font-weight: 600 !important;
  min-width: 110px !important;
  width: 100% !important;
  height: auto !important;
  display: inline-block !important;
  text-align: center !important;
  font-size: 14px !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-pay:hover,
.woocommerce-account .bg-myaccount-wrap button.button.bg-pay:hover {
  background: #4caf50 !important;
  color: #fff !important;
  border-color: #4caf50 !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-restore,
.woocommerce-account .bg-myaccount-wrap button.button.bg-restore {
  background: transparent !important;
  color: #ff9800 !important;
  border: 1px solid #ff9800 !important;
  padding: 8px 16px !important;
  line-height: 1.4 !important;
  border-radius: 4px !important;
  margin: 0 !important;
  transition: all .2s ease !important;
  min-width: 110px !important;
  height: auto !important;
  display: inline-block !important;
  text-align: center !important;
  font-size: 14px !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-restore:hover,
.woocommerce-account .bg-myaccount-wrap button.button.bg-restore:hover {
  background: #ff9800 !important;
  color: #fff !important;
  border-color: #ff9800 !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-delete {
  background: transparent !important;
  color: #e53935 !important;
  border: 1px solid #e53935 !important;
  padding: 8px 16px !important;
  line-height: 1.4 !important;
  border-radius: 4px !important;
  margin: 0 !important;
  transition: all .2s ease !important;
  min-width: 110px !important;
  height: auto !important;
  display: inline-block !important;
  text-align: center !important;
  font-size: 14px !important;
}

.woocommerce-account .bg-myaccount-wrap .button.bg-delete:hover {
  background: #e53935 !important;
  color: #fff !important;
  border-color: #e53935 !important;
}

.button.bg-edit:focus-visible {
  outline: 2px solid #57bde0;
  outline-offset: 2px;
}

.button.bg-delete:focus-visible {
  outline: 2px solid #57bde0;
  outline-offset: 2px;
}

.button.bg-pay:focus-visible {
  outline: 2px solid #57bde0;
  outline-offset: 2px;
}

.button.bg-restore:focus-visible {
  outline: 2px solid #57bde0;
  outline-offset: 2px;
}

.button.bg-cancel:focus-visible {
  outline: 2px solid #57bde0;
  outline-offset: 2px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:focus-visible {
  outline: 2px solid #57bde0;
  outline-offset: 2px;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders tr.is-completed td:not(.actions) {
  color: #7CFF7A !important; 
}
.woocommerce-account .bg-myaccount-wrap table.my_account_orders tr.is-completed td.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.woocommerce-account .bg-myaccount-wrap a.button.bg-edit.is-disabled[aria-disabled="true"],
.woocommerce-account .bg-myaccount-wrap a.button.bg-edit.is-disabled {
  pointer-events: none;
  color: #7a8b92 !important;
  border-color: #55666b !important;
  background: transparent !important;
}
.woocommerce-account .bg-myaccount-wrap button.bg-cancel[disabled],
.woocommerce-account .bg-myaccount-wrap button.bg-cancel[aria-disabled="true"] {
  pointer-events: none;
  color: #7a8b92 !important;
  border-color: #55666b !important;
  background: transparent !important;
}

.button.bg-edit[disabled] {
  background: transparent !important;
  border-color: #555 !important;
  color: #888 !important;
  cursor: not-allowed;
  opacity: .75;
}

.button.bg-delete[disabled] {
  background: transparent !important;
  border-color: #555 !important;
  color: #888 !important;
  cursor: not-allowed;
  opacity: .75;
}

.button.bg-edit[aria-disabled="true"] {
  background: transparent !important;
  border-color: #555 !important;
  color: #888 !important;
  cursor: not-allowed;
  opacity: .75;
}

.button.bg-delete[aria-disabled="true"] {
  background: transparent !important;
  border-color: #555 !important;
  color: #888 !important;
  cursor: not-allowed;
  opacity: .75;
}

.woocommerce-account .bg-myaccount-wrap input[type="text"],
.woocommerce-account .bg-myaccount-wrap input[type="number"],
.woocommerce-account .bg-myaccount-wrap textarea,
.woocommerce-account .bg-myaccount-wrap select {
  background: #f5f6f7 !important;
  color: #222 !important;
  border: 1px solid #cfd3d8 !important;
  border-radius: 6px !important;
  padding: 10px 12px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3);
}
.woocommerce-account .bg-myaccount-wrap input[type="text"]::placeholder,
.woocommerce-account .bg-myaccount-wrap textarea::placeholder {
  color: #8a8f96;
}
.woocommerce-account .bg-myaccount-wrap input[type="text"]:focus,
.woocommerce-account .bg-myaccount-wrap input[type="number"]:focus,
.woocommerce-account .bg-myaccount-wrap textarea:focus,
.woocommerce-account .bg-myaccount-wrap select:focus {
  border-color: #4299e1 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(66,153,225,.15);
}

.woocommerce-account .bg-myaccount-wrap input[type="number"] {
  max-width: 110px;
  text-align: right;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.woocommerce-account .bg-myaccount-wrap h3 {
  color: #fff;
  font-size: 20px;
  margin: 18px 0 12px;
}
.woocommerce-account .bg-myaccount-wrap h3 + p,
.woocommerce-account .bg-myaccount-wrap h3 + div,
.woocommerce-account .bg-myaccount-wrap .bg-info-card {
  background: #2d2d2d;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 14px;
}

/* Larghezze colonne tabella prenotazioni (7 colonne) */
.woocommerce-account .bg-myaccount-wrap table.my_account_orders th:nth-child(1),
.woocommerce-account .bg-myaccount-wrap table.my_account_orders td:nth-child(1) { width: 6%; }  /* Ordine */
.woocommerce-account .bg-myaccount-wrap table.my_account_orders th:nth-child(2),
.woocommerce-account .bg-myaccount-wrap table.my_account_orders td:nth-child(2) { width: 12%; } /* Data/Ora */
.woocommerce-account .bg-myaccount-wrap table.my_account_orders th:nth-child(3),
.woocommerce-account .bg-myaccount-wrap table.my_account_orders td:nth-child(3) { width: 22%; } /* Evento */
.woocommerce-account .bg-myaccount-wrap table.my_account_orders th:nth-child(4),
.woocommerce-account .bg-myaccount-wrap table.my_account_orders td:nth-child(4) { width: 8%; }  /* Biglietti */
.woocommerce-account .bg-myaccount-wrap table.my_account_orders th:nth-child(5),
.woocommerce-account .bg-myaccount-wrap table.my_account_orders td:nth-child(5) { width: 8%; }  /* Totale */
.woocommerce-account .bg-myaccount-wrap table.my_account_orders th:nth-child(6),
.woocommerce-account .bg-myaccount-wrap table.my_account_orders td:nth-child(6) { width: 10%; } /* Stato */
.woocommerce-account .bg-myaccount-wrap table.my_account_orders th:nth-child(7),
.woocommerce-account .bg-myaccount-wrap table.my_account_orders td:nth-child(7) { width: 28%; min-width: 240px; } /* Azioni */

/* Badge stato pagamento - colori come nei report */
.bg-payment-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.bg-payment-completed {
  background: #dff0d8;  /* Verde */
  color: #3c763d;
  border: 1px solid #d4e9cd;
}

.bg-payment-pending {
  background: #d9edf7;  /* Blu - Da pagare */
  color: #31708f;
  border: 1px solid #bce8f1;
}

.bg-payment-free {
  background: #e2e3e5;  /* Grigio - Gratuito */
  color: #6c757d;
  border: 1px solid #d6d8db;
}

.bg-payment-failed {
  background: #f8d7da;  /* Rosso */
  color: #a94442;
  border: 1px solid #f4c7cb;
}

.bg-payment-canceled {
  background: #fcf8e3;  /* Giallo - Annullato */
  color: #8a6d3b;
  border: 1px solid #faebcc;
}

.bg-payment-unknown {
  background: #e2e3e5;
  color: #6c757d;
  border: 1px solid #d6d8db;
}

/* Media queries spostate in bg-smartphone.css e bg-tablet.css */

.woocommerce-account .bg-myaccount-wrap table.shop_table td.actions {
  display: flex;
  flex-wrap: nowrap; 
  gap: 8px;
  align-items: stretch; 
}
.woocommerce-account .bg-myaccount-wrap table.shop_table td.actions > a.button.bg-edit { font-weight: 600; }

.woocommerce-account .bg-myaccount-wrap table.shop_table td.actions > a.button,
.woocommerce-account .bg-myaccount-wrap table.shop_table td.actions > form {
  flex: 1 1 0;
  display: flex;
  min-width: 0;
}

.woocommerce-account .bg-myaccount-wrap table.shop_table td.actions > a.button {
  width: 100%;
  align-items: center;
  justify-content: center;
  height: 40px !important;
  padding: 0 12px !important;
  line-height: 40px !important; 
  box-sizing: border-box;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.woocommerce-account .bg-myaccount-wrap table.shop_table td.actions > form > button.button {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px !important;
  padding: 0 12px !important;
  line-height: 40px !important; 
  box-sizing: border-box;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.woocommerce-account .bg-myaccount-wrap table.my_account_orders td.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.woocommerce-account .bg-myaccount-wrap table.shop_table td.ticket-type { text-align: center; }
.woocommerce-account .bg-myaccount-wrap table.shop_table td.ticket-qty { text-align: right; }
.woocommerce-account .bg-myaccount-wrap table.shop_table td.ticket-qty input[type="number"] { max-width: 90px; text-align: center; }

.woocommerce-account .bg-myaccount-wrap .ticket-type-wrap { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.woocommerce-account .bg-myaccount-wrap .ticket-type-wrap .ticket-type-label { font-weight: 500; color: #dfe3e6; }
.woocommerce-account .bg-myaccount-wrap .ticket-type-wrap .ticket-prices { font-size: 13px; }

/* Media queries spostate in bg-smartphone.css e bg-largescreen.css */

.woocommerce-account .bg-myaccount-wrap .ticket-type-wrap .price-old { color: #9aa0a6; text-decoration: line-through; margin-right: 6px; }
.woocommerce-account .bg-myaccount-wrap .ticket-type-wrap .price-new { color: #7fdcff; font-weight: 600; }
.woocommerce-account .bg-myaccount-wrap .ticket-type-wrap .price-now { color: #cfd3d8; }

@media (prefers-reduced-motion: reduce) {
  .button.bg-edit,
  .button.bg-delete,
  .button.bg-pay,
  .button.bg-restore,
  .button.bg-cancel {
    transition: none;
  }
}

.woocommerce-MyAccount-content-wrapper p,
.woocommerce-MyAccount-content-wrapper hr {
  display: none !important;
}

body .woocommerce .woocommerce-MyAccount-content {
  border-left: none !important;
}

.woocommerce-account .bg-tour-restart-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  padding: 0;
}

.woocommerce-account #bg-restart-tour.button {
  width: 90px;
  height: 90px;
  border-radius: 50% !important;           
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 18px;
  line-height: 1.2;
  border: 2px solid #ff8a80 !important;
  background: linear-gradient(135deg, #ff6659 0%, #d32f2f 50%, #b71c1c 100%) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.25),
    inset 0 -3px 6px rgba(0,0,0,0.3),
    0 6px 16px rgba(0,0,0,0.5);
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

/* Stili Modifica Prenotazione spostati in css/bg-modify-booking.css */
