/**
 * @fileoverview UI Components — Modern Luxury
 */

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  outline: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--wine-700) 0%, var(--wine-800) 100%);
  color: var(--text-on-dark);
  box-shadow: 0 4px 12px rgba(107, 29, 58, 0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--wine-600) 0%, var(--wine-700) 100%);
  box-shadow: 0 6px 16px rgba(107, 29, 58, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--wine-700);
  border: 1px solid var(--gold-500);
}
.btn-secondary:hover {
  background: var(--wine-50);
  border-color: var(--gold-600);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
  color: var(--wine-900);
  box-shadow: 0 4px 12px rgba(201, 169, 110, 0.25);
}
.btn-gold:hover { 
  background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%); 
}

.btn-wine {
  background: var(--wine-700);
  color: var(--white);
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-whatsapp { background: #25D366; color: white; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-xs); }
.btn-icon { padding: 10px; border-radius: var(--radius-full); }

/* ─── Cards ─── */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gold-400);
}

.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--wine-50);
}

.card-body {
  padding: var(--space-5);
}

/* Specific Section Card for Dashboards */
.section-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}
.section-card-header h3 {
  font-size: 1.1rem;
  font-family: var(--font-heading);
  color: var(--wine-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-body);
}

.badge-wine { background: var(--wine-100); color: var(--wine-800); border: 1px solid var(--wine-200); }
.badge-gold { background: var(--gold-100); color: var(--gold-700); border: 1px solid var(--gold-200); }
.badge-success { background: var(--success-bg); color: var(--success-text); }
.badge-warning { background: var(--warning-bg); color: var(--warning-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); }
.badge-neutral { background: var(--bg-subtle); color: var(--text-muted); }

/* ─── Modals (Glassy & Smooth) ─── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(43, 5, 17, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-surface);
  width: 100%;
  max-width: 550px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(20px);
  opacity: 0;
  transition: all 0.4s var(--ease-spring);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--wine-50);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wine-900);
}

.modal-close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wine-700);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.modal-close:hover {
  background: var(--wine-100);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ─── Empty States ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.empty-state-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--wine-50);
  color: var(--gold-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  border: 1px solid var(--border-light);
}

.empty-state h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--wine-900);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 350px;
}
