/* ═══════════════════════════════════════════════════════════════
   KitchenFlow — Device Mockup (condiviso)
   ───────────────────────────────────────────────────────────────
   Mockup smartphone in stile iPhone moderno (Dynamic Island),
   usato dalla landing pubblica (mini-dashboard) e dalla landing
   demo (schermata QR). Estratto da css/core/demo.css per essere
   riusabile da entrambe senza duplicazioni.
   ═══════════════════════════════════════════════════════════════ */


.device-mockup-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 0 0;
}

.device-mockup {
  position: relative;
  width: 220px;
  flex-shrink: 0;
}

/* Shell con pseudo-elementi per i pulsanti laterali */
.device-shell {
  position: relative;
}

/* Pulsante power (destra) */
.device-shell::before {
  content: '';
  position: absolute;
  right: -5px;
  top: 28%;
  width: 4px;
  height: 58px;
  background: linear-gradient(180deg, #2a2a2c 0%, #3a3a3c 50%, #2a2a2c 100%);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
  z-index: 0;
}

/* Pulsanti volume (sinistra): due bottoni */
.device-shell::after {
  content: '';
  position: absolute;
  left: -5px;
  top: 22%;
  width: 4px;
  height: 30px;
  background: linear-gradient(180deg, #2a2a2c 0%, #3a3a3c 50%, #2a2a2c 100%);
  border-radius: 3px 0 0 3px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1),
    0 42px 0 0 #2a2a2c,
    0 42px 0 1px rgba(255,255,255,0.1),
    0 42px 0 0 #2a2a2c;
  z-index: 0;
}

/* Frame principale dello smartphone */
.device-frame {
  width: 100%;
  aspect-ratio: 9/19.5;
  border-radius: 44px;
  background: #000;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.2),
    0 0 0 7px #1c1c1e,
    0 0 0 8.5px rgba(255,255,255,0.12),
    0 40px 90px rgba(0,0,0,0.65),
    0 16px 40px rgba(0,0,0,0.4),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}

/* Dynamic Island (rimpiazza il notch) */
.device-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 20px;
  background: #000;
  border-radius: 12px;
  z-index: 2;
}

.device-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1a0800 0%, #0c0400 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Mini-dashboard dentro il mockup */
.device-ui-bar {
  background: rgba(242,125,38,0.85);
  padding: 34px 8px 6px;
  font-size: 0.45rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.05em;
}

.device-ui-card {
  margin: 4px;
  background: rgba(242,125,38,0.08);
  border: 1px solid rgba(242,125,38,0.12);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.42rem;
  color: rgba(255,255,255,0.75);
}

.device-ui-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2px 0;
}

.device-ui-val {
  font-weight: 700;
  color: #fb923c;
  font-size: 0.55rem;
}

.device-ui-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
  padding: 2px 0;
}

.device-ui-bar-item {
  flex: 1;
  background: linear-gradient(180deg, #fb923c, #f27d26);
  border-radius: 1px 1px 0 0;
}

/* Riflesso vetro */
.device-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.07) 0%,
    rgba(255,255,255,0) 50%
  );
  pointer-events: none;
  z-index: 3;
}

/* ── QR Phone Mockup ──────────────────────────────────────────── */
.device-screen-qr {
  width: 100%;
  height: 100%;
  background: #fdf2e4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.device-qr-topbar {
  background: rgba(242,125,38,0.9);
  padding: 34px 8px 6px;
  font-size: 0.48rem;
  font-weight: 700;
  color: rgba(255,255,255,0.95);
  letter-spacing: 0.06em;
  text-align: center;
}

.device-qr-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  gap: 5px;
}

.device-qr-sublabel {
  font-size: 0.42rem;
  font-weight: 600;
  color: #7c2d12;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Cornice con angolini styled e scanline */
.device-qr-frame {
  position: relative;
  padding: 3px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(124,45,18,0.12);
}

.device-qr-corner {
  position: absolute;
  width: 9px;
  height: 9px;
  border-color: #f27d26;
  border-style: solid;
}
.device-qr-corner.tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 2px 0 0 0; }
.device-qr-corner.tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; border-radius: 0 2px 0 0; }
.device-qr-corner.bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; border-radius: 0 0 0 2px; }
.device-qr-corner.br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 2px 0; }

.device-qr-scanline {
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent 0%, #f27d26 40%, #fb923c 50%, #f27d26 60%, transparent 100%);
  animation: qr-scanline 2.8s ease-in-out infinite;
  z-index: 2;
  border-radius: 1px;
}

@keyframes qr-scanline {
  0%   { top: 3px;  opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: calc(100% - 3px); opacity: 0; }
}

.device-qr-hint {
  font-size: 0.4rem;
  color: #92400e;
  text-align: center;
  line-height: 1.4;
}


/* ── Mini-dashboard: righe di lista e barra di navigazione ─────────
   Aggiunte per la landing pubblica, che usa .device-screen (la
   schermata "app") invece della .device-screen-qr della demo. */

.device-ui-card-title {
  font-size: 0.42rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 3px;
}

.device-ui-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 2.5px 0;
  font-size: 0.4rem;
  color: rgba(255,255,255,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.device-ui-row:last-child {
  border-bottom: none;
}

.device-ui-row-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.device-ui-tag {
  flex-shrink: 0;
  font-size: 0.36rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.device-ui-tag.is-low {
  color: #fca5a5;
  background: rgba(220,38,38,0.18);
}

.device-ui-tag.is-soon {
  color: #fcd34d;
  background: rgba(245,158,11,0.18);
}

.device-ui-tag.is-ok {
  color: #6ee7b7;
  background: rgba(5,150,105,0.18);
}

/* Barra di navigazione in fondo allo schermo */
.device-ui-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 5px 4px 8px;
  background: rgba(0,0,0,0.35);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.device-ui-nav span {
  font-size: 0.62rem;
  line-height: 1;
  color: rgba(255,255,255,0.32);
}

.device-ui-nav span.is-active {
  color: #fb923c;
}

/* Card che occupa lo spazio residuo: le righe si distribuiscono da sole,
   così lo schermo resta pieno qualunque sia l'altezza del mockup. */
.device-ui-card.is-fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.device-ui-card.is-fill .device-ui-row {
  flex: 1;
  align-items: center;
}
