/* ═══════════════════════════════════════════════
   CUSTOM PRICE SELECTOR PRO — Frontend Styles
   ═══════════════════════════════════════════════ */

.cps-price-selector-wrapper {
  --cps-btn-color: #4f46e5;
  --cps-btn-txt:   #ffffff;
  --cps-sel-color: #7c3aed;
  background: #f8f7ff;
  border: 2px solid #e8e5ff;
  border-radius: 14px;
  padding: 20px;
  margin: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── LABEL ────────────────────────────────── */
.cps-label {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 14px 0;
  display: block;
}

/* ══════════════════════════════════════════
   MODO: BOTONES
══════════════════════════════════════════ */
.cps-buttons-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.cps-price-btn {
  background: var(--cps-btn-color);
  color: var(--cps-btn-txt);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
}
.cps-price-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .2s;
}
.cps-price-btn:hover::before { background: rgba(255,255,255,.15); }
.cps-price-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.cps-price-btn:active { transform: translateY(-1px); }

.cps-price-btn.cps-btn-active {
  background: var(--cps-sel-color) !important;
  border-color: rgba(255,255,255,.4);
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(124,58,237,.35);
}
.cps-price-btn.cps-btn-active::after {
  content: '✓';
  position: absolute;
  top: 4px; right: 6px;
  font-size: 10px;
  opacity: .8;
}

.cps-btn-currency {
  font-size: 12px;
  opacity: .85;
  font-weight: 600;
  line-height: 1;
}
.cps-btn-amount {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.cps-btn-custom {
  background: transparent !important;
  color: var(--cps-btn-color) !important;
  border: 2px dashed var(--cps-btn-color) !important;
  font-size: 14px !important;
  opacity: .8;
}
.cps-btn-custom:hover { opacity: 1; background: rgba(79,70,229,.06) !important; }
.cps-btn-custom.cps-btn-active {
  background: rgba(79,70,229,.1) !important;
  color: var(--cps-sel-color) !important;
  border-color: var(--cps-sel-color) !important;
  transform: none !important;
}

/* ══════════════════════════════════════════
   MODO: SLIDER
══════════════════════════════════════════ */
.cps-slider-container { margin-bottom: 14px; }

.cps-slider-value-display {
  text-align: center;
  margin-bottom: 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.cps-currency {
  font-size: 20px;
  font-weight: 700;
  color: var(--cps-btn-color);
}
.cps-slider-amount {
  font-size: 42px;
  font-weight: 900;
  color: var(--cps-sel-color);
  line-height: 1;
  transition: all .15s;
}

.cps-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right,
    var(--cps-btn-color) 0%,
    var(--cps-btn-color) var(--slider-pct, 0%),
    #ddd var(--slider-pct, 0%),
    #ddd 100%
  );
  outline: none;
  cursor: pointer;
  margin: 8px 0;
}
.cps-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cps-sel-color);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
  transition: transform .15s, box-shadow .15s;
}
.cps-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.cps-slider::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--cps-sel-color);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,.2);
}

.cps-slider-limits {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.cps-slider-ticks {
  position: relative;
  height: 32px;
  margin-top: 8px;
}
.cps-tick {
  position: absolute;
  transform: translateX(-50%);
  text-align: center;
}
.cps-tick::before {
  content: '';
  display: block;
  width: 2px;
  height: 6px;
  background: #cbd5e1;
  margin: 0 auto 2px;
  border-radius: 1px;
}
.cps-tick span {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  font-weight: 600;
}

/* ══════════════════════════════════════════
   MODO: SELECT
══════════════════════════════════════════ */
.cps-select-container { margin-bottom: 14px; }

.cps-select-dropdown {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--cps-btn-color);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234f46e5' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  transition: border-color .2s, box-shadow .2s;
}
.cps-select-dropdown:focus {
  outline: none;
  border-color: var(--cps-sel-color);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

/* ── INPUT PERSONALIZADO ──────────────────── */
.cps-custom-input-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid var(--cps-btn-color);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}
.cps-currency-prefix {
  padding: 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--cps-btn-color);
  border-right: 2px solid #e2e8f0;
  background: #f8f7ff;
  align-self: stretch;
  display: flex;
  align-items: center;
}
.cps-custom-input {
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  background: transparent;
}
.cps-custom-input:focus { outline: none; }
.cps-custom-input::placeholder { color: #cbd5e1; font-weight: 400; }

/* ── RESUMEN DE PRECIO ────────────────────── */
.cps-price-summary {
  background: linear-gradient(135deg, var(--cps-btn-color), var(--cps-sel-color));
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  justify-content: center;
  margin-top: 12px;
  box-shadow: 0 3px 12px rgba(79,70,229,.25);
}
.cps-summary-label { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 600; }
.cps-summary-currency { color: rgba(255,255,255,.9); font-size: 18px; font-weight: 700; }
.cps-summary-amount {
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
}

/* ── ANIMACIONES ──────────────────────────── */
@keyframes cps-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1.07); }
}
.cps-btn-active { animation: cps-pop .25s ease forwards; }
.cps-slider-amount.cps-updating { color: var(--cps-btn-color); }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 480px) {
  .cps-price-btn { min-width: calc(50% - 10px); flex: 1; }
  .cps-slider-amount { font-size: 32px; }
}

/* ═══════════════════════════════════════════════
   v2 — CURRENCY SWITCHER (Frontend)
   ═══════════════════════════════════════════════ */

.cps-currency-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cps-currency-switcher-label {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .6px;
  white-space: nowrap;
}

/* ── CONTENEDOR DE BOTONES ─────────────────── */
.cps-currency-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(0,0,0,.04);
  border-radius: 60px;
  padding: 4px;
}

/* ── BOTÓN DE MONEDA ───────────────────────── */
.cps-currency-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border: none;
  border-radius: 50px;
  background: transparent;
  cursor: pointer;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

/* Efecto ripple */
.cps-currency-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: transparent;
  transition: background .2s;
}
.cps-currency-btn:hover::after { background: rgba(255,255,255,.15); }
.cps-currency-btn:hover { transform: translateY(-1px); }

/* Estado inactivo */
.cps-currency-btn:not(.cps-currency-btn-active) {
  color: #475569;
}
.cps-currency-btn:not(.cps-currency-btn-active):hover {
  background: rgba(255,255,255,.7);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

/* Estado ACTIVO — el destacado */
.cps-currency-btn-active {
  background: linear-gradient(135deg, var(--cps-btn-color) 0%, var(--cps-sel-color) 100%);
  color: #fff !important;
  box-shadow:
    0 4px 15px rgba(79,70,229,.35),
    0 0 0 3px rgba(79,70,229,.15);
  transform: scale(1.05);
}
.cps-currency-btn-active:hover {
  transform: scale(1.08) translateY(-1px) !important;
  box-shadow:
    0 6px 20px rgba(79,70,229,.4),
    0 0 0 4px rgba(79,70,229,.2) !important;
}

/* Indicador checkmark en activo */
.cps-currency-btn-active .cps-currency-code::after {
  content: ' ✓';
  font-size: 10px;
  opacity: .85;
}

/* Bandera */
.cps-currency-flag {
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
  transition: transform .2s;
}
.cps-currency-btn:hover .cps-currency-flag { transform: scale(1.15) rotate(-5deg); }

/* Código de moneda */
.cps-currency-code {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .3px;
  white-space: nowrap;
}

/* ── ANIMACIÓN AL CAMBIAR ─────────────────── */
@keyframes cps-currency-switch {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.12); }
  70%  { transform: scale(0.97); }
  100% { transform: scale(1.05); }
}
.cps-currency-btn-active {
  animation: cps-currency-switch .3s cubic-bezier(.34,1.56,.64,1) forwards;
}

/* ── TRANSICIÓN DE PRECIOS ────────────────── */
.cps-price-btn,
.cps-slider-amount,
.cps-summary-amount {
  transition: opacity .2s, transform .2s;
}
.cps-prices-updating .cps-price-btn,
.cps-prices-updating .cps-slider-amount,
.cps-prices-updating .cps-summary-amount {
  opacity: .4;
  transform: scale(0.96);
}

/* ── CÓDIGO EN SUMMARY ────────────────────── */
.cps-summary-code {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  margin-left: 2px;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 480px) {
  .cps-currency-btns { gap: 6px; }
  .cps-currency-btn { padding: 8px 14px; }
  .cps-currency-code { font-size: 12px; }
  .cps-currency-flag { font-size: 16px; }
}

/* ═══════════════════════════════════════════════
   v2.1 — FIXED PRICE / CUSTOM PRICE TAB SWITCHER
   ═══════════════════════════════════════════════ */

/* ── WRAPPER DEL SWITCHER ─────────────────────── */
.cps-mode-tab-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: rgba(0,0,0,.05);
  border-radius: 16px;
  padding: 5px;
  margin-bottom: 18px;
  position: relative;
}

/* ── TAB BASE ──────────────────────────────────── */
.cps-mode-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 14px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  z-index: 1;
  text-align: center;
}

.cps-mode-tab:not(.cps-mode-tab-active) {
  color: #64748b;
}
.cps-mode-tab:not(.cps-mode-tab-active):hover {
  color: #334155;
  background: rgba(255,255,255,.5);
}

/* ── TAB ACTIVO ────────────────────────────────── */
.cps-mode-tab-active {
  background: linear-gradient(135deg,
    var(--cps-btn-color) 0%,
    var(--cps-sel-color) 100%
  ) !important;
  color: #fff !important;
  box-shadow:
    0 6px 20px rgba(79,70,229,.3),
    0 2px 6px rgba(0,0,0,.1);
  transform: scale(1.02);
}

/* Ícono */
.cps-tab-icon {
  font-size: 22px;
  line-height: 1;
  transition: transform .3s;
}
.cps-mode-tab-active .cps-tab-icon {
  transform: scale(1.15) rotate(-5deg);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

/* Texto principal */
.cps-tab-main {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.2;
}

/* Precio del tab fijo */
.cps-tab-price {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.3px;
  line-height: 1;
  margin-top: 2px;
  transition: all .2s;
}
.cps-mode-tab-active .cps-tab-price {
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.cps-mode-tab:not(.cps-mode-tab-active) .cps-tab-price {
  color: var(--cps-btn-color);
  font-weight: 800;
}

/* Subtítulo del tab custom */
.cps-tab-desc {
  font-size: 11px;
  font-weight: 600;
  opacity: .75;
  letter-spacing: .3px;
  text-transform: uppercase;
}

/* ── SEPARADOR VISUAL ──────────────────────────── */
.cps-mode-tab-switcher::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 60%;
  background: rgba(0,0,0,.08);
  border-radius: 1px;
  z-index: 0;
  pointer-events: none;
}

/* ── INNER SELECTOR TRANSITION ─────────────────── */
.cps-selector-inner {
  transition: opacity .3s, transform .3s;
  transform-origin: top center;
}
.cps-selector-inner.cps-selector-hidden {
  opacity: 0;
  transform: scaleY(0.95);
  pointer-events: none;
}

/* ── FIXED PRICE NOTICE (when fixed tab active) ── */
.cps-fixed-price-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg,
    rgba(79,70,229,.08),
    rgba(124,58,237,.08)
  );
  border: 2px solid rgba(79,70,229,.15);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 4px;
  animation: cps-notice-in .3s ease;
}
@keyframes cps-notice-in {
  from { opacity:0; transform: scale(.97) translateY(-4px); }
  to   { opacity:1; transform: none; }
}
.cps-fixed-price-notice .cps-fixed-check {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--cps-btn-color), var(--cps-sel-color));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(79,70,229,.3);
}
.cps-fixed-price-text {
  display: flex;
  flex-direction: column;
}
.cps-fixed-price-text strong {
  font-size: 13px;
  color: #334155;
  font-weight: 700;
}
.cps-fixed-price-text .cps-fixed-amount {
  font-size: 24px;
  font-weight: 900;
  color: var(--cps-btn-color);
  line-height: 1.2;
  letter-spacing: -.3px;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 400px) {
  .cps-mode-tab { padding: 12px 8px; }
  .cps-tab-price { font-size: 17px; }
  .cps-tab-main { font-size: 12px; }
  .cps-tab-icon { font-size: 18px; }
}

/* ═══════════════════════════════════════════════
   v2.2 — SUGGESTED PRICE
   ═══════════════════════════════════════════════ */

/* ── STYLE 1: BADGE COMPACTO ──────────────────── */
.cps-suggested-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg,
    rgba(79,70,229,.08) 0%,
    rgba(124,58,237,.12) 100%
  );
  border: 1.5px solid rgba(79,70,229,.2);
  border-radius: 50px;
  padding: 7px 14px 7px 10px;
  margin-bottom: 12px;
  font-size: 13px;
  flex-wrap: wrap;
  width: fit-content;
  position: relative;
  overflow: hidden;
}

/* shimmer sweep */
.cps-suggested-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,.4) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: cps-sug-shimmer 3s ease-in-out infinite 1s;
}
@keyframes cps-sug-shimmer {
  0%   { transform: translateX(-100%); }
  40%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

.cps-sug-badge-icon {
  font-size: 14px;
  color: var(--cps-btn-color);
  animation: cps-sug-pulse 2s ease-in-out infinite;
}
@keyframes cps-sug-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.6; transform:scale(.85); }
}

.cps-sug-badge-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #64748b;
}

.cps-sug-badge-range {
  font-size: 14px;
  font-weight: 800;
  color: var(--cps-btn-color);
  letter-spacing: -.2px;
}

.cps-sug-quick-btn {
  background: var(--cps-btn-color);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.cps-sug-quick-btn:hover {
  background: var(--cps-sel-color);
  transform: scale(1.05);
}

/* ── STYLE 2: BANNER DESTACADO ────────────────── */
.cps-suggested-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg,
    rgba(79,70,229,.1) 0%,
    rgba(124,58,237,.15) 100%
  );
  border: 2px solid rgba(79,70,229,.25);
  border-left: 4px solid var(--cps-btn-color);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

/* glow pulse on border */
.cps-suggested-banner::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 12px;
  border: 2px solid var(--cps-btn-color);
  opacity: 0;
  animation: cps-banner-glow 3s ease-in-out infinite 1.5s;
}
@keyframes cps-banner-glow {
  0%,100% { opacity:0; }
  50%      { opacity:.25; }
}

.cps-sug-icon {
  font-size: 26px;
  flex-shrink: 0;
  animation: cps-sug-bounce 2.5s ease-in-out infinite;
}
@keyframes cps-sug-bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

.cps-sug-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cps-sug-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #64748b;
}
.cps-sug-range {
  font-size: 20px;
  font-weight: 900;
  color: var(--cps-btn-color);
  letter-spacing: -.3px;
  line-height: 1.2;
}

.cps-sug-apply-btn {
  background: linear-gradient(135deg, var(--cps-btn-color), var(--cps-sel-color));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
}
.cps-sug-apply-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(79,70,229,.4);
}
.cps-sug-apply-btn:active {
  transform: translateY(0) scale(.98);
}

/* ── HIGHLIGHT ANIMATION on buttons when suggested is applied ── */
@keyframes cps-sug-highlight {
  0%   { box-shadow: 0 0 0 0 rgba(79,70,229,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(79,70,229,0); }
  100% { box-shadow: 0 0 0 0 rgba(79,70,229,0); }
}
.cps-sug-highlighted {
  animation: cps-sug-highlight .5s ease-out;
}

/* ── RESPONSIVE ────────────────────────────────── */
@media (max-width: 420px) {
  .cps-suggested-banner { flex-wrap: wrap; }
  .cps-sug-apply-btn { width: 100%; text-align: center; }
}

/* ═══════════════════════════════════════════════
   v2.3 — HIDE WC PRICE (frontend fallback)
   ═══════════════════════════════════════════════ */
/* Applied via JS when per-product override is active */
.cps-hide-wc-price .price,
.cps-hide-wc-price .woocommerce-Price-amount,
.cps-hide-wc-price p.price,
.cps-hide-wc-price span.price {
  display: none !important;
}
