/* ==========================================================================
   Identities Gallery — CWS My Account widget ("Moj profil", 5166)
   Both states of the widget: the dashboard (.acc-root, logged in) and the
   sign-in / create-account screens (.auth-root, logged out; markup from
   cws-suite/account-auth.php). Same language as the new shop and the cart
   drawer: Archivo, ink #1f1f1f on white, hairlines #e9e9e7, square corners,
   the dark uppercase button, olive as the one accent.

   Loaded after the plugin's cws-myaccount.css by identities-gallery-addons
   (includes/class-iga-account.php) on the account page only.

   Specificity: tokens and most rules sit at (0,2,0)+ under the two roots, so
   they beat the plugin's (0,1,0)/(0,2,0) rules by order and the Elementor kit
   (0,1,1) by weight. The plugin's .acc-btn* palette is written with
   !important, so the button rules here have to be too (at equal or higher
   specificity, later in the cascade). The widget's own Style-tab controls on
   buttons therefore no longer apply; restyle buttons here.
   ========================================================================== */

/* ---------- Tokens + type ---------- */

.acc-root,
.auth-root {
    --acc-bg: #fff;
    --acc-surface: #fff;
    --acc-surface-alt: #f7f7f5;
    --acc-border: #e9e9e7;
    --acc-border-strong: #d9d9d7;
    --acc-text: #1f1f1f;
    --acc-text-2: #5e5e5c;
    --acc-text-3: #8e8e8c;
    --acc-text-muted: #bdbdbb;
    --acc-radius: 0px;
    --acc-radius-sm: 0px;
    --acc-radius-lg: 0px;
    --acc-accent: #1f1f1f;
    --acc-accent-soft: #f4f4f2;
    --acc-accent-mid: #ebebe9;
    --acc-accent-fg: #fff;
    --iga-dark: #23252b;
    --iga-olive: #8fa83a;
    --iga-olive: oklch(0.7 0.14 115);

    font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Sober's style.css paints every svg (svg { fill:#23232c; stroke:#23232c;
   stroke-width:0 }), which beats the icons' own fill="none" / stroke
   attributes and turns every line icon into a dark blob. revert-layer drops
   that rule and hands the attributes back (the plugin's CSS sets no fill or
   stroke of its own, so nothing else is lost). */
.acc-root svg,
.auth-root svg {
    fill: revert-layer;
    stroke: revert-layer;
    stroke-width: revert-layer;
}

.acc-root h1,
.acc-root h2,
.acc-root h3,
.auth-root h1,
.auth-root h2 { font-family: inherit; text-transform: none; }

/* ---------- Buttons (both roots) ---------- */

.acc-root .acc-btn,
.auth-root .acc-btn {
    border-radius: 0 !important;
}

.acc-root .acc-btn.acc-btn-md,
.auth-root .acc-btn.acc-btn-md {
    min-height: 46px !important;
    padding: 12px 24px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    letter-spacing: .06em !important;
    text-transform: uppercase !important;
}

.acc-root .acc-btn.acc-btn-sm,
.auth-root .acc-btn.acc-btn-sm {
    min-height: 34px !important;
    padding: 7px 14px !important;
    font-size: 12.5px !important;
}

.acc-root .acc-btn.acc-btn-primary,
.auth-root .acc-btn.acc-btn-primary {
    background: var(--iga-dark) !important;
    border-color: var(--iga-dark) !important;
    color: #fff !important;
}

.acc-root .acc-btn.acc-btn-primary:hover,
.auth-root .acc-btn.acc-btn-primary:hover {
    background: #000 !important;
    border-color: #000 !important;
}

.acc-root .acc-btn.acc-btn-ghost,
.auth-root .acc-btn.acc-btn-ghost {
    background: transparent !important;
    border-color: var(--acc-border-strong) !important;
    color: var(--acc-text) !important;
}

.acc-root .acc-btn.acc-btn-ghost:hover,
.auth-root .acc-btn.acc-btn-ghost:hover {
    background: transparent !important;
    border-color: var(--acc-text) !important;
}

.acc-root .acc-btn.acc-btn-soft,
.auth-root .acc-btn.acc-btn-soft {
    background: var(--acc-accent-soft) !important;
    color: var(--acc-text) !important;
}

.acc-root .acc-btn.acc-btn-soft:hover,
.auth-root .acc-btn.acc-btn-soft:hover { background: var(--acc-accent-mid) !important; }

/* ---------- Fields (both roots) ---------- */

.acc-root .acc-field-lbl,
.auth-root .acc-field-lbl { font-size: 13px; font-weight: 500; color: var(--acc-text); }

.acc-root .acc-req,
.auth-root .acc-req { color: var(--acc-text-3); }

.acc-root .acc-input,
.auth-root .acc-input {
    border: 1px solid var(--acc-border-strong);
    border-radius: 0;
    padding: 0 16px;
    background: #fff;
    box-shadow: none;
    color: var(--acc-text);
    font-size: 14px;
}

.acc-root input.acc-input,
.acc-root select.acc-input,
.auth-root input.acc-input,
.auth-root select.acc-input { height: 48px; min-height: 48px; }

.acc-root textarea.acc-input,
.auth-root textarea.acc-input { padding: 12px 16px; }

.acc-root .acc-input:hover,
.auth-root .acc-input:hover { border-color: var(--acc-text-muted); }

.acc-root .acc-input:focus,
.auth-root .acc-input:focus { border-color: var(--acc-text); box-shadow: none; outline: 0; }

.acc-root .acc-field.has-error .acc-input,
.auth-root .acc-field.has-error .acc-input { border-color: var(--acc-danger); box-shadow: none; }

.acc-root .acc-alert,
.auth-root .acc-alert { border-radius: 0; }

/* ==========================================================================
   Logged out: sign in / create account
   ========================================================================== */

.auth-root { padding: 48px 20px; background: #fff; }

.auth-root .auth-shell,
.auth-root.acc-card-shadowed .auth-shell {
    max-width: 1060px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border: 1px solid var(--acc-border);
    border-radius: 0;
    box-shadow: none;
}

/* Aside: the header's black, the header's logo. */
.auth-root .iga-auth-aside {
    justify-content: space-between;
    gap: 64px;
    min-height: 580px;
    padding: 48px 46px;
    border: 0;
    background: #000;
    color: #fff;
}

.auth-root .iga-auth-aside::after { content: none; }

.auth-root .iga-auth-aside .auth-brand { display: block; }
.auth-root .iga-auth-logo { display: block; width: 150px; max-width: 100%; height: auto; }
.auth-root .iga-auth-aside .auth-brand-name { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

.auth-root .iga-auth-aside .auth-aside-body { gap: 0; }

.auth-root .iga-auth-aside .auth-aside-eyebrow {
    margin: 0 0 18px;
    color: var(--iga-olive);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.auth-root .iga-auth-aside .auth-aside-title {
    max-width: 15ch;
    margin: 0;
    color: #fff;
    font-size: 34px;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.02em;
}

.auth-root .iga-auth-aside .auth-aside-sub {
    max-width: 38ch;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: 14px;
    line-height: 1.6;
}

.auth-root .iga-auth-perks {
    display: block;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.auth-root .iga-auth-perks .auth-perk {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .86);
    font-size: 13.5px;
    line-height: 1.45;
}

.auth-root .iga-auth-perks .auth-perk-i {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--iga-olive);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    font-variant-numeric: tabular-nums;
}

/* Main column */
.auth-root .auth-main { padding: 48px 52px; }

/* Tabs: the shop's underline tabs, not a segmented pill. */
.auth-root .auth-tabs {
    display: flex;
    gap: 34px;
    margin: 0 0 36px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--acc-border);
    border-radius: 0;
    background: none;
}

.auth-root .auth-tabs .auth-tab {
    flex: none;
    min-height: 0;
    margin: 0 0 -1px;
    padding: 4px 0 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--acc-text-3);
    font-size: 15px;
    font-weight: 400;
    transition: color .15s, border-color .2s;
}

.auth-root .auth-tabs .auth-tab:hover { color: var(--acc-text); background: transparent; }

.auth-root .auth-tabs .auth-tab.is-active {
    border-bottom-color: var(--acc-text);
    background: transparent;
    box-shadow: none;
    color: var(--acc-text);
    font-weight: 500;
}

.auth-root .auth-head { margin-bottom: 28px; }

.auth-root .auth-head-title {
    margin: 0;
    color: var(--acc-text);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -.015em;
}

.auth-root .auth-head-sub { margin: 10px 0 0; color: var(--acc-text-3); font-size: 14px; line-height: 1.55; }

.auth-root .auth-form { gap: 20px; }
.auth-root .auth-form .acc-field { gap: 8px; }

/* Checkboxes: the shop's filter boxes. */
.auth-root .auth-check { gap: 10px; color: var(--acc-text-2); font-size: 13px; line-height: 1.45; }

.auth-root .auth-check .auth-check-box {
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 0;
    background: #ededeb;
}

.auth-root .auth-check:hover .auth-check-box { background: #e0e0de; }
.auth-root .auth-check input:checked + .auth-check-box { background: var(--acc-text); border-color: var(--acc-text); }
.auth-root .auth-check input:focus-visible + .auth-check-box { box-shadow: none; outline: 2px solid var(--acc-text); outline-offset: 2px; }
.auth-root .auth-check a { text-decoration: underline; text-underline-offset: 2px; }

.auth-root .iga-auth-checks { display: flex; flex-direction: column; gap: 12px; margin-top: 2px; }

.auth-root .auth-link {
    color: var(--acc-text);
    font-size: 13px;
    font-weight: 400;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.auth-root .auth-link:hover { color: #000; }

/* Submit: the drawer / quick view button. */
.auth-root .acc-btn.auth-submit {
    height: 54px !important;
    min-height: 54px !important;
    margin-top: 6px;
    padding: 0 20px !important;
    font-size: 13px !important;
}

.auth-root .acc-btn.auth-submit .acc-btn-i { display: none; }
.auth-root .acc-btn.auth-submit:disabled { opacity: .6; cursor: default; }

.auth-root .auth-divider { color: var(--acc-text-3); font-size: 12px; }
.auth-root .auth-switch { color: var(--acc-text-3); font-size: 13px; }

/* One column below 820px (the plugin's own breakpoint): the two-column rule
   above outranks the plugin's, so it has to be undone here too. */
@media (max-width: 820px) {
    .auth-root { padding: 32px 16px; }
    .auth-root .auth-shell,
    .auth-root.acc-card-shadowed .auth-shell { max-width: 560px; grid-template-columns: minmax(0, 1fr); }
    .auth-root .iga-auth-aside { min-height: 0; flex-direction: column; align-items: flex-start; gap: 16px; padding: 26px 28px; }
    .auth-root .iga-auth-aside .auth-aside-title { font-size: 22px; max-width: none; }
    .auth-root .auth-main { padding: 36px 28px 40px; }
}

@media (max-width: 520px) {
    .auth-root { padding: 8px 0 24px; }
    .auth-root .auth-shell,
    .auth-root.acc-card-shadowed .auth-shell { min-height: 0; border: 0; }
    .auth-root .auth-main { padding: 24px 20px 36px; }
    .auth-root .auth-tabs { gap: 26px; margin-bottom: 28px; }
    .auth-root .auth-head-title { font-size: 26px; }
}

/* ==========================================================================
   Logged in: dashboard, orders, addresses, account, wishlist
   ========================================================================== */

.acc-root.acc-card-shadowed .acc-card,
.acc-root.acc-card-bordered .acc-card,
.acc-root .acc-card { border-radius: 0; box-shadow: none; }

.acc-root .acc-page-eyebrow,
.acc-root .acc-promo-eyebrow {
    color: var(--iga-olive);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.acc-root .acc-page-title { font-size: 30px; font-weight: 500; letter-spacing: -.015em; }
.acc-root .acc-page-sub { color: var(--acc-text-3); font-size: 14px; }

.acc-root .acc-section-title { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.acc-root .acc-section-sub { color: var(--acc-text-3); font-size: 13px; }

.acc-root .acc-stat-i { border-radius: 0; background: var(--acc-accent-soft); color: var(--acc-text); }
.acc-root .acc-stat-lbl { color: var(--acc-text-3); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.acc-root .acc-stat-val { font-weight: 500; }

.acc-root .acc-promo { background: var(--acc-surface-alt) !important; border-style: solid !important; }
.acc-root .acc-promo-title { font-size: 16px; font-weight: 500; }

.acc-root .acc-nav-item { font-size: 14px; }
.acc-root .acc-nav-item.is-active { font-weight: 500; }
.acc-root .acc-menu-btn { border-radius: 0; }

.acc-root .acc-chip { border-radius: 0 !important; }
.acc-root .acc-badge { border-radius: 0; }
