/* ══════════════════════════════════════════════════════════════════
   "Download the App" promo card (Home page + the Admin live preview).
   Markup: js/common/app-download-card.js. Colours come from three
   per-card custom properties set inline (--adc-bg / --adc-accent / --adc-text).
   ══════════════════════════════════════════════════════════════════ */
.adc-section {
    /*    padding: 28px 0;*/
}

    .adc-section[hidden] {
        display: none !important;
    }

.adc-card {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 20px;
    background: var(--adc-bg, #fde7e4);
    color: var(--adc-text, #1f2937);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

/* Logo tile (the accent colour shows through a transparent logo) */
.adc-logo {
    flex: 0 0 auto;
    width: 160px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--adc-accent, #ee5a24);
}

    .adc-logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.adc-main {
    flex: 1 1 auto;
    min-width: 0;
}

.adc-title {
    margin: 0 0 14px;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--adc-text, #1f2937);
    overflow-wrap: anywhere;
}

.adc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.adc-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 1rem;
    line-height: 1.4;
}

/* Arrow + sentence stay together (the sentence wraps beside the arrow); only the code pill wraps below */
.adc-line-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.adc-bullet {
    flex: 0 0 auto;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--adc-accent, #ee5a24);
}

.adc-line-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

    .adc-line-text strong {
        font-weight: 800;
    }

/* Promo code pill (tap to copy) */
.adc-code {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    max-width: 100%; /* a long code wraps inside the pill instead of poking out of the card */
    min-width: 0;
    padding: 1px 11px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: var(--adc-text, #1f2937);
    font-size: 0.8rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .adc-code b {
        min-width: 0;
        font-weight: 800;
        letter-spacing: 0.3px;
        overflow-wrap: anywhere;
    }

    .adc-code:hover,
    .adc-code:focus-visible {
        background: rgba(128, 128, 128, 0.12);
    }

/* Softer outline / tint where color-mix() exists (kept in @supports: a var()-based declaration is
       accepted by old browsers at parse time and would then silently drop the whole border) */
@supports (color: color-mix(in srgb, red, blue)) {
    .adc-code {
        border-color: color-mix(in srgb, var(--adc-text, #1f2937) 45%, transparent);
    }

        .adc-code:hover,
        .adc-code:focus-visible {
            background: color-mix(in srgb, var(--adc-text, #1f2937) 8%, transparent);
            border-color: var(--adc-text, #1f2937);
        }
}

/* #15803d + white = 5.0:1 (WCAG AA) */
.adc-code.adc-code-copied {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

/* Rating + store badges column */
.adc-side {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.adc-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.adc-rating-badge {
    padding: 6px 10px;
    border-radius: 8px;
    background: #15803d; /* white on this = 5.0:1 (WCAG AA); the lighter #2e9e58 was 3.4:1 */
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.1;
}

.adc-stars {
    display: inline-flex;
    gap: 2px;
    color: #f5b301;
    font-size: 1rem;
}

.adc-star-off {
    opacity: 0.35;
}

.adc-stores {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adc-store {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 138px;
    padding: 5px 14px 5px 11px;
    border: 1px solid #a6a6a6;
    border-radius: 8px;
    background: #000;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .adc-store:hover,
    .adc-store:focus-visible {
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    }

    .adc-store > i {
        font-size: 1.5rem;
        line-height: 1;
    }

    .adc-store span {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
    }

    .adc-store small {
        font-size: 0.56rem;
        font-weight: 500;
        letter-spacing: 0.3px;
        text-transform: uppercase;
    }

    .adc-store b {
        font-size: 1.05rem;
        font-weight: 600;
    }

/* QR */
.adc-qr {
    flex: 0 0 auto;
    width: 150px;
    height: 150px;
    padding: 6px;
    border-radius: 10px;
    background: #fff;
}

    .adc-qr img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* Tablet: tighter, QR a little smaller, side column drops under the text when it doesn't fit */
@media (max-width: 991.98px) {
    .adc-card {
        flex-wrap: wrap;
        gap: 22px 26px;
        padding: 26px 28px;
    }

    .adc-logo {
        width: 120px;
        height: 120px;
        border-radius: 20px;
    }

    /* Deterministic rows: logo + text on row 1 (text takes exactly the rest, or the whole row without a
       logo); rating/stores and the QR always share row 2. Without this, a few px of width decided whether
       the QR ended up stranded on a row of its own. 146px = 120px logo + 26px column gap. */
    .adc-main {
        flex: 1 1 100%;
    }

    .adc-card.adc-has-logo .adc-main {
        flex: 1 1 calc(100% - 146px);
    }

    .adc-qr {
        width: 130px;
        height: 130px;
    }
}

/* Phone: logo + text on top, badges row below; the QR is for scanning FROM a phone, so it's hidden here */
@media (max-width: 767.98px) {
    .adc-section {
        padding: 20px 0;
    }

    .adc-card {
        align-items: flex-start;
        gap: 16px;
        padding: 20px 18px;
        border-radius: 20px;
    }

    .adc-logo {
        width: 72px;
        height: 72px;
        border-radius: 16px;
    }

    .adc-card.adc-has-logo .adc-main {
        flex: 1 1 calc(100% - 92px); /* 72px logo + 16px gap (+4px slack) */
    }

    .adc-title {
        margin-bottom: 10px;
        font-size: 1.15rem;
    }

    .adc-line {
        font-size: 0.9rem;
        gap: 8px;
    }

    .adc-line-main {
        gap: 8px;
    }

    .adc-bullet {
        font-size: 1.15rem;
    }

    .adc-side {
        flex: 1 1 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 16px;
    }

    .adc-stores {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .adc-qr {
        display: none;
    }
}
