/**
 * RKR Quick Add Combinations
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 *
 *  @author    Rekire Tecnología Web
 *  @copyright 2026 Rekire Tecnología Web
 *  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

.rkrqc-hidden { display: none !important; }

.rkrqc-host-relative { position: relative; }

/* Boton que abre el panel */
.rkrqc-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  white-space: nowrap;
}
.rkrqc-open .rkrqc-icon { flex: 0 0 auto; }
.rkrqc-open--injected { margin-top: .5rem; width: 100%; }

/* Panel sobre la imagen */
.rkrqc-panel {
  --rkrqc-accent: var(--bs-primary, #1f1d3a);
  --rkrqc-text: #1f1d3a;
  --rkrqc-muted: #6b6b7b;
  --rkrqc-line: #d9d9e1;
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 20;
  max-height: calc(100% - 16px);
  overflow: auto;
  box-sizing: border-box;
  padding: 12px;
  background: #fff;
  color: var(--rkrqc-text);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(20, 20, 40, .18);
  font-size: .875rem;
  line-height: 1.3;
  text-align: left;
  cursor: default;
  animation: rkrqc-in .16s ease-out;
}
@keyframes rkrqc-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rkrqc-panel { animation: none; }
}

.rkrqc-close {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rkrqc-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.rkrqc-close:hover { color: var(--rkrqc-text); }

.rkrqc-name { font-weight: 600; margin: 0 28px 10px 0; }

.rkrqc-group + .rkrqc-group { margin-top: 10px; }
.rkrqc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 28px 8px 0;
}
.rkrqc-label { color: var(--rkrqc-muted); font-size: .8125rem; }
.rkrqc-price { white-space: nowrap; }
.rkrqc-price strong { font-weight: 700; }
.rkrqc-old { color: var(--rkrqc-muted); margin-right: 6px; font-size: .8125rem; }

.rkrqc-values { display: flex; flex-wrap: wrap; gap: 6px; }

.rkrqc-chip {
  min-width: 40px;
  min-height: 32px;
  padding: 4px 9px;
  border: 1px solid var(--rkrqc-line);
  border-radius: 6px;
  background: #fff;
  color: var(--rkrqc-text);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .12s, background-color .12s, color .12s;
}
.rkrqc-chip:hover { border-color: var(--rkrqc-accent); }
.rkrqc-chip.is-selected {
  background: var(--rkrqc-accent);
  border-color: var(--rkrqc-accent);
  color: #fff;
}
.rkrqc-chip.is-unavailable:not(.is-selected) {
  color: var(--rkrqc-muted);
  text-decoration: line-through;
  opacity: .65;
}
.rkrqc-chip:focus-visible,
.rkrqc-add:focus-visible,
.rkrqc-close:focus-visible {
  outline: 2px solid var(--rkrqc-accent);
  outline-offset: 2px;
}

.rkrqc-chip--color {
  min-width: 0;
  width: 32px;
  height: 32px;
  padding: 3px;
  border-radius: 50%;
}
.rkrqc-chip--color.is-selected { background: #fff; box-shadow: inset 0 0 0 2px var(--rkrqc-accent); }
.rkrqc-swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.rkrqc-chip--color.is-unavailable:not(.is-selected) .rkrqc-swatch {
  background-image: linear-gradient(to top right, transparent calc(50% - 1px), #888 50%, transparent calc(50% + 1px));
}
.rkrqc-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rkrqc-form { margin: 12px 0 0; }
.rkrqc-panel .rkrqc-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 0;
  border-radius: 8px;
  background: var(--rkrqc-accent);
  border-color: var(--rkrqc-accent);
  color: #fff;
  font-weight: 600;
}
.rkrqc-panel .rkrqc-add:disabled { opacity: .55; cursor: not-allowed; }
.rkrqc-msg:empty { display: none; }
.rkrqc-msg { margin-top: 6px; font-size: .8125rem; color: var(--rkrqc-muted); }
.rkrqc-panel.is-added .rkrqc-msg { color: #2e7d32; font-weight: 600; }

/* En la miniatura abierta, que no la tape el zoom ni el «vista rapida» del tema */
.rkrqc-mini-open .product-miniature__quickview,
.rkrqc-mini-open .highlighted-informations { opacity: 0 !important; pointer-events: none; }

/* ---------- Ventanas flotantes: modal, lateral, barra y hoja ----------
   Por encima de los avisos flotantes de otros modulos (chat, opiniones),
   que suelen ir entre 1000 y 99999. */
.rkrqc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 15, 30, .45);
  animation: rkrqc-fade .16s ease-out;
}
.rkrqc-backdrop--bar { background: rgba(15, 15, 30, .2); }
@keyframes rkrqc-fade { from { opacity: 0; } to { opacity: 1; } }

.rkrqc-panel.rkrqc-panel--floating {
  --rkrqc-width: 440px;
  position: fixed;
  z-index: 100001;
  left: auto;
  right: auto;
  bottom: auto;
  max-height: 85vh;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  font-size: .9375rem;
}
.rkrqc-panel--floating .rkrqc-chip { min-height: 40px; padding: 6px 12px; }
.rkrqc-panel--floating .rkrqc-chip--color { width: 40px; height: 40px; padding: 3px; }
.rkrqc-panel--floating .rkrqc-add { min-height: 46px; }
.rkrqc-panel--floating .rkrqc-close { top: 8px; right: 8px; width: 36px; height: 36px; font-size: 24px; }
.rkrqc-panel--floating .rkrqc-head { margin-right: 0; }

/* Cabecera: foto, nombre y precio */
.rkrqc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 36px 16px 0;
}
.rkrqc-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f5f8;
}
.rkrqc-top-text { min-width: 0; }
.rkrqc-top .rkrqc-name {
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rkrqc-top .rkrqc-price { font-size: 1.0625rem; }

/* Ventana centrada */
.rkrqc-panel.rkrqc-panel--modal {
  top: 50%;
  left: 50%;
  width: min(var(--rkrqc-width), calc(100vw - 32px));
  transform: translate(-50%, -50%);
  border-radius: 16px;
  animation: rkrqc-zoom .18s ease-out;
}
@keyframes rkrqc-zoom {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.97); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.rkrqc-panel--modal .rkrqc-thumb { width: 96px; height: 96px; }

/* Panel lateral derecho, a toda la altura */
.rkrqc-panel.rkrqc-panel--drawer {
  top: 0;
  right: 0;
  bottom: 0;
  width: min(var(--rkrqc-width), 100vw);
  max-height: none;
  padding: 24px;
  border-radius: 0;
  animation: rkrqc-slide-right .22s ease-out;
}
@keyframes rkrqc-slide-right { from { transform: translateX(100%); } to { transform: none; } }
.rkrqc-panel--drawer .rkrqc-top { flex-direction: column; align-items: flex-start; }
.rkrqc-panel--drawer .rkrqc-thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 40vh; }
.rkrqc-panel--drawer .rkrqc-form {
  position: sticky;
  bottom: -24px;
  margin: 20px -24px -24px;
  padding: 16px 24px 24px;
  background: #fff;
  box-shadow: 0 -1px 0 var(--rkrqc-line);
}

/* Tarjeta abajo y centrada: no tapa el listado */
.rkrqc-panel.rkrqc-panel--bar {
  left: 50%;
  bottom: 16px;
  width: min(var(--rkrqc-width), calc(100vw - 32px));
  transform: translateX(-50%);
  border-radius: 16px;
  animation: rkrqc-up-centered .2s ease-out;
}
@keyframes rkrqc-up-centered {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translateX(-50%); }
}
.rkrqc-panel--bar .rkrqc-thumb { width: 56px; height: 56px; }

/* Hoja inferior (movil) */
.rkrqc-panel.rkrqc-panel--sheet {
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 80vh;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  animation: rkrqc-up .2s ease-out;
}
@keyframes rkrqc-up { from { transform: translateY(100%); } to { transform: none; } }
.rkrqc-panel--sheet .rkrqc-thumb { width: 56px; height: 56px; }

@media (prefers-reduced-motion: reduce) {
  .rkrqc-backdrop,
  .rkrqc-panel.rkrqc-panel--floating { animation: none; }
}
