/* ============================================================
   CORE MOBILE FIRST — MARKETPLACE LOCKER GUARDATOTAL
   App-like UI — 100% optimizado para pantallas móviles
   ============================================================ */

/* ---------- VARIABLES ----------- */
:root {
  --color-primary: #ffd43b;
  --color-primary-dark: #e6be33;
  --color-text: #222;
  --color-subtext: #6a6a6a;
  --radius: 16px;
  --max-width: 420px;
  --bg: #f2f2f2;
}

/* ---------- RESET ----------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
body {
  background: var(--bg);
  color: var(--color-text);
  width: 100%;
  min-height: 100vh;
  display: block;
}



/* ---------- CONTENEDOR PRINCIPAL ----------- */
.app {
   padding: 18px;
   padding-top: 14px;
   width: 100%;
   max-width: var(--max-width);
   margin: 0 auto;
}

/* ---------- HEADER ----------- */
.header {
  text-align: center;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 18px;
  letter-spacing: -0.2px;
}

/* ---------- PANTALLAS ----------- */
.screen {
  display: none;
  animation: fadeIn 0.25s ease;
}

.screen.active {
  display: block;
}

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

/* ---------- TARJETAS ----------- */
.card {
  background: #fff;
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}

/* ---------- TEXTOS ----------- */
.title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--color-subtext);
  margin-bottom: 10px;
}

.price {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.status-msg {
  font-size: 15px;
  margin-top: 12px;
  font-weight: 600;
  min-height: 20px;
  text-align: center;
}

/* ---------- BOTÓN ----------- */
.button {
  width: 100%;
  padding: 16px;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 600;
  color: #444;
  margin-top: 14px;
  transition: 0.2s ease;
}

.button:active {
  background: var(--color-primary-dark);
  transform: scale(0.98);
}

.button:disabled {
  opacity: 0.55;
}

/* ---------- INPUTS ----------- */
input {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid #ddd;
  margin-top: 14px;
  font-size: 16px;
  background: #fafafa;
}

input:focus {
  outline: none;
  border-color: var(--color-primary-dark);
}

/* ---------- LOADER ----------- */
.loader {
  display: none;
  margin: 16px auto 10px;
  border: 4px solid rgba(0,0,0,0.12);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* ---------- CÓDIGO DE CONFIRMACIÓN ----------- */
#codigoLocker {
  font-size: 44px;
  font-weight: 800;
  margin: 18px 0;
  letter-spacing: 3px;
}
/* Ajuste visual para pantallas muy altas */
@media screen and (min-height: 750px) {
  .screen.active {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
  }
}
/* ===========================================
   BOTONES UNIVERSALES PARA <a> Y <button>
=========================================== */

a.button, a.btn {
  display: block;
  width: 100%;
  max-width: 300px;
  padding: 14px;
  background: var(--color-primary);
  color: #444 !important;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius);
  text-decoration: none;
  margin: 10px auto 0 auto;
}

a.button.secondary, a.btn.secondary {
  background: #eaeaea;
  color: #444 !important;
}

.button.secondary,
.btn.secondary {
  background: #eaeaea;
  color: #444 !important;
}

.spinner-mini {
    border: 3px solid #ffffff80;
    border-top: 3px solid white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    display: inline-block;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}
/* Botón que debe desvanecerse en la pantalla final */
.button-fade {
    opacity: 0.35;
    pointer-events: none;
}
