/* Horeka Quick OS — Demo Available card + pre-sale demo sheet (mobile PDP). */

.hq-demo {
    --hqd-green: #2C8515;
    --hqd-green-bg: #eef7ea;
    --hqd-ink: #0f172a;
    --hqd-mute: #64748b;
    --hqd-line: #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 12px 4px;
    padding: 11px 12px;
    background: #fff;
    border: 1px solid var(--hqd-line);
    border-left: 3px solid var(--hqd-green);
    border-radius: 10px;
    box-sizing: border-box;
}
.hq-demo-icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hqd-green-bg);
    color: var(--hqd-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hq-demo-body { flex: 1; min-width: 0; }
.hq-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--hqd-green);
    background: var(--hqd-green-bg);
    padding: 2px 7px 2px 5px;
    border-radius: 999px;
    line-height: 1.4;
}
.hq-demo-title {
    margin-top: 4px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--hqd-ink);
    line-height: 1.25;
}
.hq-demo-sub {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--hqd-mute);
    line-height: 1.35;
}
.hq-demo-cta {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: var(--hqd-green);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 9px 12px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}
.hq-demo-cta:active { transform: scale(.97); }

@media (min-width: 1024px) {
    .hq-demo--mobile { display: none; }
}

/* ── Bottom sheet ─────────────────────────────────────────────────────── */

.hq-demo-sheet {
    --hqd-green: #2C8515;
    --hqd-green-bg: #eef7ea;
    --hqd-ink: #0f172a;
    --hqd-mute: #64748b;
    --hqd-line: #e5e7eb;
    position: fixed;
    inset: 0;
    z-index: 100000;
}
.hq-demo-sheet[hidden] { display: none; }
.hq-demo-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    opacity: 0;
    transition: opacity .2s ease;
}
.hq-demo-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92vh;
    max-height: 92dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 6px 16px calc(16px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1);
    color: var(--hqd-ink);
    font-size: 14px;
}
@media (min-width: 600px) {
    .hq-demo-sheet-panel {
        left: 50%;
        right: auto;
        width: 480px;
        margin-left: -240px;
    }
}
.hq-demo-sheet.is-open .hq-demo-sheet-backdrop { opacity: 1; }
.hq-demo-sheet.is-open .hq-demo-sheet-panel { transform: none; }

.hq-demo-sheet-grip {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #d1d5db;
    margin: 4px auto 8px;
}
.hq-demo-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.hq-demo-sheet-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--hqd-ink);
}
.hq-demo-x {
    border: 0;
    background: #f1f5f9;
    color: #334155;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.hq-demo-product {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid var(--hqd-line);
    border-radius: 10px;
    margin-bottom: 14px;
}
.hq-demo-product img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    flex: 0 0 52px;
}
.hq-demo-product-brand {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--hqd-green);
}
.hq-demo-product-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hq-demo-product-price {
    font-size: 13px;
    font-weight: 700;
    margin-top: 2px;
}

.hq-demo-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.hq-demo-field {
    display: block;
    margin-bottom: 12px;
}
.hq-demo-field > span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}
.hq-demo-field input,
.hq-demo-other {
    width: 100%;
    box-sizing: border-box;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 16px; /* ≥16px stops iOS zooming into the field */
    color: var(--hqd-ink);
    background: #fff;
    -webkit-appearance: none;
    appearance: none;
}
.hq-demo-field input:focus,
.hq-demo-other:focus {
    outline: none;
    border-color: var(--hqd-green);
    box-shadow: 0 0 0 3px rgba(44, 133, 21, .15);
}
.hq-demo-field.is-bad input { border-color: #dc2626; }
.hq-demo-row {
    display: flex;
    gap: 10px;
}
.hq-demo-row .hq-demo-field { flex: 1; min-width: 0; }
.hq-demo-row .hq-demo-field--pin { flex: 0 0 38%; }

.hq-demo-q {
    border: 0;
    margin: 4px 0 14px;
    padding: 0;
    min-width: 0;
}
.hq-demo-q legend {
    font-size: 13px;
    font-weight: 600;
    color: var(--hqd-ink);
    margin-bottom: 8px;
    padding: 0;
}
.hq-demo-q.is-bad legend { color: #dc2626; }

.hq-demo-seg,
.hq-demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hq-demo-seg label,
.hq-demo-chips label {
    position: relative;
    cursor: pointer;
    margin: 0;
}
.hq-demo-seg input,
.hq-demo-chips input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.hq-demo-seg span,
.hq-demo-chips span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}
.hq-demo-seg span { min-width: 72px; height: 36px; padding: 0 16px; }
.hq-demo-chips span { height: 32px; padding: 0 12px; font-size: 12.5px; }
.hq-demo-seg input:checked + span,
.hq-demo-chips input:checked + span {
    border-color: var(--hqd-green);
    background: var(--hqd-green-bg);
    color: var(--hqd-green);
    font-weight: 700;
}
.hq-demo-seg input:focus-visible + span,
.hq-demo-chips input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(44, 133, 21, .25);
}

.hq-demo-hint {
    margin: 6px 0 0;
    font-size: 11.5px;
    color: var(--hqd-green);
}
.hq-demo-hint[hidden] { display: none; }

.hq-demo-brands {
    margin-top: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 10px;
}
.hq-demo-brands[hidden] { display: none; }
.hq-demo-brands-label {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}
.hq-demo-other { margin-top: 10px; }
.hq-demo-other[hidden] { display: none; }

.hq-demo-err {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12.5px;
}
.hq-demo-err[hidden] { display: none; }

.hq-demo-submit {
    display: block;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: var(--hqd-green);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.hq-demo-submit[disabled] { opacity: .6; cursor: default; }
.hq-demo-foot {
    margin: 8px 0 0;
    text-align: center;
    font-size: 11.5px;
    color: var(--hqd-mute);
}

.hq-demo-done {
    text-align: center;
    padding: 12px 4px 4px;
}
.hq-demo-done[hidden] { display: none; }
.hq-demo-done-tick {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--hqd-green);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.hq-demo-done-tick svg { width: 26px; height: 26px; }
.hq-demo-done h4 { margin: 0 0 6px; font-size: 17px; }
.hq-demo-done p { margin: 0 0 8px; font-size: 13.5px; color: #334155; line-height: 1.45; }
.hq-demo-ref { color: var(--hqd-mute) !important; font-size: 12px !important; margin-bottom: 16px !important; }

html.hq-demo-lock,
html.hq-demo-lock body { overflow: hidden; }

@media (max-width: 380px) {
    .hq-demo { margin: 10px 10px 4px; padding: 10px; gap: 8px; }
    .hq-demo-icon { flex-basis: 34px; width: 34px; height: 34px; }
    .hq-demo-title { font-size: 13px; }
    .hq-demo-cta { padding: 8px 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .hq-demo-sheet-panel,
    .hq-demo-sheet-backdrop { transition: none; }
}
