/* =========================================================
   GETWINGRAM HUB & SORTEOS LIBRES ESTILOS (3D & RESPONSIVE)
   ========================================================= */

/* Hero Hub Selector */
.hub-hero-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.hub-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 30%, #e2e8f0 70%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hub-hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

/* Selector 3D Cards Grid */
.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
  perspective: 1200px;
}

.hub-card-3d {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
}

.hub-card-3d:hover {
  transform: translateY(-8px) rotateX(2deg);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(225, 48, 108, 0.2);
}

.hub-card-3d.card-instagram:hover {
  border-color: rgba(225, 48, 108, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(225, 48, 108, 0.3);
}

.hub-card-3d.card-free:hover {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(99, 102, 241, 0.3);
}

/* Iconos 3D Premium */
.hub-icon-3d-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-card-3d:hover .hub-icon-3d-wrapper {
  transform: scale(1.1) rotateZ(3deg);
}

.icon-ig-3d {
  background: var(--ig-gradient);
  box-shadow: 0 12px 25px -4px rgba(225, 48, 108, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.icon-free-3d {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  box-shadow: 0 12px 25px -4px rgba(139, 92, 246, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.hub-card-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
}

.badge-ig-glow {
  background: rgba(225, 48, 108, 0.15);
  border: 1px solid rgba(225, 48, 108, 0.35);
  color: #ff7597;
}

.badge-free-glow {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c084fc;
}

.hub-card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.hub-card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.hub-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hub-card-features li {
  font-size: 0.88rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hub-card-features li i {
  color: var(--color-success);
  flex-shrink: 0;
}

.hub-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 0.95rem;
}

.hub-card-3d.card-instagram .hub-card-action {
  color: #ff5e89;
}

.hub-card-3d.card-free .hub-card-action {
  color: #a78bfa;
}

/* Contenedor con máscaras de desvanecimiento lateral progresivo (Opción 3) */
.free-nav-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
  /* Máscara de desvanecimiento sutil en los extremos que indica deslizamiento */
  -webkit-mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
  mask-image: linear-gradient(to right, transparent, black 16px, black calc(100% - 16px), transparent);
}

/* Tabs de navegación en Sorteos Libres: Carrusel táctil fluido sin barra de scroll visual */
.free-draws-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 1rem;
  margin: 0;
  white-space: nowrap;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  /* Ocultar barra de desplazamiento en todos los navegadores (Chrome, Safari, Firefox, Edge) */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE y Edge */
}

.free-draws-nav.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.free-draws-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

.free-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.free-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.free-tab-btn.is-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(168, 85, 247, 0.28) 100%);
  border-color: rgba(168, 85, 247, 0.55);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}

/* Panel de Sorteos Libres */
.free-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.free-panel.is-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Amigo Invisible QR & Share Card */
.secret-santa-share-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  margin-top: 1.25rem;
}

.qr-canvas-container {
  display: inline-block;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
  margin: 1rem 0;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.qr-canvas-container canvas, .qr-canvas-container img {
  display: block;
  max-width: 180px;
  height: auto;
}

.secret-santa-link-copy {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.secret-santa-link-copy input {
  flex-grow: 1;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  color: #ffffff;
  font-size: 0.88rem;
}

/* Lista de participantes vivos (Pills / Badges) */
.participants-live-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
}

.participant-live-tag {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #e0e7ff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Animación de Revelación de Amigo Invisible */
.reveal-gift-box {
  background: radial-gradient(circle at center, rgba(168, 85, 247, 0.2) 0%, rgba(15, 23, 42, 0.6) 70%);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin: 1.5rem 0;
}

.reveal-gift-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  margin: 1rem 0;
  text-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
}

/* Ruleta Canvas Interactive Container */
.interactive-roulette-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  margin: 1.5rem 0;
}

.roulette-canvas-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
  max-width: 100%;
}

.roulette-pointer {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #ef4444;
  z-index: 10;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

#freeWheelCanvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 35px rgba(0,0,0,0.6), inset 0 0 15px rgba(255,255,255,0.2);
}

/* Equipos al azar: Grid de Columnas */
.teams-output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.team-column-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.2rem;
}

.team-column-header {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

.team-members-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.team-member-item {
  font-size: 0.9rem;
  color: #cbd5e1;
  padding: 0.35rem 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Barra superior de navegación interna y título centrado */
.free-subhead-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  position: relative;
}

.free-subhead-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 40%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.free-subhead-spacer {
  width: 90px;
}

/* Botón flotante para volver al Hub */
.btn-back-hub {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 0;
  transition: all var(--transition-fast);
  z-index: 2;
}

.btn-back-hub:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* =========================================================
   SISTEMA DE NOTIFICACIONES Y MODALES PREMIUM
========================================================= */
#freeToastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
  max-width: 90vw;
}

.free-toast {
  padding: 0.85rem 1.25rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: freeToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.free-toast.success {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.88) 0%, rgba(15, 23, 42, 0.94) 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.2);
}

.free-toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.88) 0%, rgba(15, 23, 42, 0.94) 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(239, 68, 68, 0.2);
}

.free-toast.info {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.88) 0%, rgba(15, 23, 42, 0.94) 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.2);
}

.free-toast.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.88) 0%, rgba(15, 23, 42, 0.94) 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
}

.free-toast.fade-out {
  opacity: 0;
  transform: translateY(12px) scale(0.95);
}

.free-toast-icon {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.free-toast-content {
  flex-grow: 1;
  line-height: 1.4;
}

@keyframes freeToastSlideIn {
  0% {
    transform: translateY(24px) scale(0.92);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Modal Emergente de Diálogo / Confirmación */
.free-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.free-modal-overlay.is-visible {
  opacity: 1;
}

.free-modal-card {
  width: 100%;
  max-width: 440px;
  background: rgba(20, 24, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(168, 85, 247, 0.15);
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.free-modal-overlay.is-visible .free-modal-card {
  transform: scale(1);
}

.free-modal-icon-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
}

.free-modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.free-modal-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

.free-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.free-modal-actions button {
  flex: 1;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.92rem;
}

/* =========================================================
   ENTRADA DE DATOS MÓVIL CON PÍLDORAS (RULETA, LISTA, EQUIPOS)
   ========================================================= */
.free-mobile-input-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.free-entry-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.free-entry-bar input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem 0.85rem 2.5rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.free-entry-bar input[type="text"]:focus {
  background: rgba(10, 15, 30, 0.95);
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.28);
  outline: none;
}

.free-btn-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.2rem;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.free-btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.48);
}

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

/* Cabecera de estado de las píldoras */
.free-pills-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  padding: 0 0.2rem;
}

.free-pills-count {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.free-btn-clear-all {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.free-btn-clear-all:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

/* Contenedor de píldoras */
.free-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 185px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.65rem 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.free-pills-empty {
  width: 100%;
  text-align: center;
  padding: 1.25rem 0.5rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-style: italic;
}

/* Píldora individual con botón X */
.free-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.55rem 0.35rem 0.75rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  color: #f1f5f9;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  animation: popPill 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  max-width: 100%;
}

.free-item-pill:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(168, 85, 247, 0.12);
}

.free-item-pill-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
}

.free-item-pill-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
  flex-shrink: 0;
}

.free-item-pill-del:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.15);
}

@keyframes popPill {
  0% { transform: scale(0.75); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Modo alternar texto por lote / pegar lista completa */
.free-bulk-drawer {
  margin-top: 0.25rem;
  padding-top: 0.4rem;
}

.free-bulk-toggle {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.free-bulk-toggle:hover {
  color: #ffffff;
}

.free-bulk-box {
  margin-top: 0.5rem;
}

.free-bulk-box textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.65rem 0.85rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

/* Optimización para pantallas móviles */
@media (max-width: 600px) {
  .free-entry-bar {
    gap: 0.4rem;
  }
  .free-btn-add {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
  }
  .free-item-pill {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem 0.3rem 0.65rem;
  }
  .free-item-pill-text {
    max-width: 160px;
  }

  /* Modal de confirmación en móviles */
  .free-modal-overlay {
    padding: 0 !important;
  }

  .free-modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    min-height: 100dvh !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: calc(env(safe-area-inset-top, 0px) + 2rem) 1.5rem calc(env(safe-area-inset-bottom, 0px) + 2rem) !important;
  }

  /* Grids de dos columnas de inputs que colapsan en móviles estrechos */
  .free-panel [style*="grid-template-columns: 1fr 1fr;"],
  .hub3d-free-embedded-suite [style*="grid-template-columns: 1fr 1fr;"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }
}

/* En teléfonos muy pequeños (< 400px, iPhone SE / Mini) asegurar que la barra de añadir no desborde */
@media (max-width: 400px) {
  .free-entry-bar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .free-btn-add {
    width: 100% !important;
    justify-content: center !important;
  }
}

