/* TN App Bridge — estilos visibles SOLO cuando el sitio corre dentro de Capacitor.
   Se activa via clase .tn-in-app en <html> (puesta por bridge.js). */

html.tn-in-app body {
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Esconder elementos que no aplican dentro de la app */
html.tn-in-app .tn-hide-in-app {
  display: none !important;
}

/* Bottom nav */
.tn-bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: #0a0a0a;
  border-top: 1px solid rgba(57, 255, 20, 0.18);
  display: flex;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.5);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tn-bottom-nav__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none !important;
  cursor: pointer;
  padding: 6px 4px;
  position: relative;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.tn-bottom-nav__item:active {
  background: rgba(57, 255, 20, 0.08);
}
.tn-bottom-nav__item.is-active {
  color: #39FF14;
}
.tn-bottom-nav__item.is-active::before {
  content: "";
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 3px;
  background: #39FF14;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.6);
}
.tn-bottom-nav__icon {
  width: 24px;
  height: 24px;
  display: block;
}
.tn-bottom-nav__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tn-bottom-nav__label {
  line-height: 1;
}

.tn-bottom-nav__badge {
  position: absolute;
  top: 6px;
  right: 26%;
  min-width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* Cuando estamos en la app, las barras fijas inferiores del sitio
   se desplazan hacia arriba para no quedar tapadas por la bottom nav.
   El JS marca esos elementos con .tn-fixed-shifted. */
html.tn-in-app .tn-fixed-shifted {
  bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
}

/* ====================================================================
   Página /mis-pedidos/ — diseño minimalista tipo Uber Eats
   Wrapper inline (NO fullscreen) — convive con el header del tema
   arriba y el bottom nav abajo. Solo pinta el contenido limpio.
   ==================================================================== */
body.page-mis-pedidos {
  background: #fff !important;
}
.tn-mp-fullscreen {
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  color: #111;
  max-width: 760px;
  margin: 0 auto;
}
.tn-mp-header {
  padding: 28px 22px 16px;
  background: #fff;
}
.tn-mp-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #000;
  margin: 0 0 4px;
  letter-spacing: -0.6px;
  line-height: 1.1;
}
.tn-mp-header .sub {
  color: #6b7280;
  font-size: 14px;
  font-weight: 400;
}

.tn-mp-section { padding: 0 22px; }
.tn-mp-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #9ca3af;
  margin: 24px 0 10px;
  background: transparent;
  border: none;
  padding: 0;
}

.tn-mp-card {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  text-decoration: none !important;
  color: #111 !important;
  transition: transform .12s ease, border-color .12s ease;
}
.tn-mp-card:active { transform: scale(0.985); }
.tn-mp-card.is-active {
  border: 2px solid #000;
  padding: 17px;
}
.tn-mp-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tn-mp-card__id {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}
.tn-mp-card__status {
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tn-mp-status-active  { background: #000;     color: #fff; }
.tn-mp-status-pending { background: #fef3c7;  color: #92400e; }
.tn-mp-status-done    { background: #f3f4f6;  color: #374151; }
.tn-mp-status-cancel  { background: #fee2e2;  color: #991b1b; }

.tn-mp-card__total {
  font-size: 24px;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.5px;
  margin: 0 0 2px;
}
.tn-mp-card__date {
  font-size: 13px;
  color: #6b7280;
  font-weight: 400;
}
.tn-mp-card__action {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #000;
  font-size: 14px;
  font-weight: 600;
}
.tn-mp-card__action svg {
  width: 18px; height: 18px;
  stroke: #000; fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tn-mp-empty {
  text-align: center;
  padding: 80px 28px 40px;
}
.tn-mp-empty__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tn-mp-empty__icon svg {
  width: 34px; height: 34px;
  stroke: #9ca3af; fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tn-mp-empty__title {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.tn-mp-empty__text {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 28px;
  line-height: 1.5;
}
.tn-mp-empty__btn {
  display: inline-block;
  background: #000;
  color: #fff !important;
  padding: 14px 36px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none !important;
  letter-spacing: 0.2px;
}

.tn-mp-loading {
  text-align: center;
  padding: 100px 20px;
}
.tn-mp-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #000;
  border-radius: 50%;
  animation: tn-mp-spin 0.7s linear infinite;
  margin: 0 auto;
}
@keyframes tn-mp-spin { to { transform: rotate(360deg); } }

/* En la página /mis-pedidos/ esconder el carrito flotante lateral
   (ícono del costado del plugin mini-ajax-woo-cart) */
body.page-mis-pedidos [class*="majc-cart-item-wrap"],
body.page-mis-pedidos .majc-cart-icon-wrap,
body.page-mis-pedidos .majc-toggle-open-btn,
body.page-mis-pedidos .majc-cart-button-wrap,
body.page-mis-pedidos [id*="majc-cart-button"] {
  display: none !important;
}
