/**
 * POS relaunch content blocks (Nov 2026).
 * Used inside page content (landing / city / comparison templates) and product descriptions:
 * screenshots, feature lists, package table, service-plan box, key terms, video, "works with" chips.
 * Two naming sets exist in the content (retail: .sas-*, food: .sas-pos-*); both are styled here.
 */

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) {
    --sas-ink: #0f172a;
    --sas-muted: #475569;
    --sas-line: #e2e8f0;
    --sas-soft: #f8fafc;
    --sas-accent: #1877f2;
    --sas-accent-soft: #eaf2ff;
}

/* ---- Screenshots and video ------------------------------------------------ */
:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-main-screen, .sas-pos-shot, .sas-video) {
    margin: 1.75rem 0;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-main-screen, .sas-pos-shot, .sas-video) :is(img, video) {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--sas-line);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.10);
    background: #fff;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-main-screen, .sas-pos-shot, .sas-video) figcaption {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--sas-muted);
    text-align: center;
}

/* ---- "From £349 + VAT" strip ---------------------------------------------- */
:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) .sas-price-line {
    margin: 1.5rem 0;
    padding: 1rem 1.15rem;
    background: var(--sas-accent-soft);
    border: 1px solid #cfe0ff;
    border-left: 4px solid var(--sas-accent);
    border-radius: 10px;
    line-height: 1.6;
    color: var(--sas-ink);
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) .sas-price-line a {
    font-weight: 700;
    white-space: nowrap;
}

/* ---- Feature lists (icon + title + line) ---------------------------------- */
:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-features, .sas-pos-features) {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) .sas-features--benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-features, .sas-pos-features) > li {
    position: relative;
    margin: 0;
    padding: 1rem 1rem 1rem 4rem;
    min-height: 4.25rem;
    background: #fff;
    border: 1px solid var(--sas-line);
    border-radius: 12px;
    line-height: 1.55;
    color: var(--sas-muted);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-features, .sas-pos-features) > li strong {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--sas-ink);
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-features__icon, .sas-pos-features > li > img) {
    position: absolute;
    left: 1rem;
    top: 1rem;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    border-radius: 10px;
    background: var(--sas-accent-soft);
    font-size: 1.15rem;
    line-height: 1;
    box-sizing: border-box;
    object-fit: contain;
}

/* ---- Packages table ------------------------------------------------------- */
:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) table.sas-packages {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--sas-line);
    border-radius: 14px;
    overflow: hidden;
    font-size: 0.95rem;
    background: #fff;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) table.sas-packages :is(th, td) {
    padding: 0.85rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--sas-line);
    line-height: 1.5;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) table.sas-packages thead th {
    background: var(--sas-ink);
    color: #fff;
    font-weight: 800;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) table.sas-packages tbody th {
    width: 30%;
    background: var(--sas-soft);
    color: var(--sas-ink);
    font-weight: 700;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) table.sas-packages tr:last-child :is(th, td) {
    border-bottom: 0;
}

/* ---- Service plan box ----------------------------------------------------- */
:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-service-plan, .sas-pos-plan-box) {
    margin: 2rem 0;
    padding: 1.5rem 1.5rem 1.25rem;
    background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
    border: 1px solid #d6e4ff;
    border-radius: 16px;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-service-plan, .sas-pos-plan-box) > :is(h2, h3):first-child {
    margin-top: 0;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-service-plan, .sas-pos-plan-box) ul {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-service-plan, .sas-pos-plan-box) li {
    position: relative;
    margin: 0 0 0.55rem;
    padding-left: 1.9rem;
    line-height: 1.55;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-service-plan, .sas-pos-plan-box) li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--brand-green, #10b981) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 72% no-repeat;
}

/* ---- Key terms ------------------------------------------------------------ */
:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-key-terms, .sas-pos-keyterms) {
    margin: 1.5rem 0;
    padding: 0.85rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    font-size: 0.925rem;
    line-height: 1.55;
    color: #78350f;
}

/* ---- "Works with" chips and shop-type links ------------------------------- */
:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-works-with, .sas-shop-types) {
    list-style: none;
    margin: 1.25rem 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-works-with, .sas-shop-types) > li {
    margin: 0;
    padding: 0.45rem 0.85rem;
    background: var(--sas-soft);
    border: 1px solid var(--sas-line);
    border-radius: 999px;
    font-size: 0.9rem;
    line-height: 1.3;
    color: var(--sas-ink);
}

:where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) .sas-shop-types > li a {
    font-weight: 700;
    text-decoration: none;
}

/* ---- Mobile --------------------------------------------------------------- */
@media (max-width: 760px) {
    :where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-features, .sas-pos-features, .sas-features--benefits) {
        grid-template-columns: minmax(0, 1fr);
    }

    :where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) table.sas-packages {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.9rem;
    }

    :where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) table.sas-packages :is(th, td) {
        padding: 0.7rem 0.75rem;
        min-width: 9.5rem;
    }

    :where(.landing-content, .city-epos-content, .woocommerce-Tabs-panel--description, .sas-pos-content) :is(.sas-service-plan, .sas-pos-plan-box) {
        padding: 1.15rem 1rem 1rem;
    }
}

/* Videos and images placed by the [sas_video]/[sas_img] shortcodes never exceed their column,
   whatever wrapper the template uses (e.g. the bundle product description). */
.single-product video,
.single-product .sas-video,
:where(.landing-content, .city-epos-content, .sas-pos-content) video {
    max-width: 100%;
    height: auto;
}

.single-product .sas-video video {
    display: block;
    width: 100%;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}
