/* Cart / checkout / invoice pages (mobile first, same look as the mobile app) */
:root {
    --ink: #111111;
    --ink-2: #3a3a3a;
    --muted: #8a8f98;
    --line: #ececec;
    --bg: #f6f6f7;
    --card: #ffffff;
    --accent: #fe7e00;
    --accent-soft: #fff4e8;
    --danger: #e5484d;
    --danger-soft: #fdecec;
    --success: #1f9d55;
    --success-soft: #e8f6ee;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px rgba(17, 17, 17, .06);
    --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.co-body {
    margin: 0;
    font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.co-body a { color: inherit; text-decoration: none; }
.co-body button { font-family: inherit; }
.co-body img { max-width: 100%; display: block; }

.co-container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- header ---------- */
.co-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.co-header__bar {
    height: var(--header-h);
    display: grid; grid-template-columns: 48px 1fr 48px; align-items: center;
}
.co-header__title { text-align: center; font-size: 17px; font-weight: 700; margin: 0; }
.co-header__logo { display: none; }
.co-header__logo img { height: 40px; width: auto; }
.co-icon-btn {
    width: 44px; height: 44px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; color: var(--ink); cursor: pointer; position: relative;
    transition: background .2s;
}
.co-icon-btn:hover { background: var(--bg); }
.co-icon-btn svg { width: 24px; height: 24px; }
/* back arrow points to the start side of the page */
[dir="ltr"] .co-flip { transform: scaleX(-1); }
.co-header__end { justify-self: end; }
.co-badge {
    position: absolute; top: 2px; inset-inline-end: 2px;
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

.co-steps { display: none; }

/* ---------- page ---------- */
.co-page { padding: 16px 0 calc(170px + env(safe-area-inset-bottom)); }
.co-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.co-main, .co-aside { min-width: 0; }

.co-card {
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px;
}
.co-card + .co-card { margin-top: 16px; }
.co-card__title {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 700; margin: 0 0 14px;
}
.co-card__num {
    width: 26px; height: 26px; border-radius: 50%; flex: none;
    background: var(--ink); color: #fff; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
}
.co-section-head { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; color: var(--accent); font-weight: 700; font-size: 16px; }

.co-alert {
    border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; font-weight: 600; font-size: 14px;
    background: var(--danger-soft); color: var(--danger);
}
.co-alert--success { background: var(--success-soft); color: var(--success); }

/* ---------- cart items ---------- */
.co-items { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px 16px; }
.co-item {
    display: grid; grid-template-columns: 88px 1fr auto; gap: 14px;
    padding: 16px 0; border-bottom: 1px solid var(--line);
    transition: opacity .2s;
}
.co-item:last-child { border-bottom: 0; }
.co-item.is-loading { opacity: .5; pointer-events: none; }
.co-item__img {
    width: 88px; height: 104px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg);
}
.co-item__img img { width: 100%; height: 100%; object-fit: cover; }
.co-item__body { min-width: 0; display: flex; flex-direction: column; }
.co-item__brand { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0; }
.co-item__name {
    font-size: 15px; font-weight: 700; margin: 2px 0 4px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.co-item__variant { font-size: 13px; color: var(--ink-2); margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.co-item__variant span { color: var(--muted); }
.co-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; vertical-align: middle; }
.co-item__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.co-item__price { font-size: 16px; font-weight: 800; white-space: nowrap; }
.co-item__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.co-item__remove { color: var(--muted); }
.co-item__remove:hover { color: var(--danger); background: var(--danger-soft); }

.co-qty { display: inline-flex; align-items: center; gap: 10px; }
.co-qty button {
    width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
    background: #ececec; color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.co-qty button:hover:not(:disabled) { background: #dedede; }
.co-qty button:disabled { opacity: .4; cursor: not-allowed; }
.co-qty button svg { width: 16px; height: 16px; }
.co-qty output { min-width: 20px; text-align: center; font-weight: 700; }

.co-empty { text-align: center; padding: 56px 16px; }
.co-empty__icon {
    width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 20px;
    background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center;
}
.co-empty__icon svg { width: 44px; height: 44px; }
.co-empty h2 { font-size: 20px; margin: 0 0 6px; }
.co-empty p { color: var(--muted); margin: 0 0 24px; }

/* ---------- buttons ---------- */
.co-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 54px; padding: 0 24px; width: 100%;
    border-radius: 14px; border: 0; cursor: pointer;
    background: var(--ink); color: #fff !important; font-size: 16px; font-weight: 700;
    transition: transform .1s, background .2s, opacity .2s;
}
.co-btn:hover { background: #2b2b2b; }
.co-btn:active { transform: scale(.99); }
.co-btn:disabled { opacity: .6; cursor: progress; }
.co-btn--ghost { background: transparent; color: var(--ink) !important; border: 1.5px solid var(--line); }
.co-btn--ghost:hover { background: var(--bg); }
.co-btn--auto { width: auto; }
.co-spinner {
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
    animation: co-spin .7s linear infinite; display: none;
}
.co-btn.is-loading .co-spinner { display: inline-block; }
@keyframes co-spin { to { transform: rotate(360deg); } }
.co-link { color: var(--accent) !important; font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; font-size: 14px; }

/* ---------- summary ---------- */
.co-summary__rows { margin: 0; }
.co-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; font-size: 14px; color: var(--ink-2); }
.co-row dd, .co-row dt { margin: 0; }
.co-row dd { font-weight: 700; color: var(--ink); white-space: nowrap; }
.co-row--discount dd, .co-row--wallet dd { color: var(--success); }
.co-row--total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px; font-size: 16px; color: var(--ink); font-weight: 700; }
.co-row--total dd { font-size: 20px; font-weight: 800; }
.co-row[hidden] { display: none; }
.co-summary__actions { display: grid; gap: 10px; margin-top: 16px; }
.co-secure { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.co-secure svg { width: 14px; height: 14px; }
.co-terms { font-size: 12px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.co-terms a { color: var(--ink) !important; text-decoration: underline; }

.co-mini { list-style: none; margin: 0 0 12px; padding: 0; max-height: 260px; overflow: auto; }
.co-mini li { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.co-mini__img { position: relative; width: 52px; height: 60px; flex: none; border-radius: 10px; background: var(--bg); }
.co-mini__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.co-mini__qty {
    position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; border-radius: 10px;
    background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 20px; padding: 0 5px;
}
.co-mini__name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.co-mini__name small { display: block; color: var(--muted); font-weight: 500; }
.co-mini__price { font-size: 13px; font-weight: 700; white-space: nowrap; }
.co-details > summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; margin-bottom: 8px;
}
.co-details > summary::-webkit-details-marker { display: none; }
.co-details > summary svg { width: 18px; height: 18px; transition: transform .2s; }
.co-details[open] > summary svg { transform: rotate(180deg); }

/* coupon */
.co-coupon { display: flex; gap: 8px; margin: 4px 0 6px; }
.co-coupon .co-input { flex: 1; }
.co-coupon__btn {
    height: 48px; padding: 0 18px; border-radius: 12px; border: 0; cursor: pointer;
    background: var(--accent); color: #fff; font-weight: 700;
}
.co-coupon__btn:disabled { opacity: .6; }
.co-coupon__msg { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.co-coupon__msg.is-error { color: var(--danger); }
.co-coupon__msg.is-success { color: var(--success); }

/* ---------- form ---------- */
.co-fields { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.co-field { grid-column: span 2; display: flex; flex-direction: column; gap: 6px; }
.co-field--half { grid-column: span 1; }
.co-field[hidden] { display: none; }
.co-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.co-label b { color: var(--danger); font-weight: 700; }
.co-input {
    width: 100%; height: 48px; padding: 0 14px;
    border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
    font: inherit; font-size: 15px; color: var(--ink);
    transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
textarea.co-input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; }
select.co-input {
    padding-inline-end: 38px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-size: 18px; background-position: left 12px center;
}
[dir="ltr"] select.co-input { background-position: right 12px center; }
.co-input:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, .08); }
.co-input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }
.co-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.co-login-hint { font-size: 14px; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; }
.co-login-hint a { color: var(--accent) !important; font-weight: 700; }

.co-segment { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.co-segment label { position: relative; }
.co-segment input { position: absolute; opacity: 0; pointer-events: none; }
.co-segment span {
    display: block; text-align: center; padding: 9px 6px; border-radius: 9px;
    font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; transition: all .2s;
}
.co-segment input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.co-segment input:focus-visible + span { outline: 2px solid var(--ink); }

/* option cards (payment methods, saved addresses) */
.co-options { display: grid; gap: 10px; }
.co-option { position: relative; display: block; cursor: pointer; }
.co-option > input { position: absolute; opacity: 0; pointer-events: none; }
.co-option__box {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
    transition: border-color .2s, background .2s;
}
.co-option:hover .co-option__box { border-color: #cfcfcf; }
.co-option > input:checked + .co-option__box { border-color: var(--ink); background: #fafafa; }
.co-option > input:focus-visible + .co-option__box { box-shadow: 0 0 0 3px rgba(17, 17, 17, .12); }
.co-option > input:disabled + .co-option__box { opacity: .45; cursor: not-allowed; }
.co-radio {
    width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c9c9c9; flex: none;
    display: inline-flex; align-items: center; justify-content: center; transition: border-color .2s;
}
.co-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); transform: scale(0); transition: transform .15s; }
.co-option > input:checked + .co-option__box .co-radio { border-color: var(--ink); }
.co-option > input:checked + .co-option__box .co-radio::after { transform: scale(1); }
.co-option__text { flex: 1; min-width: 0; }
.co-option__text strong { display: block; font-size: 15px; }
.co-option__text small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }
.co-option__icon {
    flex: none; height: 32px; min-width: 48px; padding: 0 8px; border-radius: 8px;
    background: var(--bg); display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; color: var(--ink-2);
}
.co-option__icon img { height: 20px; width: auto; max-width: 84px; object-fit: contain; }
.co-option__icon svg { width: 22px; height: 22px; }

/* wallet switch */
.co-wallet {
    display: flex; align-items: center; gap: 12px; padding: 14px; margin-bottom: 12px;
    border-radius: 14px; background: var(--accent-soft); cursor: pointer;
}
.co-wallet__icon { width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.co-wallet__icon svg { width: 20px; height: 20px; }
.co-switch { position: relative; width: 46px; height: 28px; flex: none; }
.co-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.co-switch span { position: absolute; inset: 0; border-radius: 14px; background: #d6d6d6; transition: background .2s; }
.co-switch span::after {
    content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s;
}
.co-switch input:checked + span { background: var(--ink); }
.co-switch input:checked + span::after { transform: translateX(18px); }
[dir="rtl"] .co-switch input:checked + span::after { transform: translateX(-18px); }
.co-wallet-note { font-size: 13px; color: var(--success); font-weight: 600; margin: -4px 0 12px; }
.co-wallet-note[hidden] { display: none; }

/* ---------- mobile bottom bar ---------- */
.co-bottom {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    background: #fff; border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(17, 17, 17, .10);
    padding: 10px 16px calc(14px + env(safe-area-inset-bottom));
}
.co-bottom__handle { width: 40px; height: 4px; border-radius: 2px; background: #d9d9d9; margin: 0 auto 10px; }
.co-bottom__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 2px; }
.co-bottom__row--head { color: var(--ink-2); font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 6px; }
.co-bottom__total { font-size: 20px; font-weight: 800; }
.co-bottom .co-btn { margin-top: 8px; }

/* ---------- invoice ---------- */
.inv-hero { text-align: center; padding: 8px 0 20px; }
.inv-hero__icon {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px;
    background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center;
    animation: inv-pop .5s cubic-bezier(.2, 1.4, .4, 1);
}
.inv-hero__icon svg { width: 36px; height: 36px; }
.inv-hero h1 { font-size: 22px; margin: 0 0 6px; }
.inv-hero p { color: var(--muted); margin: 0; }
@keyframes inv-pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.inv { max-width: 820px; margin: 0 auto; }
.inv-paper { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.inv-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
    padding: 20px; background: var(--ink); color: #fff;
}
.inv-head__brand img { height: 40px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.inv-head__title { font-size: 24px; font-weight: 800; margin: 8px 0 0; letter-spacing: .5px; }
.inv-head__meta { display: grid; gap: 4px; font-size: 13px; }
.inv-head__meta > div > span:first-child { color: rgba(255, 255, 255, .65); }
.inv-head__meta strong { margin-inline-start: 6px; }
.inv-status { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.inv-status--paid { background: var(--success-soft); color: var(--success); }
.inv-status--cod { background: var(--accent-soft); color: var(--accent); }
.inv-status--pending { background: #f1f1f1; color: var(--ink-2); }

.inv-parties { display: grid; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.inv-party h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 6px; }
.inv-party p { margin: 0; font-size: 14px; line-height: 1.7; }
.inv-party strong { font-size: 15px; }

.inv-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.inv-table th {
    text-align: start; font-size: 12px; font-weight: 700; color: var(--muted);
    padding: 12px 20px; background: #fafafa; border-bottom: 1px solid var(--line);
}
.inv-table td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.inv-table .num { text-align: end; white-space: nowrap; }
.inv-table .ctr { text-align: center; }
.inv-product { display: flex; gap: 12px; align-items: center; }
.inv-product img { width: 48px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--bg); flex: none; }
.inv-product strong { display: block; font-size: 14px; }
.inv-product small { color: var(--muted); font-size: 12px; }
.inv-col-unit { display: none; }

.inv-totals { padding: 16px 20px 20px; display: flex; justify-content: flex-end; }
.inv-totals dl { width: 100%; max-width: 340px; margin: 0; }

.inv-foot { padding: 16px 20px; background: #fafafa; text-align: center; color: var(--muted); font-size: 13px; }
.inv-foot strong { color: var(--ink); display: block; font-size: 15px; }

.inv-actions { display: grid; gap: 10px; margin: 20px auto 0; max-width: 820px; }

/* ---------- desktop ---------- */
@media (min-width: 640px) {
    .inv-parties { grid-template-columns: 1fr 1fr; }
    .inv-col-unit { display: table-cell; }
    .inv-actions { grid-template-columns: 1fr 1fr 1fr; }
    .co-item { grid-template-columns: 112px 1fr auto; gap: 18px; }
    .co-item__img { width: 112px; height: 132px; }
}

@media (min-width: 992px) {
    :root { --header-h: 76px; }
    .co-header__title { display: none; }
    .co-header__logo { display: flex; justify-content: center; }
    .co-steps {
        display: flex; justify-content: center; gap: 8px; align-items: center;
        padding: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--muted);
    }
    .co-steps li { display: flex; align-items: center; gap: 8px; list-style: none; }
    .co-steps ol { display: flex; gap: 8px; margin: 0; padding: 0; }
    .co-steps li + li::before { content: ""; width: 40px; height: 2px; background: var(--line); border-radius: 1px; }
    .co-steps li.is-done::before, .co-steps li.is-active::before { background: var(--ink); }
    .co-steps__dot {
        width: 26px; height: 26px; border-radius: 50%; background: var(--line); color: var(--muted);
        display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
    }
    .co-steps li.is-active, .co-steps li.is-done { color: var(--ink); }
    .co-steps li.is-active .co-steps__dot, .co-steps li.is-done .co-steps__dot { background: var(--ink); color: #fff; }

    .co-page { padding: 32px 0 64px; }
    .co-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; }
    .co-aside { position: sticky; top: calc(var(--header-h) + 64px); }
    .co-card { padding: 24px; }
    .co-items { padding: 4px 24px; }
    .co-bottom { display: none; }
    .co-page-title { font-size: 26px; font-weight: 800; margin: 0 0 20px; }
    .co-options--grid { grid-template-columns: 1fr 1fr; }
    .inv-head { padding: 28px 32px; }
    .inv-parties, .inv-totals { padding-inline: 32px; }
    .inv-table th, .inv-table td { padding-inline: 32px; }
}

@media (max-width: 991.98px) {
    .co-hide-mobile { display: none !important; }
    .co-page-title { display: none; }
}

@media (max-width: 380px) {
    .co-fields { grid-template-columns: 1fr; }
    .co-field--half { grid-column: span 2; }
    .co-item { grid-template-columns: 76px 1fr auto; gap: 12px; }
    .co-item__img { width: 76px; height: 92px; }
}

/* ---------- print (invoice) ---------- */
@media print {
    body.co-body { background: #fff; }
    .co-header, .inv-hero, .inv-actions, .co-bottom { display: none !important; }
    .co-page { padding: 0; }
    .inv-paper { box-shadow: none; border: 1px solid var(--line); }
    .inv-head { background: #fff; color: var(--ink); border-bottom: 2px solid var(--ink); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .inv-head__meta > div > span:first-child { color: var(--muted); }
    .inv-col-unit { display: table-cell; }
    .inv-parties { grid-template-columns: 1fr 1fr; }
}

/* ---------- toast (bottom right, above the mobile bottom bar) ---------- */
.co-toasts {
    position: fixed; inset-inline: 0; bottom: calc(var(--toast-offset, 0px) + 16px + env(safe-area-inset-bottom));
    z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    direction: ltr; /* always on the physical right side, in arabic and english */
    padding: 0 24px; pointer-events: none;
}
.co-toast {
    display: flex; align-items: center; gap: 10px;
    max-width: min(400px, 100%); width: max-content; padding: 12px 18px; border-radius: 14px;
    background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5;
    box-shadow: 0 10px 30px rgba(17, 17, 17, .25); pointer-events: auto;
    animation: co-toast-in .25s ease-out;
}
.co-toast svg { width: 20px; height: 20px; flex: none; }
.co-toast--error svg { color: #ff8a8d; }
.co-toast--success svg { color: #6fdc9c; }
.co-toast.is-hiding { animation: co-toast-out .2s ease-in forwards; }
@keyframes co-toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes co-toast-out { to { opacity: 0; transform: translateY(16px); } }
[dir="rtl"] .co-toast { direction: rtl; }
[dir="ltr"] .co-toast { direction: ltr; }
@media (max-width: 640px) { .co-toasts { padding: 0 16px; } }
