/* Estilos base frontend Rifa Master */

/* Contenedor general de la barra */
.rm-container {
  max-width: 700px;
  margin: 20px auto;
  padding: 10px;
}

/* Texto fuera de la barra */
.rm-text-out {
  text-align: center;
  margin: 8px 0;
  font-weight: 600;
}

/* Caja externa de la barra (el resto se controla por inline styles) */
.rm-outer {
  width: 100%;
  box-sizing: border-box;
}

.rm-inner {
  width: 100%;
  overflow: hidden;
}

.rm-bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.rm-bar-fill span {
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Combos (grid de botones de cantidades) */
.rm-combos-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 20px auto;
}

.rm-combo-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.rm-combo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.rm-combo-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.rm-combo-info {
  padding: 10px 12px;
  text-align: center;
}

.rm-combo-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.rm-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  .rm-combos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .rm-combos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .rm-container {
    padding: 5px;
  }
}

@media (max-width: 480px) {
  .rm-combos-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================
   MANUAL [rifa_manual]
   ============================ */

.rm-manual-panel {
  max-width: 720px;
  margin: 30px auto;
  padding: 32px 24px 28px;
  background: #111827;
  border-radius: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  box-sizing: border-box;
}

.rm-manual-section {
  text-align: center;
  margin-bottom: 22px;
}

.rm-manual-label {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: #fbbf24;
}

.rm-manual-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 999px;
  background: #020617;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  font-weight: 700;
  font-size: 22px;
}

.rm-manual-pill--total {
  margin-top: 4px;
}

.rm-manual-qty {
  width: 80px;
  max-width: 100%;
  text-align: center;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  -moz-appearance: textfield;
}

.rm-manual-qty::-webkit-outer-spin-button,
.rm-manual-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rm-manual-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;
  background: #facc15;
  color: #111827;
  font-weight: 600;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.rm-manual-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
  filter: brightness(1.05);
}

.rm-manual-min-msg {
  margin-top: 18px;
  font-size: 13px;
  opacity: 0.85;
  text-align: center;
}

.rm-manual-min-msg--error {
  color: #f87171;
  font-weight: 600;
  opacity: 1;
}

/* Estado vendido en su totalidad */
.rm-manual-panel--soldout {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}

.rm-manual-soldout-text {
  margin: 10px 0 0;
}

/* Responsive */
@media (max-width: 600px) {
  .rm-manual-panel {
    padding: 22px 16px 20px;
  }

  .rm-manual-pill {
    font-size: 18px;
  }

  .rm-manual-btn {
    width: 100%;
    font-size: 16px;
  }
}

/* ===========================
   FRONTEND · RIFA MANUAL
   =========================== */

.rm-manual-wrapper {
  max-width: 900px;
  margin: 24px auto;
  padding: 12px;
  box-sizing: border-box;
}

.rm-manual-card {
  background: radial-gradient(circle at top, #111827 0, #020617 60%);
  border-radius: 26px;
  padding: 26px 20px 28px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}

/* Secciones */
.rm-manual-section {
  margin-bottom: 20px;
}

/* Etiquetas (CANTIDAD / TOTAL A PAGAR) */
.rm-manual-label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #facc15;
  margin-bottom: 10px;
}

/* Píldoras grandes (input y total) */
.rm-manual-pill {
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  background: #020617;
  border: 2px solid rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.9);
  box-sizing: border-box;
}

/* Input dentro de la píldora */
.rm-manual-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  text-align: center;
  color: inherit;              /* ← hereda el color de la píldora */
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.1em;
  padding: 12px 20px;
  box-sizing: border-box;
}

/* Total (solo texto) */
.rm-manual-total {
  width: 100%;
  text-align: center;
  color: inherit;              /* ← igual, hereda */
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 0.08em;
  padding: 10px 20px;
}

/* Botón principal */
.rm-manual-btn {
  width: 100%;
  border-radius: 999px;
  border: none;
  padding: 14px 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 14px;
  background: #facc15;
  color: #111827;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(250, 204, 21, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.rm-manual-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(250, 204, 21, 0.6);
  filter: brightness(1.05);
}

/* Mensaje de compra mínima y agotado */
.rm-manual-min {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: #e5e7eb;
}

.rm-manual-soldout {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
  .rm-manual-card {
    padding: 20px 16px 22px;
    border-radius: 22px;
  }

  .rm-manual-input,
  .rm-manual-total {
    font-size: 22px;
    letter-spacing: 0.06em;
  }

  .rm-manual-btn {
    font-size: 13px;
    letter-spacing: 0.14em;
  }
}

/* ============================
   FRONTEND · BUSCADOR [rifa_buscador]
   ============================ */

.rm-search-wrapper {
  max-width: 480px;
  margin: 24px auto;
  padding: 12px;
  box-sizing: border-box;
}

.rm-search-module {
  width: 100%;
  padding: 24px 22px 26px;
  border-radius: 24px;
  box-sizing: border-box;
}

/* Cabecera */

.rm-search-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
  text-align: center;
  width: 100%;
}

.rm-search-icon {
  font-size: 18px;
  line-height: 1;
}

.rm-search-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

/* Cuerpo (input + botón) */

.rm-search-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rm-search-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.9);
  font-size: 14px;
  box-sizing: border-box;
}

.rm-search-button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-sizing: border-box;
}

/* Resultados */

.rm-search-results {
  margin-top: 18px;
  text-align: left;
}

.rm-search-results--loading .rm-search-info {
  opacity: 0.8;
}

.rm-search-results-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  opacity: 0.95;
}

.rm-search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rm-search-card {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.7);
  background: #ffffff;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  box-sizing: border-box;
}

.rm-search-empty,
.rm-search-error,
.rm-search-info {
  font-size: 13px;
  line-height: 1.5;
}

.rm-search-empty {
  opacity: 0.85;
}

.rm-search-error {
  color: #dc2626;
  font-weight: 600;
}

/* Responsive */

@media (max-width: 480px) {
  .rm-search-wrapper {
    margin: 16px auto;
  }

  .rm-search-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}