/* --------------------------------------------------
   POPSICLE HUB — iPad Kiosk Stylesheet
-------------------------------------------------- */

:root {
  --bg: #F8F5BB;
  --accent: #FA374A;
  --muted: #6C6C6C;
  --card: #ffffffee;
  --radius: 18px;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  user-select: none;
}

/* Confetti canvas */
#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  display:none;
}

/* -------- APP LAYOUT -------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px calc(40px + env(safe-area-inset-bottom));
  gap: 16px;
}

/* -------- TOP HEADER AREA -------- */
.hub-top {
  width: 100%;
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: env(safe-area-inset-top);
}

.hub-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hub-logo {
  height: 60px;
  object-fit: contain;
}

.brand-logo-red {
  display: block;
  width: 190px;
  height: 60px;
  flex: 0 0 auto;
  background-color: #fa374a;
  -webkit-mask: url("https://popsiclenails.com/cdn/shop/files/logot.png?v=1755872553&width=500") center / contain no-repeat;
  mask: url("https://popsiclenails.com/cdn/shop/files/logot.png?v=1755872553&width=500") center / contain no-repeat;
}

.help-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.help-btn-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  cursor: pointer;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 13px;
}

.help-btn-inline svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
}

.help-text {
  opacity: 0;
  margin: 0;
  font-family: "Fira Sans", system-ui, sans-serif;
  font-size: 12px;
  color: #C02A39;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
}

.help-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------- ROLLER TEXT -------- */
.hub-roller {
  height: 34px;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  border-radius: 999px;
  background: rgba(250,55,74,0.08);
  border: 1px solid rgba(250,55,74,0.12);
  font-size: 15px;
  color: #382a2b;
  position: relative;
  display: flex;
  align-items: center;
}

.hub-roller span {
  position: absolute;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  animation: roll 9s linear infinite;
}

.hub-roller span:nth-child(1) { animation-delay: 0s; }
.hub-roller span:nth-child(2) { animation-delay: 3s; }
.hub-roller span:nth-child(3) { animation-delay: 6s; }

@keyframes roll {
  0% { opacity: 0; transform: translateY(12px); }
  5% { opacity: 1; transform: translateY(0); }
  28% { opacity: 1; transform: translateY(0); }
  33% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 0; }
}

/* -------- MAIN GRID -------- */
main {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 950px) {
  main { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 110px;
  display: flex;
  justify-content: center;
  border: 1px solid rgba(0,0,0,0.02);
  box-shadow: 0 10px 24px rgba(0,0,0,0.04);
}

/* -------- BUTTONS -------- */
.button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.button:active {
  transform: scale(0.985);
}

.btn-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent);
}

.btn-content h3 {
  margin: 0;
  text-align: left;
  font-size: 17px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  color: #1e1e1e;
}

.btn-content p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  font-family: "Fira Sans", system-ui, sans-serif;
}

/* -------- INFO STRIP -------- */
.info-strip {
  width: 100%;
  max-width: 920px;
  background: rgba(255,255,255,0.55);
  border-radius: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.time-label {
  font-size: 11.5px;
  color: #7a6a6b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "Fira Sans", system-ui, sans-serif;
}

.time-value {
  font-size: 16px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
}

.weather-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(250,55,74,0.12);
  border-radius: 16px;
  padding: 6px 12px;
}

.weather-icon {
  width: 30px;
  height: 30px;
  border-radius: 14px;
  background: rgba(255,255,255,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

.weather-temp {
  font-size: 14px;
  font-weight: 600;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
}

.weather-meta {
  font-size: 11.5px;
  color: var(--muted);
  font-family: "Fira Sans", system-ui, sans-serif;
}

/* -------- FOOTER -------- */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 16px calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(249,246,203,0) 0%, rgba(249,246,203,1) 40%);
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* -------- FULLSCREEN VIEWER -------- */
.viewer {
  position: fixed;
  inset: 0;
  background: #F8F5BB;
  display: none;
  flex-direction: column;
  z-index: 50;
}

.viewer.active {
  display: flex;
}

.viewer-topbar {
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(249,246,203,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(250,55,74,0.2);
}

.viewer-back {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  cursor: pointer;
}

.viewer-body {
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: #F8F5BB;
}

.viewer-body iframe {
  width: 100%;
  height: calc(100vh - 90px);
  border: none;
  border-radius: 14px;
}

#viewerTitle {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.1rem;      /* adjust as needed */
  font-weight: 200;       /* adjust as needed */
}


/* -------- CAMERA UI -------- */
#cameraView {
  width: 100%;
  height: 38vh;
  min-height: 300px;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cameraView video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capture-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 10px;
  background: rgba(249,246,203,0.7);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(250,55,74,0.05);
}

.capture-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-family: "Fira Sans", system-ui, sans-serif;
}

.capture-form input {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.05);
  background: #fff;
}

.controls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.pill {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
}

.pill.secondary {
  background: #eee;
  color:#293348;
}

.capture-preview {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.capture-preview img {
  width: 150px;
  border-radius: 14px;
  border: 2px solid rgba(250,55,74,0.25);
  background: #eee;
}

/* Hide scrollbar iOS */
::-webkit-scrollbar {
  width: 0;
}

/* PWA and kiosk resilience */
.local-logo{display:flex;align-items:center;gap:10px;font-family:"Bricolage Grotesque",system-ui,sans-serif;color:#1e1e1e}.local-logo span{width:52px;height:52px;border-radius:16px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:30px;font-weight:800;box-shadow:0 8px 18px rgba(250,55,74,.22)}.local-logo strong{font-size:21px;white-space:nowrap}.network-notice{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:1000;background:#222;color:#fff;border-radius:999px;padding:10px 16px;font:600 13px/1.2 system-ui;box-shadow:0 8px 30px #0004}.viewer-loading{position:absolute;inset:80px 0 0;display:grid;place-items:center;background:#fffbe8;color:var(--accent);font:600 18px system-ui;z-index:2}.retry-button{grid-column:1/-1;justify-self:center;border:0;border-radius:999px;background:var(--accent);color:#fff;padding:12px 22px;font-weight:700;font-size:16px}@media(max-width:620px){.local-logo strong{display:none}.local-logo span{width:46px;height:46px}.app{padding-left:10px;padding-right:10px}.card{padding:10px}.btn-content h3{font-size:15px}.btn-content p{font-size:11.5px}}


/* CONFIGURABLE PUBLIC BRANCH HUB */
.hub-public{margin:0;min-height:100vh;background:#F8F5BB;color:#1f1f21;font-family:"Fira Sans",sans-serif;user-select:auto}
.hub-public-shell{width:min(1120px,calc(100% - 32px));margin:0 auto;padding:34px 0 56px}
.hub-public-head,.hub-branch-head{position:relative;padding:38px;border-radius:30px;background:rgba(255,255,255,.78);border:1px solid rgba(255,255,255,.9);box-shadow:0 18px 50px rgba(46,37,27,.08);overflow:hidden}
.hub-public-head img,.hub-branch-head img,.hub-public-head .hub-public-logo,.hub-branch-head .hub-public-logo{width:175px;height:60px;display:block;margin-bottom:42px}
.hub-public-head>span{display:block;color:#fa374a;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.14em}
.hub-public h1{font-family:"Bricolage Grotesque",sans-serif;font-size:clamp(26px,3.5vw,42px);line-height:1.08;margin:10px 0 14px}
.hub-public-head p,.hub-branch-head p{margin:0;color:#666168;font-size:16px}
.hub-branch-grid,.hub-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}
.hub-branch-card,.hub-link-card{display:flex;align-items:center;gap:16px;min-height:112px;padding:20px;border-radius:22px;background:#fff;border:1px solid rgba(40,32,25,.08);box-shadow:0 10px 28px rgba(35,29,25,.06);color:#293348;text-decoration:none;transition:transform .16s ease,box-shadow .16s ease}
.hub-branch-card:hover,.hub-link-card:hover{transform:translateY(-3px);box-shadow:0 16px 35px rgba(35,29,25,.1)}
.hub-card-icon,.hub-link-icon{width:54px;height:54px;flex:0 0 54px;display:grid;place-items:center;border-radius:17px;background:rgba(250,55,74,.11);color:#fa374a;font-size:23px}
.hub-branch-card>span:nth-child(2),.hub-link-copy{min-width:0;flex:1}.hub-branch-card strong,.hub-link-copy strong{display:block;font:700 20px "Bricolage Grotesque",sans-serif}.hub-branch-card small,.hub-link-copy small{display:block;margin-top:5px;color:#746d72;font-size:13px;line-height:1.35}
.hub-branch-card>i:last-child,.hub-link-card>i:last-child{color:#fa374a;font-size:20px}.hub-back{display:inline-flex;align-items:center;gap:6px;color:#3f3a3d;text-decoration:none;font-weight:700;margin-bottom:28px}.hub-branch-pill{display:inline-flex;align-items:center;gap:7px;padding:9px 13px;border-radius:999px;background:rgba(250,55,74,.11);color:#fa374a;font-weight:700;font-size:13px}
.hub-empty{grid-column:1/-1;padding:32px;border-radius:22px;background:#fff;text-align:center;color:#746d72}.hub-public-footer{text-align:center;color:#7b7478;font-size:12px;margin-top:30px}
@media(max-width:700px){.hub-public-shell{width:min(100% - 20px,1120px);padding:10px 0 36px}.hub-public-head,.hub-branch-head{padding:25px;border-radius:24px}.hub-public-head img,.hub-branch-head img,.hub-public-head .hub-public-logo,.hub-branch-head .hub-public-logo{width:150px;margin-bottom:34px}.hub-branch-grid,.hub-link-grid{grid-template-columns:1fr}.hub-branch-card,.hub-link-card{min-height:100px;padding:17px}}


/* PUBLIC HUB LEGACY RESET */
body.hub-public{display:block;align-items:initial;padding:0;gap:0}
main.hub-public-shell{display:block;grid-template-columns:none;max-width:none;min-height:100vh}
main.hub-public-shell section{width:auto;max-width:none}
.hub-public .hub-public-head,.hub-public .hub-branch-head{width:auto;max-width:none}
.hub-public footer.hub-public-footer{position:static;inset:auto;display:block;padding:0;margin:30px 0 0;background:none}

/* ─── POPSICLE CI: HUB LAYER ─── */
:root{
  --pop-pink:#F4BDCD;--pop-lemon:#F8F5BB;--pop-fuchsia:#FA374A;--pop-lilac:#CDB6E0;
  --pop-ivory:#F5F5F3;--pop-blue:#A5D7E6;--pop-navy:#293348;--pop-mint:#CAE57D;
  --ink:var(--pop-navy);--accent:var(--pop-fuchsia);--bg:var(--pop-ivory);
}
body{background:var(--pop-lemon);color:var(--pop-navy);font-family:"Fira Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
:is(h1,h2,h3,h4,h5,h6){color:var(--pop-navy);font-family:"Bricolage Grotesque","Fira Sans",sans-serif;font-weight:700;letter-spacing:-.025em;text-transform:none}
:is(.hub-branch-card,.hub-link-card,.hub-card,.admin-panel,.admin-card){color:var(--pop-navy);border-color:rgba(41,51,72,.14);border-radius:24px}
:is(button,.button,.btn,.admin-link){font-family:"Fira Sans",sans-serif;font-weight:700;text-transform:none}
:is(button[type="submit"],.button.primary,.btn.primary){background:var(--pop-fuchsia);border-color:var(--pop-fuchsia);border-radius:999px;color:#fff}
:is(input,select,textarea){color:var(--pop-navy);border-color:rgba(41,51,72,.22);border-radius:14px}
:is(input,select,textarea):focus{border-color:var(--pop-fuchsia);box-shadow:0 0 0 3px rgba(250,55,74,.14);outline:0}
a{color:var(--pop-fuchsia)}
:focus-visible{outline:3px solid rgba(250,55,74,.38);outline-offset:2px}

/* Popsicle CI: flat surfaces */
body *{background-image:none!important}
:is(button[type="submit"],.button.primary,.btn.primary){background:#FA374A!important}


/* Exact Hub background colour across branch pages and viewers */
html,body,body.hub-public,.app,.hub-public-shell,.viewer,.viewer-body{background-color:#F8F5BB!important}
footer{background:linear-gradient(180deg,rgba(248,245,187,0) 0%,#F8F5BB 40%)}
