/* ─── Vitrina del header (/start y home): celular con la app en movimiento ────
   La pantalla es HTML/CSS (public/Includes/device-showcase.php), no un video:
   nítida en cualquier celular y con texto legible. Copia el estilo de la app
   (agenda del día, estados por color, botón Cobrar). La animación la maneja
   el atributo data-step (0–7) que pone el script del include.
   Prefijo bkd- para no chocar con start.css, styles.css ni Bootstrap.
   También define el botón de Google Play (.bkd-play). */

.bkd-stage {
    --bkd-ink: #0F172A;
    --bkd-blue: #2F6EA6;      /* azul de botones de la app */
    --bkd-paid: #2F6EA6;  --bkd-paid-bg: #EAF2FB;
    --bkd-conf: #22A06B;  --bkd-conf-bg: #E8F6EE;
    --bkd-unc:  #F2A11D;  --bkd-unc-bg:  #FEF6E4;
    position: relative;
    width: 80%;
    max-width: 300px;
    margin: 0 auto;
    padding-top: 30px; /* espacio para la notificación */
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    text-align: left;
    color: var(--bkd-ink);
}

/* Celular */
.bkd-phone {
    position: relative;
    padding: 9px;
    background: var(--bkd-ink);
    border-radius: 42px;
    box-shadow: 0 0 0 1.5px #334155 inset, 0 34px 60px -24px rgba(15, 23, 42, .5);
}
.bkd-phone::before { /* isla de la cámara */
    content: ""; position: absolute; z-index: 3; top: 18px; left: 50%;
    width: 30%; height: 20px; transform: translateX(-50%);
    background: var(--bkd-ink); border-radius: 999px;
}
.bkd-screen {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    aspect-ratio: 9 / 18.6;
    background: #F6F8FB;
    border-radius: 34px;
}
.bkd-status { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px 4px; font-size: 12px; font-weight: 600; }
.bkd-status i { width: 20px; height: 10px; border: 1.5px solid var(--bkd-ink); border-radius: 3px; background: linear-gradient(90deg, var(--bkd-ink) 70%, transparent 70%); }

.bkd-appbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px 8px; background: #fff; }
.bkd-appbar strong { flex: 1; font-size: 15px; font-weight: 700; }
.bkd-burger { display: grid; gap: 3px; }
.bkd-burger i { display: block; width: 15px; height: 2px; background: var(--bkd-ink); border-radius: 2px; }
.bkd-bell { position: relative; width: 20px; height: 20px; color: var(--bkd-ink); }
.bkd-bell svg { width: 20px; height: 20px; }
.bkd-bell b { position: absolute; top: -5px; right: -6px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px; background: #E11D48; color: #fff; font-size: 9px; line-height: 15px; text-align: center; font-weight: 700; transition: transform .25s; }
.bkd-stage[data-step="2"] .bkd-bell b { transform: scale(1.35); }

.bkd-dayhead { padding: 10px 16px 2px; background: #fff; }
.bkd-dayhead strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.bkd-dayhead small { color: #64748B; font-size: 11px; }
.bkd-days { display: flex; gap: 6px; padding: 8px 16px 10px; background: #fff; border-bottom: 1px solid #E8EDF3; }
.bkd-days span { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border-radius: 10px; background: #F1F5F9; font-size: 13px; font-weight: 700; }
.bkd-days small { font-size: 8.5px; font-weight: 600; color: #64748B; }
.bkd-days .is-on { background: var(--bkd-blue); color: #fff; }
.bkd-days .is-on small { color: #DCE8F5; }

/* Agenda del día */
.bkd-list { flex: 1; display: flex; flex-direction: column; gap: 7px; padding: 10px 12px 0; transition: opacity .5s; }
.bkd-appt { position: relative; display: flex; align-items: center; gap: 8px; max-height: 60px; transition: max-height .5s ease, opacity .5s ease, margin .5s ease; }
.bkd-appt time { width: 34px; flex-shrink: 0; font-size: 10.5px; font-weight: 600; color: #64748B; }
.bkd-card { flex: 1; min-width: 0; padding: 7px 9px; border-radius: 10px; border-left: 3px solid; transition: background .4s, border-color .4s, box-shadow .4s; }
.bkd-card strong { display: block; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bkd-card small { display: block; font-size: 10.5px; color: #64748B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bkd-chip { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; transition: opacity .3s, transform .3s; }
.bkd-appt .bkd-card { padding-right: 74px; }

.is-paid .bkd-card { background: var(--bkd-paid-bg); border-color: var(--bkd-paid); }
.is-paid .bkd-chip { background: #fff; color: var(--bkd-paid); }
.is-unconf .bkd-card { background: var(--bkd-unc-bg); border-color: var(--bkd-unc); }
.is-unconf .bkd-chip { background: #fff; color: #B7791F; }

/* Cita que se cobra: confirmada con botón Cobrar → pagada */
.is-charge .bkd-card { background: var(--bkd-conf-bg); border-color: var(--bkd-conf); }
.bkd-chip-paid { background: #fff; color: var(--bkd-paid); opacity: 0; transform: translateY(-50%) scale(.8); }
.bkd-charge {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    padding: 5px 11px; border-radius: 999px; background: var(--bkd-blue); color: #fff;
    font-size: 10.5px; font-weight: 700; transition: opacity .3s, transform .2s;
}
.bkd-charge::after { /* el dedo que toca */
    content: ""; position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
    border-radius: 50%; background: rgba(15, 23, 42, .18); border: 2px solid rgba(255, 255, 255, .9);
    opacity: 0; transform: scale(.4);
}
.bkd-stage[data-step="4"] .bkd-charge { transform: translateY(-50%) scale(.92); }
.bkd-stage[data-step="4"] .bkd-charge::after { animation: bkdTap .6s ease-out forwards; }
.bkd-stage[data-step="5"] .is-charge .bkd-card,
.bkd-stage[data-step="6"] .is-charge .bkd-card,
.bkd-stage[data-step="7"] .is-charge .bkd-card { background: var(--bkd-paid-bg); border-color: var(--bkd-paid); }
.bkd-stage[data-step="5"] .is-charge .bkd-charge,
.bkd-stage[data-step="6"] .is-charge .bkd-charge,
.bkd-stage[data-step="7"] .is-charge .bkd-charge { opacity: 0; }
.bkd-stage[data-step="5"] .bkd-chip-paid,
.bkd-stage[data-step="6"] .bkd-chip-paid,
.bkd-stage[data-step="7"] .bkd-chip-paid { opacity: 1; transform: translateY(-50%) scale(1); }

/* Cita nueva: entra a la agenda con un brillo */
.is-new { max-height: 0; opacity: 0; margin-top: -7px; }
.bkd-stage:is([data-step="2"], [data-step="3"], [data-step="4"], [data-step="5"], [data-step="6"], [data-step="7"]) .is-new { max-height: 60px; opacity: 1; margin-top: 0; }
.bkd-stage:is([data-step="2"], [data-step="3"]) .is-new .bkd-card { box-shadow: 0 0 0 2px #9DD9A5, 0 8px 18px -10px rgba(4, 120, 87, .6); }

/* Ventas de hoy */
.bkd-sales { display: flex; justify-content: space-between; align-items: center; margin: 10px 12px; padding: 10px 12px; background: #fff; border: 1px solid #E8EDF3; border-radius: 12px; transition: opacity .5s; }
.bkd-sales small { font-size: 11px; color: #64748B; font-weight: 600; }
.bkd-sales strong { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bkd-sales strong { transition: color .4s; }
.bkd-stage[data-step="6"] .bkd-sales strong { color: #047857; }
.bkd-stage[data-step="6"] .bkd-sales { box-shadow: 0 0 0 2px #9DD9A5; }

/* Aviso "Venta registrada" */
.bkd-toast {
    position: absolute; left: 12px; right: 12px; bottom: 54px; z-index: 2;
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    background: #1E293B; color: #fff; border-radius: 10px; font-size: 11.5px; font-weight: 600;
    opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
}
.bkd-toast span { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: #22A06B; align-items: center; justify-content: center; font-size: 11px; }
.bkd-stage[data-step="5"] .bkd-toast { opacity: 1; transform: none; }

.bkd-nav { display: flex; justify-content: space-around; padding: 10px 16px 16px; background: #fff; border-top: 1px solid #E8EDF3; }
.bkd-nav i { width: 18px; height: 18px; border-radius: 5px; background: #CBD5E1; }
.bkd-nav .is-on { background: var(--bkd-blue); box-shadow: 0 0 0 5px #E3EEF9; }
.bkd-tap { display: none; }

/* Fundido antes de reiniciar */
.bkd-stage[data-step="7"] .bkd-list,
.bkd-stage[data-step="7"] .bkd-sales { opacity: 0; }

/* Notificación "Nueva cita" que cae sobre el celular */
.bkd-notif {
    position: absolute; z-index: 4; top: 0; left: 50%;
    width: 112%; max-width: 330px;
    display: flex; align-items: center; gap: 10px; padding: 10px 12px;
    background: rgba(255, 255, 255, .98); border: 1px solid #E2E8F0; border-radius: 16px;
    box-shadow: 0 18px 36px -16px rgba(15, 23, 42, .45);
    font-size: 13px; line-height: 1.3; color: #334155;
    opacity: 0; transform: translate(-50%, -14px); transition: opacity .35s ease, transform .35s ease;
}
.bkd-notif strong { display: block; color: var(--bkd-ink); font-weight: 700; font-size: 13.5px; }
.bkd-notif-icon {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 10px;
    background: #2563EB url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18M9 16l2 2 4-4'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.bkd-stage:is([data-step="1"], [data-step="2"]) .bkd-notif { opacity: 1; transform: translate(-50%, 0); }

/* Botón de Google Play */
.bkd-play {
    display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 16px 6px 12px;
    background: #000; color: #fff !important; border: 1px solid #A6A6A6; border-radius: 10px;
    text-decoration: none !important; line-height: 1.05; -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease;
}
.bkd-play:hover { box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .6); }
.bkd-play:active { transform: scale(.98); }
.bkd-play svg { width: 24px; height: 26px; flex-shrink: 0; }
.bkd-play span { display: flex; flex-direction: column; text-align: left; }
.bkd-play small { font: 500 10px/1.1 'Inter', system-ui, sans-serif; letter-spacing: .02em; text-transform: uppercase; }
.bkd-play b { font: 600 18px/1.1 'Inter', system-ui, sans-serif; letter-spacing: -.01em; }

@keyframes bkdTap {
    0%   { opacity: 0; transform: scale(.4); }
    30%  { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.5); }
}

@media (min-width: 992px) {
    .bkd-stage { width: 310px; max-width: 310px; }
}
