/*!
 * EasyOps hero: two-column layout + "phone check → daily coverage" demo.
 * Used by templates/partials/_hero_ops_demo.html.twig on the home and landing pages.
 */

/* ── Two-column hero layout (copy | demo) ───────────────── */
.eo-split-hero__copy { text-align: center; min-width: 0; }
.eo-split-hero .eo-hero__headline { text-wrap: balance; }
@media (min-width: 992px) {
    .eo-split-hero__copy { text-align: start; }
    .eo-split-hero__copy .eo-label,
    .eo-split-hero__copy .eo-hero__headline,
    .eo-split-hero__copy .eo-hero__sub { margin-inline: 0; }
    .eo-split-hero__copy .eo-hero__actions,
    .eo-split-hero__copy .breadcrumb { justify-content: flex-start; }
    .eo-split-hero .eo-hero__headline { font-size: clamp(34px, 3.7vw, 52px); }
}
.eo-split-hero__note { font-size: 12px; color: var(--eo-muted); margin: 12px 0 0; }

/* ── Demo ───────────────────────────────────────────────── */
.eo-demo {
    --d-ink: #1E2A4A;
    --d-muted: #6B7590;
    --d-line: #E7EBF2;
    --d-green: #1E8A57;
    --d-red: #D93A47;
    --d-amber: var(--eo-amber, #FFC000);
    --d-amber-bg: #FFF6D6;
    --col: 34px;
    --cell: 24px;
    --row: 32px;
    --label-w: 140px;
    position: relative;
    direction: ltr;            /* app UI is English; stays LTR on Arabic pages */
    text-align: left;
    max-width: 560px;
    min-height: 470px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Board (manager view) ── */
.eo-demo__board {
    width: calc(100% - 96px);
    background: #fff;
    border: 1px solid var(--d-line);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(30, 42, 74, .08);
    padding: 18px 20px 14px;
}
.eo-demo__board-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.eo-demo__board-title { font-size: 14px; font-weight: 700; color: var(--d-ink); line-height: 1.2; }
.eo-demo__board-sub { font-size: 11.5px; color: var(--d-muted); margin-top: 2px; }
.eo-demo__chip {
    flex-shrink: 0;
    font-size: 11px; font-weight: 600;
    padding: 3px 9px; border-radius: 999px;
    background: #E3EDFB; color: #2F6FD6;
    white-space: nowrap;
}
.eo-demo__grid { display: flex; }
.eo-demo__labels { list-style: none; margin: 0; padding: 0; width: var(--label-w); flex-shrink: 0; }
.eo-demo__labels li {
    height: var(--row);
    display: flex; align-items: center;
    font-size: 12.5px; color: var(--d-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.eo-demo__labels .eo-demo__labels-gap { height: 26px; }
.eo-demo__lbl-short { display: none; }

.eo-demo__viewport {
    width: calc(var(--col) * var(--cols, 7));
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 80%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 26%, #000 80%, transparent 100%);
}
.eo-demo__track { display: flex; will-change: transform; }
.eo-demo__track.is-shifting { transition: transform .9s cubic-bezier(.45, 0, .2, 1); }
.eo-demo__col {
    flex: 0 0 var(--col);
    display: flex; flex-direction: column; align-items: center;
    border-radius: 9px;
    transition: background-color .6s ease;
}
.eo-demo__col.is-today { background: var(--d-amber-bg); }
.eo-demo__date {
    height: 26px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 9px; letter-spacing: .06em; color: var(--d-muted); line-height: 1.1;
}
.eo-demo__date b { font-size: 11px; letter-spacing: 0; color: var(--d-ink); font-weight: 600; }
.eo-demo__col.is-today .eo-demo__date { color: #8A6400; font-weight: 700; }
.eo-demo__col.is-today .eo-demo__date b { font-weight: 800; }

.eo-demo__cell {
    height: var(--row);
    display: flex; align-items: center; justify-content: center;
}
.eo-demo__cell > span {
    width: var(--cell); height: var(--cell);
    border-radius: 6px;
    background: #F1F3F7;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: calc(var(--cell) * .5); font-weight: 800; line-height: 1;
    transition: background-color .35s ease, box-shadow .35s ease;
}
.eo-demo__cell.is-done > span { background: var(--d-green); }
.eo-demo__cell.is-done > span::after { content: "✓"; }
.eo-demo__cell.is-missed > span { background: var(--d-red); }
.eo-demo__cell.is-missed > span::after { content: "×"; font-size: 1.25em; font-weight: 600; }
.eo-demo__cell.is-pending > span { background: #fff; box-shadow: inset 0 0 0 1.5px #C3CBD9; }
.eo-demo__cell.is-pulse > span { animation: eo-demo-pulse .9s ease; }
@keyframes eo-demo-pulse {
    0%   { transform: scale(.85); box-shadow: 0 0 0 0 rgba(30,138,87,.45); }
    45%  { transform: scale(1.12); box-shadow: 0 0 0 7px rgba(30,138,87,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(30,138,87,0); }
}

.eo-demo__legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--d-line); font-size: 11px; color: var(--d-muted); }
.eo-demo__legend span { display: inline-flex; align-items: center; gap: 6px; }
.eo-demo__key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.eo-demo__key.is-done { background: var(--d-green); }
.eo-demo__key.is-missed { background: var(--d-red); }
.eo-demo__key.is-pending { background: #fff; box-shadow: inset 0 0 0 1.5px #C3CBD9; }

/* ── Phone (staff view, styled after the real EasyOps form page) ── */
.eo-demo__phone {
    position: absolute;
    right: 0; top: 54px;
    width: 212px; height: 416px;
    font-size: 11px;
    padding: 7px;
    border-radius: 34px;
    background: #141821;
    box-shadow: 0 30px 60px rgba(20, 24, 33, .28), inset 0 0 0 1.5px #2B3140;
}
.eo-demo__screen {
    position: relative;
    height: 100%;
    border-radius: 27px;
    overflow: hidden;
    background: #F6F7F9;
}
.eo-demo__status {
    height: 2.4em;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1.6em;
    font-size: .92em; font-weight: 700; color: var(--d-ink);
}
.eo-demo__status-dots { display: inline-flex; gap: 3px; }
.eo-demo__status-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--d-ink); display: block; }
.eo-demo__app { margin: 0 .7em; background: #fff; border-radius: 1em; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.eo-demo__app-head {
    display: flex; align-items: center; justify-content: center; gap: .5em;
    padding: .8em .6em;
    background-image: linear-gradient(to right, #ddeeff, #c5dff5, #d4eee8);
    font-size: .95em; font-weight: 700; color: var(--d-ink);
}
.eo-demo__logo {
    width: 1.7em; height: 1.7em; border-radius: 50%;
    background: var(--d-amber); color: #1A1200;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .9em; font-weight: 900;
}
.eo-demo__form { padding: .9em .95em 1em; transition: opacity .25s ease, transform .25s ease; }
.eo-demo__form.is-out { opacity: 0; transform: translateX(-14px); }
.eo-demo__form.is-pre { opacity: 0; transform: translateX(14px); transition: none; }
.eo-demo__form-title { font-size: 1.2em; font-weight: 700; color: var(--d-ink); text-align: center; line-height: 1.2; }
.eo-demo__form-sub { font-size: .85em; color: var(--d-muted); text-align: center; margin: .25em 0 .85em; }
.eo-demo__q { margin-bottom: .65em; }
.eo-demo__q-label { font-size: .88em; font-weight: 600; color: var(--d-ink); margin-bottom: .3em; }

.eo-demo__check {
    display: flex; align-items: center; gap: .6em;
    padding: .55em .65em;
    border: 1px solid #E3E7EE; border-radius: .6em;
    font-size: .92em; color: var(--d-ink);
    transition: border-color .25s ease, background-color .25s ease;
}
.eo-demo__box {
    flex-shrink: 0;
    width: 1.35em; height: 1.35em; border-radius: .35em;
    border: 1.5px solid #B8C1D0; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background-color .25s ease, border-color .25s ease;
}
.eo-demo__box svg { width: .85em; height: .85em; }
.eo-demo__box path { stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .35s ease .05s; }
.eo-demo__q.is-on .eo-demo__check { border-color: rgba(30,138,87,.35); background: #F1FAF5; }
.eo-demo__q.is-on .eo-demo__box { background: var(--d-green); border-color: var(--d-green); }
.eo-demo__q.is-on .eo-demo__box path { stroke-dashoffset: 0; }

.eo-demo__input {
    display: flex; align-items: center;
    height: 2.4em; padding: 0 .7em;
    border: 1.5px solid #CCDFEA; border-radius: .5em; background: #fff;
    font-size: 1em; color: var(--d-ink); font-weight: 600;
}
.eo-demo__caret { width: 1px; height: 1.1em; background: var(--d-ink); margin-left: 1px; opacity: 0; }
.eo-demo__q.is-typing .eo-demo__caret { opacity: 1; animation: eo-demo-blink .8s steps(1) infinite; }
@keyframes eo-demo-blink { 50% { opacity: 0; } }
.eo-demo__unit { margin-left: auto; color: var(--d-muted); font-weight: 500; }

.eo-demo__choices { display: flex; gap: .45em; }
.eo-demo__choices span {
    flex: 1; text-align: center;
    padding: .45em 0; border-radius: .5em;
    border: 1px solid #E3E7EE; font-size: .9em; color: var(--d-ink);
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.eo-demo__q.is-on .eo-demo__choices .is-yes { background: var(--d-green); border-color: var(--d-green); color: #fff; font-weight: 700; }

.eo-demo__photo { display: flex; align-items: center; gap: .6em; }
.eo-demo__photo-btn {
    padding: .5em .8em; border-radius: .5em;
    border: 1px dashed #B8C1D0; font-size: .88em; color: var(--d-muted);
}
.eo-demo__thumb {
    width: 2.6em; height: 2.6em; border-radius: .45em;
    background: linear-gradient(135deg, #cfd9e6 0%, #e9eef4 45%, #b9c8d8 100%);
    opacity: 0; transform: scale(.6);
    transition: opacity .3s ease, transform .3s ease;
}
.eo-demo__q.is-on .eo-demo__thumb { opacity: 1; transform: scale(1); }
.eo-demo__q.is-on .eo-demo__photo-btn { border-style: solid; color: var(--d-green); border-color: rgba(30,138,87,.4); }

.eo-demo__submit {
    display: block; width: 100%;
    margin-top: .9em; padding: .75em 0;
    border: 0; border-radius: .7em;
    background: var(--d-amber); color: #1A1200;
    font: inherit; font-size: .98em; font-weight: 700;
    transition: transform .12s ease, filter .12s ease;
    pointer-events: none;
}
.eo-demo__submit.is-pressed { transform: scale(.96); filter: brightness(.94); }
.eo-demo__toast {
    margin-top: .6em;
    padding: .5em .6em; border-radius: .5em;
    background: #E8F6EE; color: #146C43;
    font-size: .85em; font-weight: 600; text-align: center;
    opacity: 0; transform: translateY(4px);
    transition: opacity .3s ease, transform .3s ease;
}
.eo-demo__toast.is-show { opacity: 1; transform: none; }

.eo-demo__hud {
    position: absolute; left: .7em; right: .7em; bottom: .8em;
    padding: .5em .7em;
    background: #fff; border: 1px solid #E5E7EB; border-radius: .6em;
    box-shadow: 0 6px 16px rgba(15,23,42,.08);
    font-size: .82em; color: var(--d-ink);
}
.eo-demo__bar { height: 5px; background: #E5E7EB; border-radius: 4px; margin-top: .35em; overflow: hidden; }
.eo-demo__bar span { display: block; height: 100%; width: 0; background: #8CC63F; transition: width .3s ease; }

/* ── Tablet ── */
@media (max-width: 991px) {
    .eo-demo { max-width: 520px; }
}

/* ── Phone screens: fewer columns, shorter labels, smaller device ── */
@media (max-width: 575px) {
    .eo-demo {
        --col: 23px; --cell: 17px; --row: 27px; --label-w: 74px;
        max-width: 360px;
        min-height: 300px;
    }
    .eo-demo__board { width: calc(100% - 132px); padding: 14px 12px 10px; border-radius: 14px; }
    .eo-demo__board-head { margin-bottom: 10px; }
    .eo-demo__board-title { font-size: 12.5px; }
    .eo-demo__board-sub, .eo-demo__chip { display: none; }
    .eo-demo__labels li { font-size: 10.5px; }
    .eo-demo__labels .eo-demo__labels-gap { height: 24px; }
    .eo-demo__date { height: 24px; font-size: 8px; }
    .eo-demo__date b { font-size: 10px; }
    .eo-demo__lbl-long { display: none; }
    .eo-demo__lbl-short { display: inline; }
    .eo-demo__legend { font-size: 10px; gap: 4px 10px; }
    .eo-demo__legend span:nth-child(3) { display: none; }
    .eo-demo__phone { width: 140px; height: 280px; top: 18px; font-size: 7.5px; padding: 5px; border-radius: 24px; }
    .eo-demo__screen { border-radius: 19px; }
}

@media (prefers-reduced-motion: reduce) {
    .eo-demo *, .eo-demo *::before, .eo-demo *::after { transition: none !important; animation: none !important; }
}
