/* ============================================================
   GBoX WordPress Plugin — gbox-main.css
   Variables, Reset y Contenedores Fluidos
   ============================================================ */

.gbox-wrapper {
  --gbox-bg: #F8F5F0;
  --gbox-surface: #FFFFFF;
  --gbox-surface-2: #FDFBF8;
  --gbox-surface-3: #EFE9DE;
  --gbox-border: #E2D9CC;
  --gbox-border-light: #ECE5DA;

  --gbox-text: #1C1714;
  --gbox-text-muted: #7A6E65;
  --gbox-text-light: #ADA5A0;

  --gbox-gold: #C9973B;
  --gbox-gold-light: #FDF3DC;
  --gbox-gold-dark: #9A7229;
  --gbox-brown: #6B4C1E;

  --gbox-vip-bg: #1A1A2E;
  --gbox-vip-accent: #C9A84C;

  --gbox-success: #16A34A;
  --gbox-danger: #DC2626;

  --gbox-r-sm: 6px;
  --gbox-r-md: 10px;
  --gbox-r-lg: 16px;
  --gbox-r-xl: 24px;
  --gbox-r-full: 9999px;

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--gbox-text);
  line-height: 1.5;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.gbox-wrapper *, .gbox-wrapper *::before, .gbox-wrapper *::after {
  box-sizing: border-box;
}

/* Botones */
.gbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--gbox-r-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  user-select: none;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.gbox-btn:active { transform: scale(0.97); }

.gbox-btn-gold {
  background: var(--gbox-gold);
  color: #FFF !important;
  box-shadow: 0 4px 12px rgba(201,151,59,0.3);
}
.gbox-btn-gold:hover {
  background: var(--gbox-gold-dark);
  box-shadow: 0 6px 16px rgba(201,151,59,0.45);
}

.gbox-btn-ghost {
  background: transparent;
  color: var(--gbox-text-muted) !important;
  border: 1.5px solid var(--gbox-border);
}
.gbox-btn-ghost:hover {
  background: var(--gbox-surface-3);
  color: var(--gbox-text) !important;
}

.gbox-btn-sm { padding: 6px 12px; font-size: 12px; }
.gbox-btn-lg { padding: 12px 24px; font-size: 14px; }

/* Modales */
.gbox-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,8,5,0.65);
  backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.gbox-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.gbox-modal {
  background: var(--gbox-surface);
  border-radius: var(--gbox-r-xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.96);
  transition: all 0.3s ease;
}

.gbox-modal-overlay.is-open .gbox-modal {
  transform: translateY(0) scale(1);
}

.gbox-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gbox-border-light);
  flex-shrink: 0;
}

.gbox-modal-title { font-size: 16px; font-weight: 800; color: var(--gbox-text); }
.gbox-modal-close {
  width: 32px; height: 32px; border-radius: var(--gbox-r-sm);
  display: flex; align-items: center; justify-content: center;
  border: none; background: var(--gbox-surface-3); color: var(--gbox-text-muted);
  font-size: 18px; cursor: pointer;
}
.gbox-modal-close:hover { background: var(--gbox-border); color: var(--gbox-text); }
.gbox-modal-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.gbox-modal-footer {
  padding: 14px 20px; border-top: 1px solid var(--gbox-border-light);
  display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}

/* Toast */
#gbox-toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 100000;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.gbox-toast {
  padding: 10px 18px; border-radius: var(--gbox-r-md);
  font-size: 13px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  background: var(--gbox-text); color: #FFF; animation: gboxToastIn 0.3s ease both;
}
.gbox-toast.gold { background: var(--gbox-gold); }
.gbox-toast.success { background: var(--gbox-success); }
@keyframes gboxToastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Drawer Lateral */
.gbox-drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 99990; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.gbox-drawer-overlay.is-open { opacity: 1; visibility: visible; }
.gbox-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 390px; max-width: 100vw;
  background: var(--gbox-surface); box-shadow: -8px 0 32px rgba(0,0,0,0.15);
  transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; z-index: 99991;
}
.gbox-drawer-overlay.is-open .gbox-drawer { transform: translateX(0); }
.gbox-drawer-header { padding: 16px 20px; border-bottom: 1px solid var(--gbox-border-light); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.gbox-drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px; }