/**
 * SolfactPeru - Estilos Personalizados
 * Sistema Food - Módulo de Ventas
 * Fecha: Octubre 2025
 */

/* ===================================================================
   BOTONES DE ACCIÓN EN PRODUCTOS
   Funcionalidad: Botones flotantes para ver imagen y detalles
   ================================================================ */

/* Contenedor de producto */
.product.p-w-t,
.product {
  position: relative;
}

/* Contenedor de botones de acción */
.product-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px; /* Separación entre botones */
  z-index: 10;
  opacity: 0;
  transform: translateX(15px);
  transition: all .3s ease;
}

/* Mostrar botones al hacer hover sobre el producto */
.product:hover .product-actions,
.product.p-w-t:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

/* Estilo de botones de acción */
.btn-action {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
  backdrop-filter: blur(12px);
}

/* Efecto hover en botones */
.btn-action:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 1);
}

/* Iconos dentro de los botones */
.btn-action i {
  font-size: 20px;
  color: #495057;
  transition: all .2s ease;
}

/* Color de iconos en hover */
.btn-action:hover i {
  color: #0d6efd;
}

/* ===================================================================
   RESPONSIVE - DISPOSITIVOS MÓVILES
   ================================================================ */

@media (max-width: 768px) {
  /* Mostrar siempre los botones en móviles */
  .product-actions {
    opacity: 1;
    transform: translateX(0);
    gap: 10px;
    top: 8px;
    right: 8px;
  }
  
  /* Botones más pequeños en móviles */
  .btn-action {
    width: 36px;
    height: 36px;
  }
  
  /* Iconos más pequeños en móviles */
  .btn-action i {
    font-size: 18px;
  }
}

/* ===================================================================
   CONTADORES DE RANGO (Range Value Display)
   Funcionalidad: Mostrar valor actual de inputs tipo range
   ================================================================ */

.range-value-display {
  min-width: 55px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.range-value-display:hover {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
  transform: translateY(-1px);
}

/* Estilo mejorado para los inputs de rango */
.form-control-range {
  cursor: pointer;
}

.form-control-range::-webkit-slider-thumb {
  cursor: grab;
}

.form-control-range:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.form-control-range::-moz-range-thumb {
  cursor: grab;
}

.form-control-range:active::-moz-range-thumb {
  cursor: grabbing;
}

/* ===================================================================
   MESAS OCUPADAS — texto e iconos en blanco (no afecta libres/precuenta)
   ================================================================ */
button.btn-reed .bottom-mesas,
button.custom-btn-reed .bottom-mesas,
.btn-reed.custom-btn-reed .bottom-mesas {
  color: #ffffff !important;
}

button.btn-reed .bottom-mesas span,
button.btn-reed .bottom-mesas strong,
button.btn-reed .bottom-mesas i,
button.custom-btn-reed .bottom-mesas span,
button.custom-btn-reed .bottom-mesas strong,
button.custom-btn-reed .bottom-mesas i,
.btn-reed.custom-btn-reed .bottom-mesas span,
.btn-reed.custom-btn-reed .bottom-mesas strong,
.btn-reed.custom-btn-reed .bottom-mesas i {
  color: #ffffff !important;
}

/* ===================================================================
   PANEL WHATSAPP (ajuste/whatsapp)
   ================================================================ */
.wsp-panel .wsp-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.wsp-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.wsp-badge-off { background: #fde8e8; color: #c62828; }
.wsp-badge-on { background: #e8f5e9; color: #2e7d32; }
.wsp-badge-warn { background: #fff8e1; color: #f57c00; }
.wsp-badge-ban { background: #fce4ec; color: #ad1457; }
#btn-wsp-qr:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: auto;
}
.wsp-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}
.wsp-alert {
  border-radius: 10px;
  padding: 16px 18px;
}
.wsp-alert-warn { background: #fdecea; border: 1px solid #f5c6cb; }
.wsp-alert-ok { background: #e8f5e9; border: 1px solid #a5d6a7; }
.wsp-alert-ban { background: #fce4ec; border: 1px solid #f48fb1; }
.wsp-toggle-card {
  border: 1px solid #c8e6c9;
  background: #f1f8f2;
  border-radius: 12px;
  padding: 18px 20px;
}
.wsp-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #666;
  display: block;
  margin-bottom: 6px;
}
.wsp-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #888;
  margin-bottom: 12px;
}
.wsp-notif-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}

/* Modal QR WhatsApp */
.wsp-qr-modal {
  border: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.wsp-qr-modal-header {
  background: #25d366;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wsp-qr-modal-icon {
  font-size: 28px;
  color: #fff;
  margin-right: 12px;
}
.wsp-qr-modal-body {
  min-height: 380px;
}
.wsp-qr-steps {
  padding: 24px 22px 16px;
  border-right: 1px solid #eee;
  background: #fff;
}
.wsp-qr-step-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.wsp-qr-step-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13.5px;
  line-height: 1.4;
  margin-left: 12px;
  color: #222;
}
.wsp-step-num {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wsp-qr-demo-img {
  max-width: 100%;
  height: auto;
  max-height: 140px;
  border-radius: 8px;
}
.wsp-qr-code-pane {
  padding: 28px 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}
.wsp-qr-code-box {
  width: 260px;
  height: 260px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.wsp-qr-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.wsp-qr-loading {
  text-align: center;
}
.wsp-qr-timer-wrap {
  width: 260px;
  margin-top: 18px;
  text-align: center;
}
.wsp-qr-timer-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.wsp-qr-timer-bar span {
  display: block;
  height: 100%;
  width: 100%;
  background: #25d366;
  border-radius: 4px;
}
.wsp-qr-timer-text {
  font-size: 13px;
  color: #777;
}
@media (max-width: 767px) {
  .wsp-qr-steps { border-right: none; border-bottom: 1px solid #eee; }
  .wsp-qr-demo { display: none; }
}

.wsp-section-title{
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.wa-step-badge{
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #ff5722;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
/* ===================================================================
   MI SUSCRIPCIÓN + RESELLER — UI plana Solfact (#ff5722)
   Verde solo para estados OK (activo / operativo)
   ================================================================ */
.saas-sub-panel {
  border: 1px solid #ffccbc;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: none;
}
.saas-sub-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #fff3ef;
  border-bottom: 1px solid #ffccbc;
  color: #222;
}
.saas-sub-hero__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.saas-sub-hero__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ff5722;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.saas-sub-hero__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #222;
  line-height: 1.3;
}
.saas-sub-hero__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #666;
  line-height: 1.4;
}
.saas-sub-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.saas-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
/* Verde SOLO para estados positivos */
.saas-sub-badge--ok {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #a5d6a7;
}
.saas-sub-badge--warn {
  background: #fff8e1;
  color: #f57c00;
  border-color: #ffe082;
}
.saas-sub-badge--danger {
  background: #fde8e8;
  color: #c62828;
  border-color: #f5c6cb;
}
.saas-sub-btn-refresh {
  border: 1px solid #ffccbc !important;
  background: #fff !important;
  color: #ff5722 !important;
  font-weight: 600;
  border-radius: 8px;
  padding: 7px 14px;
}
.saas-sub-btn-refresh:hover {
  background: #fff3ef !important;
  border-color: #ffab91 !important;
  color: #e64a19 !important;
}
.saas-sub-body {
  padding: 20px;
  background: #fff;
}
.saas-sub-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 991px) {
  .saas-sub-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .saas-sub-kpis { grid-template-columns: 1fr; }
}
.saas-sub-kpi {
  background: #fff3ef;
  border: 1px solid #ffccbc;
  border-radius: 12px;
  padding: 16px 18px;
}
.saas-sub-kpi__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
}
.saas-sub-kpi__value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #222;
  line-height: 1.25;
}
.saas-sub-kpi__hint {
  margin-top: 4px;
  font-size: 12px;
  color: #888;
}
.saas-sub-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 12px;
}
@media (max-width: 991px) {
  .saas-sub-grid { grid-template-columns: 1fr; }
}
.saas-sub-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px 20px;
  height: 100%;
}
.saas-sub-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.saas-sub-card__title i {
  color: #ff5722;
}
.saas-sub-meta {
  list-style: none;
  margin: 0;
  padding: 0;
}
.saas-sub-meta li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 13.5px;
}
.saas-sub-meta li:last-child { border-bottom: 0; }
.saas-sub-meta__k {
  color: #666;
  font-weight: 500;
  flex-shrink: 0;
}
.saas-sub-meta__v {
  color: #222;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.saas-sub-alert {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}
.saas-sub-alert--warn {
  background: #fff8e1;
  border: 1px solid #ffe082;
  color: #f57c00;
}
.saas-sub-table-wrap {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}
.saas-sub-table {
  margin: 0 !important;
  width: 100%;
}
.saas-sub-table thead th {
  background: #fff3ef !important;
  color: #666 !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0 !important;
  padding: 12px 14px !important;
  white-space: nowrap;
}
.saas-sub-table tbody td {
  padding: 12px 14px !important;
  vertical-align: middle !important;
  border-color: #eee !important;
  font-size: 13.5px;
  color: #222;
}
.saas-sub-table tbody tr:hover td {
  background: #fffaf8;
}
.saas-sub-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #ff5722 !important;
  text-decoration: none !important;
}
.saas-sub-pdf:hover { color: #e64a19 !important; text-decoration: underline !important; }
.saas-sub-empty {
  text-align: center;
  padding: 28px 16px;
  color: #888;
  font-size: 13.5px;
}
.saas-sub-empty i {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  color: #ffab91;
}
.saas-sub-foot {
  margin-top: 12px;
  font-size: 12px;
  color: #888;
}
.saas-sub-foot a {
  color: #ff5722;
  font-weight: 600;
}

.rs-lock-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #ffccbc;
  background: #fff3ef;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.rs-lock-card.is-locked {
  background: #fde8e8;
  border-color: #f5c6cb;
}
.rs-lock-card__text {
  min-width: 0;
  flex: 1 1 220px;
}
.rs-lock-card__text strong {
  display: block;
  color: #222;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.rs-lock-card__text p {
  margin: 0;
  color: #666;
  font-size: 13px;
  line-height: 1.4;
}
.rs-lock-card.is-locked .rs-lock-card__text strong {
  color: #c62828;
}
.rs-lock-card__action .btn {
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}
.rs-grid {
  margin-bottom: 12px;
}
.rs-plan-form .form-control {
  border-radius: 8px;
  border-color: #ddd;
}
.rs-plan-form .form-group {
  margin-bottom: 14px;
}
.rs-btn-save {
  border-radius: 8px;
  font-weight: 600;
  padding: 8px 16px;
}
.rs-api-card {
  margin-top: 4px;
}
.rs-api-text {
  font-size: 13px;
  color: #666;
  line-height: 1.45;
  margin-bottom: 12px;
}
.rs-api-code {
  margin-top: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
}
.rs-api-code__label {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  background: #fff3ef;
  border-bottom: 1px solid #ffccbc;
}
.rs-api-code pre {
  margin: 0;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #222;
  white-space: pre-wrap;
  background: transparent;
  border: 0;
}
.m-t-12 { margin-top: 12px; }
.m-l-5 { margin-left: 5px; }

/* ===================================================================
   FIN DE ESTILOS PERSONALIZADOS
   ================================================================ */

