/* =========================================================
   My account — safabrura.co.il
   Styling for the icredit-subscriptions [ics_my_subscription]
   shortcode. Scoped to .ics-my-subscription so it cannot leak
   into the plugin's other screens.
   ========================================================= */

.ics-my-subscription {
    max-width: 860px;
    margin: 0 auto;
    padding: 8px 0 24px;
    direction: rtl;
    font-family: var(--safa-ui);
    font-size: 16px;
    line-height: 1.6;
    color: var(--hd-ink);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ---------------------------------------------------------
   Hero — the one thing people come here to check
   --------------------------------------------------------- */

.acc-hero {
    position: relative;
    overflow: hidden;
    padding: 30px 32px;
    border: 1px solid var(--hd-line);
    border-radius: 22px;
    background: linear-gradient(150deg, #fdf6fa 0%, #f7f1fb 55%, #fff5ef 100%);
}
.acc-hero::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hd-accent), var(--hd-accent-2), #f0a875);
}
.acc-hero.is-inactive {
    background: linear-gradient(150deg, #faf7f9 0%, #f5f2f7 100%);
}

.acc-hero__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.acc-hero__eyebrow {
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .06em;
    color: var(--hd-ink-soft);
}
.acc-hero__title {
    margin: 4px 0 0;
    font-family: var(--safa-display);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--hd-ink);
}
.acc-hero__lead {
    margin: 16px 0 0;
    font-size: 16.5px;
    color: var(--hd-ink-soft);
    max-width: 52ch;
}
.acc-hero__lead strong {
    color: var(--hd-ink);
    font-weight: 600;
}
.acc-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.acc-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 15px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
}
.acc-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}
.acc-badge--on {
    color: #2f7d5b;
    background: rgba(47, 125, 91, .11);
    border: 1px solid rgba(47, 125, 91, .20);
}
.acc-badge--off {
    color: #93627f;
    background: rgba(147, 98, 127, .09);
    border: 1px solid rgba(147, 98, 127, .18);
}

/* Time left on the subscription */
.acc-meter {
    margin-top: 18px;
    max-width: 420px;
}
.acc-meter__bar {
    height: 7px;
    border-radius: 999px;
    background: rgba(92, 42, 77, .10);
    overflow: hidden;
}
.acc-meter__bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--hd-accent), var(--hd-accent-2));
}
.acc-meter.is-soon .acc-meter__bar span {
    background: linear-gradient(90deg, #d2694a, #c2588f);
}
.acc-meter__note {
    margin: 8px 0 0;
    font-size: 13.5px;
    color: var(--hd-ink-soft);
    font-variant-numeric: tabular-nums;
}
.acc-meter.is-soon .acc-meter__note {
    color: #b4573b;
}

/* The subscription's particulars */
.acc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    margin: 24px 0 0;
    padding: 0;
    border: 1px solid var(--hd-line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--hd-line);
}
.acc-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px 18px;
    background: rgba(255, 255, 255, .82);
}
.acc-stat dt {
    font-size: 12.5px;
    color: var(--hd-ink-soft);
}
.acc-stat dd {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--hd-ink);
    font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.acc-btn,
.ics-my-subscription .ics-button {
    display: inline-block;
    padding: 11px 28px;
    border-radius: 999px;
    font-size: 15.5px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.acc-btn--primary,
.ics-my-subscription .ics-button {
    color: #fff !important;
    background: linear-gradient(120deg, var(--hd-accent), var(--hd-accent-2));
    box-shadow: 0 6px 18px rgba(194, 88, 143, .28);
}
.acc-btn--primary:hover,
.ics-my-subscription .ics-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(194, 88, 143, .38);
}
.acc-btn--ghost {
    color: var(--hd-ink);
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--hd-line);
}
.acc-btn--ghost:hover {
    color: var(--hd-accent);
    border-color: rgba(194, 88, 143, .35);
}

/* ---------------------------------------------------------
   Shortcuts
   --------------------------------------------------------- */

.acc-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.acc-link {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px 18px;
    border: 1px solid var(--hd-line);
    border-radius: 16px;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(92, 42, 77, .05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.acc-link:hover {
    transform: translateY(-2px);
    border-color: rgba(194, 88, 143, .32);
    box-shadow: 0 12px 28px rgba(92, 42, 77, .12);
}
.acc-link__title {
    font-size: 16.5px;
    font-weight: 600;
    color: var(--hd-ink);
}
.acc-link:hover .acc-link__title {
    color: var(--hd-accent);
}
.acc-link__note {
    font-size: 13.5px;
    color: var(--hd-ink-soft);
}

/* ---------------------------------------------------------
   Cards and lists
   --------------------------------------------------------- */

.acc-card {
    padding: 24px 28px;
    border: 1px solid var(--hd-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(92, 42, 77, .05);
}
.acc-card--alert {
    border-color: rgba(196, 96, 70, .28);
    background: linear-gradient(165deg, #fff8f5 0%, #fff 60%);
}
.acc-card__title {
    margin: 0 0 6px;
    font-family: var(--safa-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--hd-ink);
}
.acc-card--alert .acc-card__title {
    color: #b4573b;
}
.acc-card__foot {
    margin: 16px 0 0;
    font-size: 14px;
    color: var(--hd-ink-soft);
}

.acc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.acc-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--hd-line);
}
.acc-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.acc-row__main {
    font-size: 16px;
    font-weight: 500;
    color: var(--hd-ink);
}
.acc-row__meta {
    font-size: 14px;
    color: var(--hd-ink-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.acc-row__sep {
    padding: 0 2px;
    opacity: .6;
}
.acc-row__note {
    flex: 1 0 100%;
    font-size: 13.5px;
    color: #b4573b;
}
.acc-row .acc-chip {
    margin-inline-start: auto;
}

.acc-chip {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
}
.acc-chip--on {
    color: #2f7d5b;
    background: rgba(47, 125, 91, .11);
}
.acc-chip--off {
    color: var(--hd-ink-soft);
    background: rgba(92, 42, 77, .06);
}

.acc-empty {
    margin: 6px 0 0;
    color: var(--hd-ink-soft);
}

/* ---------------------------------------------------------
   Logged out
   --------------------------------------------------------- */

.ics-my-subscription .ics-my-subscription-login {
    max-width: 500px;
    margin: 0 auto;
    padding: 52px 40px;
    text-align: center;
    border: 1px solid var(--hd-line);
    border-radius: 22px;
    background: linear-gradient(165deg, #fdf8fb 0%, #f7f1fb 45%, #fff4ef 100%);
    box-shadow: 0 10px 34px rgba(92, 42, 77, .08);
}
.ics-my-subscription .ics-my-subscription-login .login-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 30px;
    background: #fff;
    border: 1px solid var(--hd-line);
    box-shadow: 0 8px 22px rgba(92, 42, 77, .10);
}
.ics-my-subscription .ics-my-subscription-login p {
    margin: 0 0 24px;
    color: var(--hd-ink-soft);
    font-size: 17px;
}

/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 700px) {
    .acc-hero {
        padding: 24px 20px;
    }
    .acc-hero__title {
        font-size: 25px;
    }
    .acc-card {
        padding: 20px 18px;
    }
    .acc-stats {
        grid-template-columns: 1fr 1fr;
    }
    .acc-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
    .acc-row .acc-chip {
        margin-inline-start: 0;
    }
    .acc-btn,
    .ics-my-subscription .ics-button {
        width: 100%;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acc-btn,
    .acc-link,
    .ics-my-subscription .ics-button {
        transition: none !important;
    }
}
