/* moved to frontend folder */
/* ===============================
   Sunday-style Clone (mobile-first)
   File: sunday-clone.css
   =============================== */

/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* CSS Variables */
:root{
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b6b6b;
  --muted-2: #9b9b9b;
  --line: #e9e9ec;
  --soft: #f3f3f6;
  --soft-2:#f6f6f7;
  --black: #000000;
  /* --brown: #8b5cf6; */
  --brown: #b87a56;
  --accent: #111111;
  --success: #19c37d;
  --danger: #ff4d4f;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.06);
  --shadow-2: 0 8px 30px rgba(0,0,0,.06);
  --container-w: 430px; /* look “mobile in desktop” */
  --easing: cubic-bezier(.22,.6,.3,1);
  --btn-font-size: 16px;
}

/* Reset moderno */
*{ box-sizing: border-box; }
html,body{ height:100%; }
html{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
body{
  margin:0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Ensure native controls inherit font */
button, input, select, textarea{ font-family: inherit; }

/* Contenedor estilo “app móvil centrada” */
.app{
  max-width: var(--container-w);
  margin: 0 auto;
  min-height: 100dvh;
  display:flex;
  flex-direction: column;
  position:relative;
  background: var(--bg);
  padding-bottom: calc(70px + env(safe-area-inset-bottom,0));
}

/* Header muy simple (icono share y menu redondo) */
.app > .header{
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  padding: 0;
  z-index: 3;
  pointer-events: none; /* evita bloquear scroll; los botones reactivan eventos */
}
.header .icon-btn{
  width: 40px; height: 40px; border-radius: 999px; font-size: var(--btn-font-size); color: var(--brown);
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
  display:inline-flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow-1);
  border:1px solid rgba(0,0,0,.06);
  pointer-events: auto; /* clickeables encima de la imagen */
}
.header .row{
  display:flex; gap:10px; justify-content: space-between; align-items:center;
}

/* Hero con foto */
.hero{
  padding: 12px 16px 0;
}
.hero .photo{
  width:100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  object-fit: cover;
  display:block;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--line);
  background: #ddd;
  overflow:hidden;
  position:relative;
  opacity: 0;
  animation: fade-in-up .6s var(--easing) .05s both;
}

/* Badge/logo circular centrado */
.hero .badge{
  width: 92px; height:92px;
  border-radius:999px;
  background: #fff9d9; /* amarillito suave */
  border:1px solid #ece7bf;
  display:flex; align-items:center; justify-content:center;
  font-weight: 600;
  letter-spacing:.06em;
  position: relative;
  margin: -46px auto 8px; /* queda sobre la foto, centrado */
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  opacity: 0;
  animation: fade-in-up .6s var(--easing) .18s both;
}

/* Texto/indicaciones */
.subtle{
  text-align:center;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 6px;
}

/* Rating con estrellas (estilo gris) */
.rating{
  display:flex; justify-content:center; gap:18px; margin: 6px 0 10px;
}
.rating .star{
  width: 40px; height: 40px;
  display:inline-block;
  /* Estrella via mask (soporta Safari/Chrome/Edge/FF recientes) */
  background: #cfcfd4;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/></svg>") center/contain no-repeat;
  opacity:.9;
}
.rating .hint{
  display:flex; justify-content:space-between; color:var(--muted); font-size:13px;
  max-width: 260px; margin: 6px auto 0;
}

.menu-section{
  padding: 18px 20px 12px;
}
body.cart-has-items .menu-section{
  padding-bottom: calc(100px + env(safe-area-inset-bottom,0));
}
.menu-hero h2{
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
}
.menu-hero p{
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.menu-categories{
  display:flex;
  flex-direction:column;
  gap: 18px;
  margin-top: 18px;
}
.menu-loading{
  padding: 18px;
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--muted);
  text-align:center;
  font-size: 15px;
}
.menu-error{
  padding: 18px;
  border-radius: var(--radius);
  border:1px dashed var(--line);
  background: var(--soft-2);
  text-align:center;
  color: var(--muted);
  font-size: 14px;
}
.menu-retry{
  margin-top: 12px;
  border:0;
  background: var(--text);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight:600;
  cursor:pointer;
}
.menu-group{
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.menu-group-header h3{
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}
.menu-group-header p{
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.menu-group-items{
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.menu-card{
  position: relative;
  display:flex;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  border:1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow-1);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.menu-card--highlighted{
  background: var(--brown);
  border-color: rgba(0,0,0,.12);
  box-shadow: 0 8px 26px rgba(0,0,0,.12);
}
.menu-card--highlighted .menu-card-name,
.menu-card--highlighted .menu-card-price{
  color: #fff;
}
.menu-card--highlighted .menu-tag{
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.4);
  color: #fff;
}
.menu-card--highlighted .menu-add{
  background: #fff;
  color: var(--brown);
  border-color: #fff;
}
.menu-card--highlighted .menu-card-desc{
  color: rgba(255,255,255,.9);
}
.menu-card--no-image .menu-card-clickable{
  align-items: center;
}
.menu-card-tags{
  position: absolute;
  top: 14px;
  right: 14px;
  pointer-events: none;
}
.menu-card-tags .menu-tags{
  justify-content: flex-end;
}
.menu-card-clickable{
  flex: 1;
  display: flex;
  gap: 14px;
  min-width: 0;
  cursor: pointer;
}
.menu-card-active{
  border-color: rgba(184, 122, 86, .4);
  box-shadow: 0 6px 24px rgba(184, 122, 86, .12);
}
.menu-card-media{
  width: 96px;
  min-width:96px;
  aspect-ratio: 4/5;
  border-radius: 16px;
  background: #f0f0f2 center/cover no-repeat;
}
.menu-card-media.fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--muted);
  font-size: 13px;
}
.menu-card-body{
  flex:1;
  display:flex;
  flex-direction:column;
  gap: 8px;
  /* Allow content to shrink in flex row so actions don't overflow */
  min-width: 0;
}
.menu-card-header{
  min-width: 0;
}
.menu-card-name{
  margin:0;
  font-size: 17px;
  font-weight:600;
  line-height:1.2;
  flex: 1;
  min-width: 0;
}
.menu-card-price{
  font-size: 15px;
  font-weight:600;
  margin-top: 4px;
}
.menu-card-desc{
  margin:0;
  color: var(--muted);
  font-size: 14px;
  line-height:1.45;
}
.menu-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.menu-tag{
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  border:1px solid var(--line);
  color: var(--muted);
}
.menu-card-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-top:auto;
}
.menu-add{
  border:1px solid var(--text);
  background:var(--text);
  color:#fff;
  border-radius:999px;
  width: 106px;
  height: 38px;
  padding: 0;
  font-size: 14px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s var(--easing), transform .15s ease, box-shadow .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,.2), 0 4px 12px rgba(0,0,0,.12);
}
.menu-add:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,.2), 0 6px 16px rgba(0,0,0,.14);
}
.menu-add:active{
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.menu-qty{
  display:flex;
  align-items:center;
  gap:8px;
  background: var(--soft);
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  box-shadow: 0 2px 4px rgba(0,0,0,.06), 0 4px 8px rgba(0,0,0,.04);
}
.menu-qty-btn{
  width:26px;
  height:26px;
  border-radius:50%;
  border:0;
  background: #fff;
  font-size:16px;
  cursor:pointer;
  color: var(--brown);
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;
}
.menu-qty-btn:hover{
  box-shadow: 0 3px 6px rgba(0,0,0,.1);
}
.menu-qty-btn:active{
  transform: scale(.96);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.menu-qty-value{
  min-width:18px;
  text-align:center;
  font-weight:600;
  font-size:14px;
}
.menu-card.loading{
  opacity:.6;
  pointer-events:none;
}

.order-summary{
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(76px + env(safe-area-inset-bottom,0));
  margin: 12px 20px;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  max-width: calc(var(--container-w) - 40px);
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--text);
  color: #fff;
  display:none;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  z-index: 4;
  cursor: pointer;
}
.order-summary.visible{
  display:flex;
}
.order-summary-label{
  font-size: 13px;
  font-weight:500;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.order-summary-btn{
  border:0;
  background:#fff;
  color: var(--text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight:600;
  cursor:pointer;
  box-shadow: var(--shadow-1);
  flex-shrink: 0;
}
.order-summary-btn:focus{
  outline: 2px solid rgba(255,255,255,.4);
}


/* Bloque de cuenta (“Left to pay”) */
/* Cart sheet */
.cart-sheet .content{ padding: 16px; }
.cart-empty{ text-align: center; color: var(--muted); padding: 24px 0; font-size: 15px; }
.cart-items{ display: flex; flex-direction: column; gap: 12px; }
.cart-item{
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
}
.cart-item-name{ font-size: 15px; font-weight: 600; }
.cart-item-price{ font-size: 14px; color: var(--muted); }
.cart-item-qty{
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--soft);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.cart-item-qty-btn{
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  box-shadow: var(--shadow-1);
  font-size: 16px;
  cursor: pointer;
  color: var(--brown);
}
.cart-item-qty-value{ min-width: 18px; text-align: center; font-weight: 600; font-size: 14px; }
.cart-clear{ margin-top: 8px; font-size: 14px; color: var(--muted); padding: 10px 0; }
.cart-clear:hover{ color: var(--danger); }
.cart-summary{ padding: 16px; border-top: 1px solid var(--line); }
.cart-total-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.cart-total-label{ font-size: 16px; font-weight: 700; }
.cart-total-value{ font-size: 22px; font-weight: 800; }

/* Product detail sheet */
.product-sheet .content{ padding: 0; }
.product-detail{
  display: flex;
  flex-direction: column;
}
.product-detail--no-image .product-detail-body{
  padding-top: 20px;
}
.product-detail-media{
  width: 100%;
  aspect-ratio: 16/9;
  background: #f0f0f2 center/cover no-repeat;
  border-radius: 14px;
}
.product-detail-media.fallback{
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}
.product-detail-body{
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-detail-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.product-detail-name{
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.product-detail-price{
  font-size: 18px;
  font-weight: 700;
}
.product-detail-desc{
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
.product-detail-actions{
  margin-top: 8px;
  display: flex;
  justify-content: center;
}
.product-detail-actions .menu-add{
  width: 100%;
}
.product-detail-actions .menu-qty{
  align-self: center;
}

.section{
  padding: 18px 20px;
}
.kicker{
  color: var(--muted); font-size: 14px; margin-bottom: 2px;
}
.h2{
  font-size: 26px; font-weight: 700; margin: 0 0 10px;
}

/* Progress */
.progress{
  height: 8px;
  background: #efeff1;
  border-radius: 999px;
  overflow:hidden;
  margin: 6px 0 16px;
}
.progress .bar{
  height:100%; width:55%; /* ajustá según lo que falte */
  background: var(--brown);
  border-radius: inherit;
}

/* Lista de ítems */
.bill{
  display:flex; flex-direction:column; gap: 10px;
}
.bill .row{
  display:grid; grid-template-columns: auto 1fr auto; gap: 10px;
  align-items:center; padding: 12px 10px; border-radius: 12px;
}
.bill .row-order{
  background: #fff7f0;
  border:1px solid rgba(184, 122, 86, .25);
}
.bill .qty{
  min-width: 30px; height: 26px; border-radius: 8px;
  background: var(--soft);
  display:flex; align-items:center; justify-content:center;
  font-size: 13px; color: var(--text);
  border:1px solid var(--line);
}
.bill .name{
  font-size: 15px; color: var(--text);
}
.bill .price{
  font-size: 15px; color: var(--text); font-weight: 500;
}

/* Botones */
.btn{
  appearance:none; border:0; cursor:pointer; font-weight:600;
  padding: 16px 20px; border-radius: 999px; width:100%;
  transition: transform .06s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: var(--black); color:#fff; box-shadow: var(--shadow-2); font-size: 18px; font-weight: 700;
}
.btn-secondary{
  background: #e9e9ec; color:#222; font-size: 16px; font-weight: 700;
}
.btn-ghost{
  background: transparent; color: var(--text);
}

/* Estado de selección en sheet */
.guest-card .item .plus.selected{
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}


/* Separadores y grillas */
.divider{ height:1px; background: var(--line); margin: 8px 0; }
.stack-8 > * + *{ margin-top: 8px; }
.stack-12 > * + *{ margin-top: 12px; }

/* Footer sticky (tab bar) */
.tabbar{
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--container-w);
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px 16px calc(env(safe-area-inset-bottom,0) + 10px);
  z-index: 5;
}
.tabbar .tabs{
  display:flex; justify-content: space-between; align-items:center;
  max-width: var(--container-w); margin: 0 auto;
}
.tabbar .tab{
  display:flex; flex-direction:column; align-items:center;
  font-size: 12px; color: var(--muted); gap: 6px; text-decoration:none;
}
.tabbar .tab .icon{
  display:inline-flex; align-items:center; justify-content:center;
  width: 24px; height: 24px; line-height: 1;
  font-size: 20px;
  transform: scale(1);
  transition: transform .25s var(--easing), filter .2s ease, opacity .2s ease;
  opacity: .95;
}
.tabbar .tab .dot{
  width:8px; height:8px; border-radius:999px; background: #cfcfd4;
  transform: scale(1);
  transition: transform .25s var(--easing), background-color .2s ease;
}
.tabbar .tab.active{ color: var(--text); }
.tabbar .tab.active .icon{ transform: scale(1.1); opacity: 1; }
.tabbar .tab.active .dot{ background: var(--success); transform: scale(1.15); }

/* Panel “Split the bill” como sheet */
.sheet-backdrop{
  position: fixed; inset:0; background: rgba(0,0,0,.45);
  opacity: 0; pointer-events: none;
  transition: opacity .24s ease;
  z-index: 40;
}
.sheet-backdrop.open{ opacity: 1; pointer-events: auto; }
.sheet{
  position: fixed;
  left: 50%; transform: translateX(-50%) translateY(100%);
  bottom: 0; width: 100%; max-width: var(--container-w);
  background: #fff; border-top-left-radius: var(--radius-xl); border-top-right-radius: var(--radius-xl);
  box-shadow: 0 -12px 30px rgba(0,0,0,.15);
  max-height: 86dvh; overflow: hidden; display:flex; flex-direction:column;
  transition: transform .32s var(--easing);
  z-index: 50; /* por encima del header absoluto */
}
.sheet.open{ transform: translateX(-50%) translateY(0); }
.sheet .handle{
  width: 40px; height: 5px; background: var(--line); border-radius:999px;
  margin: 10px auto;
}
.sheet .header{
  display:flex; align-items:center; justify-content: space-between;
  padding: 8px 18px; border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.sheet .title{ font-size: 16px; }
.sheet .close, .sheet .back{
  width: 36px; height:36px; border-radius:999px; background: var(--soft); font-size: var(--btn-font-size); color: var(--brown);
  display:flex; align-items:center; justify-content:center; border:1px solid var(--line);
}
.sheet .content{
  padding: 16px; background: var(--soft-2);
  overflow: auto; flex: 1 1 auto; min-height: 0; /* permite scroll dentro del flex container */
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
}

/* Panel transitions inside sheet */
.panel{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .24s var(--easing), transform .32s var(--easing);
}
.panel.active{ opacity: 1; transform: translateY(0); }

/* Guest cards */
.guest-card{
  background: #fff; border:1px solid var(--line); border-radius: 18px;
  padding: 12px; box-shadow: var(--shadow-1); margin-bottom: 12px;
}
.guest-card.from-order{
  border-color: rgba(184, 122, 86, .35);
  box-shadow: 0 6px 20px rgba(184, 122, 86, .12);
}
.guest-card .title{
  border:0; padding: 6px 4px 10px 4px; font-weight: 600; color: var(--text);
  display:flex; align-items:center; justify-content: space-between;
}
.guest-card .title .chip{
  margin-left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1e1;
  color: var(--brown);
  border:1px solid rgba(184, 122, 86, .3);
}
/* Make the header action button look like item plus buttons */
.guest-card .title .plus{
  width: 32px; height:32px; border-radius:999px; background:#fff; color: var(--brown);
  border:1px solid var(--line); display:flex; align-items:center; justify-content:center; font-size: var(--btn-font-size);
  font-weight:700; cursor:pointer;
}
.guest-card .title .plus.selected{
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}
.guest-card .item{
  display:grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items:center;
  padding: 10px; border-radius: 12px; background: var(--soft);
  border:1px solid var(--line); margin-top:8px;
}
.guest-card .item .plus{
  width: 32px; height:32px; border-radius:999px; background:#fff; color: var(--brown);
  border:1px solid var(--line); display:flex; align-items:center; justify-content:center; font-size: var(--btn-font-size);
  font-weight:700;
}

/* Total + acciones */
.sheet .summary{
  padding: 14px 16px; background:#fff; border-top:1px solid var(--line);
  opacity: 0; transform: translateY(8px);
  transition: opacity .24s var(--easing), transform .28s var(--easing);
}
.sheet .summary.active{ opacity: 1; transform: translateY(0); }

/* Tip panel */
.tip-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.tip-btn{
  padding: 18px 14px; border-radius: 16px; border:1px solid var(--line);
  background:#fff; color: var(--brown); font-weight: 700; font-size: 20px; line-height: 1;
  min-height: 72px; display:flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow-1);
}
.tip-btn.active{ background:#efeff2; color: var(--text); border-color: var(--line); box-shadow: inset 0 0 0 1px #e1e1e6; }
/* Also style via ARIA pressed state to ensure persistence */
.tip-btn[aria-pressed="true"]{ background:#efeff2; color: var(--text); border-color: var(--line); box-shadow: inset 0 0 0 1px #e1e1e6; }
.tip-custom{ margin-top: 8px; }
.btn-custom-tip{ width:100%; margin-top: 4px; }
.actions{
  display:flex; gap: 12px;
}
.actions .btn{ width: 50%; }
.actions .btn-secondary{ background: #efeff2; }

/* Footer tip: full-width confirm */
#footer-tip .actions .btn{ width: 100%; }

/* When only one action is visible, make it full-width */
.actions.single .btn{ width: 100%; }

/* Tip/Total simple lines (no boxes) */
.tip-summary{ display:grid; gap: 8px; }
.tip-line{
  display:flex; flex-direction: column; align-items:center; text-align:center;
  padding: 0; margin: 2px 0;
}
.tip-label{
  color: var(--muted-2);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
}
.total-label{
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
}
.tip-line .tip-value{
  color: var(--muted-2);
  font-size: 18px;
  font-weight: 600;
}
.tip-line.total .tip-value{
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
}

/* Equal split visuals */
.equal-visual{ position: relative; width: 220px; height: 220px; margin: 8px auto 4px; }
.equal-ring{ display:block; width: 220px; height: 220px; transform: rotate(-90deg); }
.ring-track{ fill:none; stroke: #e7e7ea; stroke-width: 10; }
.ring-progress{ fill:none; stroke:#bcbcc2; stroke-width:10; stroke-linecap:butt; }
.ring-fg{ fill:none; stroke: #111; stroke-width: 10; stroke-linecap: butt; }
.equal-center{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.equal-amount{ font-size: 28px; font-weight: 800; }

.equal-row{ display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap: 10px; max-width: 320px; margin: 4px auto; }
.stepper{ justify-self:center; width: 160px; display:inline-flex; align-items:center; justify-content:space-between; background:#fff; border:1px solid var(--line); padding: 6px 10px; border-radius: 999px; box-shadow: var(--shadow-1); }
.stepper .step{ width: 28px; height: 28px; border-radius:999px; border:1px solid var(--line); background:#efeff2; font-weight: 800; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.stepper .value{ min-width: 22px; text-align:center; font-weight: 700; }
.equal-pay{ max-width: 320px; margin: 8px auto 0; }
.equal-pay-row{ display:flex; align-items: baseline; justify-content: space-between; }
.equal-pay-label{ font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.equal-pay-amount{ font-size: 30px; font-weight: 900; letter-spacing: .01em; }

/* Etiquetas y microcopys */
.small{ font-size: 12px; color: var(--muted); }
.muted{ color: var(--muted); }
.strike{ text-decoration: line-through; color: var(--muted-2); }

/* Post-payment review */
.review-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255,255,255,.96);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.review-overlay.open{
  opacity: 1;
  pointer-events: auto;
}
.review-card{
  width: 100%;
  height: 100%;
  background: #fff;
  color: #111;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: clamp(28px, 6vh, 48px) clamp(22px, 4vw, 44px) clamp(32px, 10vh, 64px);
}
.review-skip{
  position: absolute;
  top: clamp(18px, 4vh, 36px);
  right: clamp(18px, 4vw, 36px);
  background: rgba(245,245,247,.08);
  border: 1px solid rgba(0,0,0,.06);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  color: rgba(17,17,17,.75);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 18px;
  transition: background .2s ease, color .2s ease;
}
.review-skip:hover{
  background: rgba(0,0,0,.06);
  color: #111;
}
.review-headline{
  margin-top: clamp(54px, 10vh, 80px);
  margin-bottom: clamp(24px, 6vh, 48px);
  max-width: 520px;
}
.review-title{
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  color: #111;
  letter-spacing: -.01em;
}
.review-subtitle{
  margin: 12px 0 0;
  color: rgba(17,17,17,.6);
  font-size: clamp(16px, 2.2vw, 19px);
}
.review-items{
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: clamp(18px, 4vh, 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 3vh, 24px);
}
.review-questions{
  margin-bottom: clamp(18px, 4vh, 32px);
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vh, 24px);
}
.review-question{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-question-title{
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  color: #111;
}
.review-question-helper{
  font-size: 14px;
  color: rgba(17,17,17,.6);
  max-width: 520px;
}
.review-item{
  padding-bottom: clamp(10px, 1.8vh, 16px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.review-item:last-child{ border-bottom: none; padding-bottom: 0; }
.review-item-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.review-item-name{
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 700;
  color: #111;
}
.review-item-note,
.review-item-meta{
  font-size: 14px;
  color: rgba(17,17,17,.6);
}
.review-item-meta{
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}
.review-item-qty{
  font-weight: 600;
}
.review-item-price{
  font-weight: 700;
  color: #111;
}
.review-stars{
  /* Ensure five stars always fit within the viewport */
  --star-gap: clamp(5px, 1.8vw, 10px);
  --side-pad: clamp(22px, 4vw, 44px); /* matches .review-card horizontal padding */
  --star-size: clamp(40px,
    calc((100vw - (var(--side-pad) * 2) - (var(--star-gap) * 4)) / 5),
    108px);
  display: flex;
  gap: var(--star-gap);
  width: 100%;
  justify-content: center;
}
.review-star{
  width: var(--star-size);
  height: var(--star-size);
  flex: 0 0 var(--star-size);
  border: none;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  color: rgba(0,0,0,.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--star-size) * 0.72);
  transition: color .2s ease, transform .12s ease, background .2s ease;
  line-height: 1;
}
.review-star::before{
  content: '★';
}
.review-star.is-filled{
  color: var(--brown);
  text-shadow: 0 4px 16px rgba(184,122,86,.35);
}
.review-star:focus-visible{
  outline: 2px solid rgba(0,0,0,.35);
  outline-offset: 6px;
}
.review-star:active{
  transform: scale(.9);
}
.review-submit{
  margin-top: auto;
  width: 100%;
  max-width: 420px;
  align-self: center;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  border-radius: 999px;
  padding: 18px 22px;
  border: none;
  box-shadow: 0 18px 32px rgba(0,0,0,.16);
}
.review-submit:disabled{
  background: rgba(0,0,0,.12);
  color: rgba(255,255,255,.5);
  box-shadow: none;
}
.review-empty{
  min-height: 100vh;
  background: linear-gradient(140deg, #fff7f1 0%, #ffffff 55%, #f7f4ff 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 48px 24px;
  color: #111;
}
.review-empty-title{
  font-size: 28px;
  font-weight: 800;
}
.review-empty-copy{
  max-width: 320px;
  font-size: 16px;
  color: rgba(17,17,17,.65);
}
.review-empty-btn{
  max-width: 200px;
}
@media (max-width: 720px){
  .review-card{
    padding: 28px 20px 42px;
  }
  .review-item-header{
    flex-direction: column;
    align-items: flex-start;
  }
  .review-item-meta{
    text-align: left;
    flex-direction: row;
    gap: 12px;
  }
  .review-stars{
    /* keep star-size calculation in sync on small screens */
    --side-pad: 20px; /* matches .review-card horizontal padding in this breakpoint */
    --star-gap: 14px;
    gap: var(--star-gap);
  }
}

/* Utilidades */
.center{ text-align:center; }
.px-16{ padding-left:16px; padding-right:16px; }
.mt-4{ margin-top:4px; } .mt-8{ margin-top:8px; } .mt-12{ margin-top:12px; }
.mt-16{ margin-top:16px; } .mt-20{ margin-top:20px; } .mt-24{ margin-top:24px; }
.mb-8{ margin-bottom:8px; } .mb-12{ margin-bottom:12px; } .mb-16{ margin-bottom:16px; }
.round-xl{ border-radius: var(--radius-xl); }
.hidden{ display:none !important; }

/* Closed table panel */
.closed-panel{
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background: #6d4c41; /* brown */
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.closed-panel .closed-title{
  font-weight: 800;
  margin-bottom: 2px;
}
.closed-panel .closed-sub{
  opacity: .95;
}

/* Animations */
@keyframes fade-in-up{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1; transform: translateY(0); }
} 

/* Intro typing overlay */
.intro-overlay{
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000;
}
.intro-center{ text-align: center; }
.intro-type{
  font-size: 42px; font-weight: 900; letter-spacing: 0.08em;
  display: inline-block; position: relative;
  overflow: hidden; white-space: nowrap;
  width: 0ch;
  animation: typing 1.7s steps(4, end) forwards;
}
/* Separate caret to avoid overlapping glyphs */
.intro-type::after{
  content: '';
  position: absolute; right: 0; top: 0;
  width: 0.12em; height: 1em; background: var(--text);
  animation: caret-blink 0.8s step-end infinite;
}
@keyframes typing{ from{ width: 0ch; } to{ width: 4.55ch; } }
@keyframes blink{ 50%{ border-color: transparent; } }
@keyframes caret-blink{ 50%{ opacity: 0; } }

/* Fade out helper for intro */
.intro-overlay.fade{ opacity: 0; transition: opacity .35s var(--easing); pointer-events: none; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{ animation: none !important; transition: none !important; }
}

/* Tipografía escalas */
h1,h2,h3,h4,h5,p{ margin:0; }
h1{ font-size: 28px; font-weight:700; }
h2{ font-size: 22px; font-weight:700; }
h3{ font-size: 18px; font-weight:600; }
p{ font-size: 15px; color: var(--text); }

/* Links “neutros” */
a{ color: inherit; text-decoration: none; }
a.underline{ text-decoration: underline; }

/* Estado hover (desktop preview) */
@media (hover:hover){
  .btn-primary:hover{ opacity:.92; }
  .btn-secondary:hover{ filter: brightness(0.98); }
  .guest-card .item .plus:hover{ background:#fafafa; }
}

/* Loading overlay */
.loading-overlay{ position: fixed; inset:0; background: rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; z-index: 1000; opacity:0; transition: opacity .2s ease; pointer-events: none; }
.loading-overlay.open{ opacity:1; pointer-events:auto; }
.loading-box{ background:#fff; border:1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-2); display:flex; gap:12px; align-items:center; }
.spinner{ width: 28px; height: 28px; border-radius:50%; border:3px solid #e6e6ea; border-top-color: var(--black); animation: spin 1s linear infinite; }
.loading-text{ font-weight: 700; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* Strong selected state for tip buttons (ensures persistence) */
.tip-grid .tip-btn.active,
.tip-grid .tip-btn[aria-pressed="true"]{
  background:#efeff2 !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
  box-shadow: inset 0 0 0 1px #e1e1e6 !important;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  pointer-events: none;
  z-index: 1000;
}

.toast {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  max-width: 90%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  background: #10b981;
  color: #fff;
}

.toast-error .toast-icon {
  background: #ef4444;
  color: #fff;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* Modo oscuro opcional (si querés testear) */
/* @media (prefers-color-scheme: dark){
  :root{
    --bg:#0e0e10; --text:#f3f4f6; --muted:#b5b7bd; --line:#2a2a2e;
    --soft:#151518; --soft-2:#101012; --black:#fff; --accent:#fff;
  }
  .header .icon-btn{ background: rgba(30,30,32,.6); border-color: #242428; }
  .tabbar{ background:#0f0f12; }
} */
