/* ========== CONTENEDOR PRINCIPAL ========== */
.fma-wrap{
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.fma-wrap h3{
  margin: 0 0 10px 0;
  font-size: 20px;
}

.fma-wrap p{
  margin: 0 0 15px 0;
  color: #666;
}

/* ========== PRECIOS ========== */
.fma-prices {
  background: #eff6ff;
  border: 2px solid #2563eb;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.fma-price-item {
  flex: 1;
  min-width: 200px;
}

.fma-price-label {
  font-weight: 600;
  color: #1f2937;
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.fma-price-value {
  font-size: 24px;
  font-weight: bold;
  color: #2563eb;
}

/* ========== GRID DE MESAS ========== */
.fma-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.fma-table{
  border: 2px solid #ddd;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 15px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.fma-table:hover:not([disabled]){
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #999;
}

.fma-table.is-selected{
  border-color: #2563eb;
  background: #eff6ff;
}

.fma-table:disabled{
  opacity: 0.5;
  cursor: not-allowed;
  background: #f3f4f6;
}

.fma-table-no{
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

.fma-table-seats{
  font-size: 13px;
  color: #666;
  margin-bottom: 3px;
}

.fma-table-available{
  font-size: 12px;
  color: #059669;
  font-weight: 500;
}

/* ========== PANEL MODAL ========== */
.fma-panel{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #2563eb;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  min-width: 350px;
  max-width: 90%;
}

.fma-panel-header{
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
}

.fma-panel-header h4{
  margin: 0 0 5px 0;
  font-size: 20px;
  color: #1f2937;
}

.fma-max-info{
  margin: 0;
  font-size: 14px;
  color: #374151;
}

.fma-panel-close{
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 30px;
  height: 30px;
}

.fma-panel-close:hover{
  color: #333;
}

.fma-panel-body{
  padding: 0;
}

.fma-input-row{
  margin-bottom: 20px;
}

.fma-input-row label{
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #374151;
}

.fma-input-group{
  display: flex;
  align-items: center;
  gap: 10px;
}

.fma-btn-minus,
.fma-btn-plus{
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s;
}

.fma-btn-minus:hover,
.fma-btn-plus:hover{
  background: #1d4ed8;
}

.fma-input-group input[type="number"]{
  width: 80px;
  padding: 10px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

.fma-price-tag{
  font-size: 14px;
  color: #059669;
  font-weight: 600;
  white-space: nowrap;
}

.fma-panel-summary{
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.fma-summary-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.fma-summary-row:last-child{
  margin-bottom: 0;
}

.fma-summary-total{
  padding-top: 10px;
  border-top: 2px solid #e5e7eb;
  font-size: 18px;
  color: #2563eb;
  font-weight: bold;
}

.fma-btn-add-table{
  width: 100%;
  background: #2563eb;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.fma-btn-add-table:hover{
  background: #1d4ed8;
}

.fma-btn-add-table:disabled{
  background: #9ca3af;
  cursor: not-allowed;
}

/* ========== RESUMEN ========== */
.fma-summary{
  margin-top: 20px;
  padding: 20px;
  background: #f0fdf4;
  border: 2px solid #059669;
  border-radius: 8px;
}

.fma-summary h4{
  margin: 0 0 15px 0;
  font-size: 18px;
  color: #065f46;
}

.fma-summary-stats{
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #d1fae5;
  flex-wrap: wrap;
}

.fma-summary-stats > div{
  flex: 1;
  min-width: 100px;
  font-size: 14px;
  color: #065f46;
}

.fma-summary-stats strong{
  font-size: 24px;
  color: #059669;
  display: block;
  font-weight: 700;
}

.fma-summary-item{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px;
  background: white;
  border-radius: 6px;
  margin-bottom: 10px;
  gap: 10px;
}

.fma-summary-item > div{
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
}

.fma-btn-remove{
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.fma-btn-remove:hover{
  background: #b91c1c;
}

/* ========== CHECKOUT ========== */
.fma-checkout-wrapper{
  margin: 20px 0;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.fma-checkout-wrapper h3{
  margin: 0 0 10px 0;
  font-size: 20px;
  color: #2563eb;
}

.fma-checkout-wrapper > p{
  margin: 0 0 20px 0;
  color: #666;
  font-size: 14px;
}

.fma-checkout-table{
  margin-bottom: 30px;
  padding: 20px;
  background: white;
  border: 2px solid #2563eb;
  border-radius: 8px;
}

.fma-checkout-table h4{
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
  font-size: 18px;
  color: #1f2937;
}

.fma-ticket-field{
  margin-bottom: 15px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 4px solid #2563eb;
}

.fma-ticket-field label{
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.fma-ticket-type{
  display: inline-block;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 5px;
}

.fma-ticket-field input[type="text"]{
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* ========== MI CUENTA ========== */
.fma-my-tickets {
  max-width: 900px;
}

.fma-my-tickets h2{
  margin-bottom: 20px;
  color: #1f2937;
}

.fma-order-tickets {
  margin-bottom: 40px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
}

.fma-order-tickets h3{
  margin: 0 0 20px 0;
  color: #374151;
  padding-bottom: 10px;
  border-bottom: 2px solid #e5e7eb;
}

.fma-ticket-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
}

.fma-ticket-header {
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 15px;
  color: #1f2937;
  font-size: 14px;
}

.fma-ticket-body{
  padding-top: 5px;
}

.fma-field {
  margin-bottom: 15px;
}

.fma-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
  font-size: 14px;
  color: #374151;
}

.fma-field input,
.fma-field select,
.fma-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

.fma-field input:focus,
.fma-field select:focus,
.fma-field textarea:focus{
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.fma-save-ticket{
  background: #2563eb;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.fma-save-ticket:hover{
  background: #1d4ed8;
}

.fma-save-status {
  margin-left: 10px;
  font-weight: 500;
  font-size: 14px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px){
  .fma-grid{
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .fma-panel{
    width: 95%;
    min-width: auto;
  }
  
  .fma-prices{
    flex-direction: column;
    gap: 15px;
  }
  
  .fma-price-item{
    min-width: auto;
  }
  
  .fma-summary-stats{
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 600px){
  .fma-checkout-table h4{
    font-size: 16px;
  }
  
  .fma-input-group{
    flex-wrap: wrap;
  }
  
  .fma-price-tag{
    width: 100%;
    text-align: left;
    margin-top: 5px;
  }
}
