/* Phase 9 customer-facing license dashboard.
 * Brand palette (Argon-style):
 *   --primary   #ad71e0     --info      #1d8cf8
 *   --success   #00f2c3     --danger    #fd5d93
 *   --warning   #ff8d72     --gray-dark #32325d
 *   --secondary #f4f5f7     --lighter   #e9ecef
 *   --default   #344675
 */

.xabcd-licenses-dashboard {
    --xl-primary:   #ad71e0;
    --xl-primary-d: #8c52c4;
    --xl-info:      #1d8cf8;
    --xl-success:   #00f2c3;
    --xl-danger:    #fd5d93;
    --xl-warning:   #ff8d72;
    --xl-dark:      #32325d;
    --xl-default:   #344675;
    --xl-muted:     #8898aa;
    --xl-line:      #e9ecef;
    --xl-soft:      #f4f5f7;

    /* Distance the product jump-nav leaves above a card when scrolling to
       it, so a fixed site header doesn't cover the card heading. Exposed
       as a custom property so the site owner can retune it from the theme
       CSS (Cornerstone) without editing the plugin. */
    --xl-nav-offset: 100px;

    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    color: var(--xl-dark);
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.xabcd-licenses-empty {
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 2rem 0 rgba( 136, 152, 170, 0.15 );
    color: var(--xl-muted);
    text-align: center;
}

/* ---------- Product jump-nav ---------- */
/* Grid of icon tiles above the cards. Owned products link to their card's
   anchor; products the customer doesn't own render dimmed with a "Buy"
   tag and link out. Palette is the shared --xl-* set declared above — no
   new colours, and the shell copies .xabcd-license-card exactly so it
   reads as the same component family. JS-free by design. */

.xabcd-product-nav {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 2rem 0 rgba( 136, 152, 170, 0.15 );
    padding: 1.25rem 1.5rem;
    max-width: 100%;
}

.xabcd-product-nav__list {
    display: grid;
    /* auto-FIT, not auto-fill: auto-fill keeps the leftover tracks alive at
       1fr each, which parked the tiles on the left with dead space to the
       right. auto-fit collapses the empty tracks to zero so justify-content
       can centre the ones that actually exist — including a short final
       row. Fixed 112px tracks (rather than minmax(...,1fr)) keep every tile
       the same width whether the row is full or holds two. */
    grid-template-columns: repeat( auto-fit, 112px );
    justify-content: center;
    /* Row gap is deliberately larger than the column gap: tiles are taller
       than they are wide, so an equal gap reads as cramped vertically. */
    column-gap: 0.75rem;
    row-gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.xabcd-product-nav__item {
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

.xabcd-product-nav__tile {
    position: relative;   /* anchors the "new release" dot */
    /* !important throughout: the host theme (Cornerstone) sets its own
       display/padding on anchors and buttons, which collapsed this flex
       column to a block and left the thumbnails hanging on the left edge.
       text-align + auto margins below mean the tile still centres even if
       something else wins the display battle. */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    gap: 0.5rem;
    height: 100%;
    min-height: 96px;
    padding: 0.75rem 0.5rem !important;
    border: 1px solid var(--xl-line);
    border-radius: 12px;
    background: #fff;
    color: var(--xl-dark) !important;
    text-decoration: none !important;
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.xabcd-product-nav__tile:focus {
    border-color: var(--xl-primary);
    box-shadow: 0 0 1rem 0 rgba( 136, 152, 170, 0.25 );
    text-decoration: none !important;
}

/* Lift only on real pointer devices. On touch, :hover latches after a tap
   and would leave a tile stuck in its raised state. */
@media ( hover: hover ) {
    .xabcd-product-nav__tile:hover {
        border-color: var(--xl-primary);
        box-shadow: 0 0 1rem 0 rgba( 136, 152, 170, 0.25 );
        transform: translateY( -2px );
        text-decoration: none !important;
    }
}

.xabcd-product-nav__tile:focus-visible {
    outline: 2px solid var(--xl-primary);
    outline-offset: 2px;
}

.xabcd-product-nav__thumb {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    margin-left: auto;    /* centres even if the flex column is overridden */
    margin-right: auto;
}

.xabcd-product-nav__thumb img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    /* Product art is square-cropped; a small radius softens the tile grid
       without reading as a rounded avatar. The letter placeholder below
       matches so the two never sit side by side at different radii. */
    border-radius: 5px;
}

/* ---------- Hover preview ----------
   Pointing at a tile floats a larger copy of the product art ABOVE it. It
   deliberately never overlaps the tile: the artwork, name and tag stay
   readable while the preview is open, which is the whole point — the
   customer is looking at the thing they're pointing at.

   Confined to @media (hover: hover) and (pointer: fine):
     - on touch, :hover latches after a tap and would leave a preview
       stranded on screen with no way to dismiss it;
     - the <=600px layout turns the list into an overflow-x scroll strip,
       and per spec a non-visible overflow-x forces overflow-y to clip too,
       so an absolutely positioned preview would be cut off inside it.
   Excluding both cases is simpler and more correct than fighting either. */
.xabcd-product-nav__zoom {
    display: none;
}

@media ( hover: hover ) and ( pointer: fine ) {
    .xabcd-product-nav__zoom {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        /* Anchored to the TILE (the nearest positioned ancestor), not the
           48px thumb, so "above the tile" means clear of the name and tag
           rather than just clear of the artwork. */
        bottom: calc( 100% + 8px );
        left: 50%;
        width: 148px;
        height: 148px;
        padding: 8px;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid var(--xl-line);
        border-radius: 10px;
        box-shadow: 0 8px 24px rgba( 50, 50, 93, 0.18 ), 0 3px 8px rgba( 0, 0, 0, 0.08 );
        /* Never intercept the click — the tile underneath is the link. */
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transform: translateX( -50% ) scale( 0.86 );
        transform-origin: bottom center;
        transition: opacity 0.13s ease, transform 0.13s ease, visibility 0s linear 0.13s;
        z-index: 20;
    }

    .xabcd-product-nav__zoom img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
        display: block;
        border-radius: 5px;
    }

    .xabcd-product-nav__tile:hover .xabcd-product-nav__zoom,
    .xabcd-product-nav__tile:focus-visible .xabcd-product-nav__zoom {
        opacity: 1;
        visibility: visible;
        transform: translateX( -50% ) scale( 1 );
        transition: opacity 0.13s ease, transform 0.13s ease, visibility 0s;
    }

    /* Lift the hovered tile above its neighbours so the preview isn't
       painted under the tiles that come later in the DOM. */
    .xabcd-product-nav__tile:hover,
    .xabcd-product-nav__tile:focus-visible {
        z-index: 21;
    }

}

@media ( hover: hover ) and ( pointer: fine ) and ( prefers-reduced-motion: reduce ) {
    .xabcd-product-nav__zoom {
        transition: none;
        transform: translateX( -50% );
    }
    .xabcd-product-nav__tile:hover .xabcd-product-nav__zoom,
    .xabcd-product-nav__tile:focus-visible .xabcd-product-nav__zoom {
        transform: translateX( -50% );
    }
}

.xabcd-product-nav__thumb--letter {
    border-radius: 5px;
    background: var(--xl-soft);
    color: var(--xl-muted);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.xabcd-product-nav__name {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    /* Three lines at a smaller size: two lines truncated several distinct
       products to the same string ("XABCD Pattern Suit…" three times over),
       which made the tiles indistinguishable. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
    word-break: break-word;
}

/* Unowned products — dashed, with a Buy pill.
   The wash is applied to the ARTWORK and the label only, never to the
   whole tile: fading the tile also faded the pill, so the one element
   that's a call to action came out the weakest thing on the card. Owned
   tiles get no wash at all — a product you paid for shouldn't look
   greyed out. */
.xabcd-product-nav__tile--available {
    border-style: dashed;
}

.xabcd-product-nav__tile--available .xabcd-product-nav__thumb {
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.xabcd-product-nav__tile--available .xabcd-product-nav__name {
    color: var(--xl-muted) !important;
}

.xabcd-product-nav__tile--available:focus .xabcd-product-nav__thumb {
    opacity: 1;
}

@media ( hover: hover ) {
    /* Bring the artwork back to full strength on hover. */
    .xabcd-product-nav__tile--available:hover .xabcd-product-nav__thumb { opacity: 1; }
    .xabcd-product-nav__tile--available:hover .xabcd-product-nav__name { color: var(--xl-dark) !important; }

    /* Free/Add hover: a barely-there grey wash, not a solid fill. */
    .xabcd-product-nav__tile--add:hover,
    .xabcd-product-nav__tile--free:hover,
    button.xabcd-product-nav__tile--add:hover {
        background: rgba( 108, 117, 125, 0.10 ) !important;
        border-color: rgba( 108, 117, 125, 0.75 );
    }
}

/* "New release" dot — the tile-sized echo of the card's Recently Updated
   badge, same --xl-danger red. Deliberately a dot rather than a text pill:
   a pill in the tag slot would add ~26px to EVERY tile (grid rows stretch
   to the tallest), and on mobile it would be clipped by the strip's
   overflow-y. Positioned inside the tile's padding box so nothing
   overhangs the scroll container. The adjacent visually-hidden text is
   what screen readers announce. */
.xabcd-product-nav__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--xl-danger);
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

.xabcd-product-nav__tile--added .xabcd-product-nav__dot {
    box-shadow: 0 0 0 2px var(--xl-soft);   /* tile background is tinted */
}

/* Staged-product marker: an amber dot in the TOP-LEFT corner (the
   top-right is the new-release dot, so they never collide). Only an admin
   ever sees a tile carrying this — customers are filtered out server-side
   — so it's a reminder that the product isn't public yet. */
.xabcd-product-nav__staged {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--xl-warning);
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

.xabcd-product-nav__tile--adminonly {
    border-color: var(--xl-warning);
    border-style: dashed;
}

/* A free tile is a real <form>/<button>, so the button needs to shed all
   native button chrome and match the anchor tiles exactly. */
.xabcd-product-nav__form {
    margin: 0;
    padding: 0;
    height: 100%;
}

button.xabcd-product-nav__tile,
button.xabcd-product-nav__tile:hover,
button.xabcd-product-nav__tile:focus,
button.xabcd-product-nav__tile:active {
    width: 100%;
    font: inherit;
    /* Pinned with !important: the host theme styles button:hover with its
       own solid brand fill and a text-shadow, which turned the whole Add
       tile green with shadowed text. The tint below is ours instead. */
    background: #fff !important;
    color: var(--xl-dark) !important;
    text-shadow: none !important;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    text-align: center;
}

/* Belt-and-braces: no theme text-shadow anywhere inside a tile. */
.xabcd-product-nav__tile,
.xabcd-product-nav__tile * {
    text-shadow: none !important;
}

/* Free / Added tiles read as an offer, not something withheld, so they
   keep a solid border and full contrast. */
.xabcd-product-nav__tile--free,
.xabcd-product-nav__tile--add,
.xabcd-product-nav__tile--added {
    border-style: solid;
}

/* A free product is an offer, not something withheld — show its artwork
   and label at full strength even though it isn't owned yet. */
.xabcd-product-nav__tile--free .xabcd-product-nav__thumb,
.xabcd-product-nav__tile--add .xabcd-product-nav__thumb,
.xabcd-product-nav__tile--added .xabcd-product-nav__thumb {
    opacity: 1;
}

.xabcd-product-nav__tile--free .xabcd-product-nav__name,
.xabcd-product-nav__tile--add .xabcd-product-nav__name {
    color: var(--xl-dark) !important;
}

.xabcd-product-nav__tile--free,
.xabcd-product-nav__tile--add {
    border-color: rgba( 108, 117, 125, 0.45 );
}

.xabcd-product-nav__tile--added {
    background: var(--xl-soft);
    color: var(--xl-muted) !important;
    cursor: default;
}

.xabcd-product-nav__tag {
    /* Full strength regardless of the tile's state — this is the call to
       action, so it must never be the faintest thing on the card. */
    opacity: 1 !important;
    /* Pin the pill to the bottom of the tile. Grid rows already stretch
       tiles to equal height, so this makes every pill in a row sit on the
       same line no matter whether its name wrapped to 1, 2 or 3 lines —
       without that, each pill floated wherever its name happened to end. */
    margin-top: auto;
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--xl-primary);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.xabcd-product-nav__tag--free,
.xabcd-product-nav__tag--add {
    /* Neutral grey rather than green: green competed with the purple Buy
       pills for attention. Solid, so it keeps the same visual weight.
       White on #6c757d is 4.68:1 — fine for 10px bold. */
    background: #6c757d;
    color: #ffffff !important;
}

.xabcd-product-nav__tag--added {
    background: var(--xl-muted);
}

/* Claim result banner, shown once after the redirect. */
.xabcd-product-nav__notice {
    margin: 0;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    border-left: 4px solid var(--xl-muted);
    background: #fff;
    box-shadow: 0 0 2rem 0 rgba( 136, 152, 170, 0.15 );
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--xl-dark);
}

.xabcd-product-nav__notice.is-ok    { border-left-color: #2dce89; }
.xabcd-product-nav__notice.is-error { border-left-color: var(--xl-danger); }

/* Visually hidden, still announced. Own class rather than relying on the
   theme defining .screen-reader-text. */
.xabcd-product-nav__sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect( 0, 0, 0, 0 );
    white-space: nowrap;
    border: 0;
}

/* ---------- Card shell ---------- */

.xabcd-license-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 2rem 0 rgba( 136, 152, 170, 0.15 );
    padding: 1.75rem 2rem;
    border: 0;
    /* Jump-nav target: keep the heading clear of the fixed site header. */
    scroll-margin-top: var(--xl-nav-offset);
}

/* Smooth scroll only on the pages that carry this dashboard, and only
   when the visitor hasn't asked for reduced motion. Scoped via :has() so
   the plugin never sets scroll-behavior site-wide; browsers without
   :has() simply get an instant jump, which is functionally identical. */
@media ( prefers-reduced-motion: no-preference ) {
    html:has( .xabcd-licenses-dashboard ) {
        scroll-behavior: smooth;
    }
}

.xabcd-license-card__header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--xl-line);
    margin-bottom: 1.25rem;
}

.xabcd-license-card__count {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--xl-primary);
}

.xabcd-license-card__product-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: var(--xl-muted);
}
.xabcd-license-card__product-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
}
.xabcd-license-card__product-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--xl-muted);
}
.xabcd-license-card__product-meta-value {
    color: var(--xl-default);
    font-weight: 600;
    font-family: "SF Mono", Menlo, Consolas, ui-monospace, monospace;
    font-size: 0.85rem;
}

/* License block — repeats inside the card when the customer owns the
   same product more than once. Single-license cards just render one. */
.xabcd-license-card__license + .xabcd-license-card__license {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--xl-line);
}

.xabcd-license-card__license-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.xabcd-license-card__license-num {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--xl-default);
    background: var(--xl-soft);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
}

.xabcd-license-card__image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba( 50, 50, 93, 0.11 ), 0 1px 3px rgba( 0, 0, 0, 0.08 );
}

.xabcd-license-card__title {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.xabcd-license-card__title h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--xl-dark);
    letter-spacing: -0.01em;
}

/* ---------- Subscription badge ---------- */

.xabcd-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: fit-content;
    color: #fff;
}
.xabcd-badge--active    { background: var(--xl-success); color: #11355a; }
.xabcd-badge--lifetime  { background: var(--xl-info); }
.xabcd-badge--expired   { background: var(--xl-muted); }
.xabcd-badge--cancelled { background: var(--xl-danger); }
.xabcd-badge--on-hold,
.xabcd-badge--pending,
.xabcd-badge--unknown   { background: var(--xl-warning); }
/* "Recently updated" — solid Danger so it stands out next to LIFETIME. */
.xabcd-badge--updated { background: var(--xl-danger); color: #fff; }

/* Sits in the card header next to Version / Updated / Product ID, so it
   needs its own top margin — the per-license badges get theirs from the
   flex row they used to share. */
.xabcd-license-card__header-badge {
    display: inline-flex;
    margin-top: 0.4rem;
}

/* ---------- Subscription meta ---------- */

.xabcd-license-card__sub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.5rem;
    margin: 0 0 1rem;
    padding: 0.6rem 0.85rem;
    background: rgba( 173, 113, 224, 0.06 );
    border-left: 3px solid var(--xl-primary);
    border-radius: 0 6px 6px 0;
}
.xabcd-license-card__sub-meta-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.85rem;
}
.xabcd-license-card__sub-meta-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--xl-muted);
}
.xabcd-license-card__sub-meta-value {
    color: var(--xl-dark);
    font-weight: 600;
}
.xabcd-license-card__sub-meta-manage {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--xl-primary) !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color 0.15s ease;
}
.xabcd-license-card__sub-meta-manage:hover,
.xabcd-license-card__sub-meta-manage:focus {
    color: #6c4ab8 !important;
}
.xabcd-license-card__sub-meta-manage:hover span,
.xabcd-license-card__sub-meta-manage:focus span {
    transform: translateX( 2px );
    transition: transform 0.15s ease;
}

/* ---------- Key row ---------- */

.xabcd-license-card__keyrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    background: var(--xl-soft);
    border-radius: 8px;
    margin-bottom: 1.25rem;
}

.xabcd-license-card__label {
    font-weight: 600;
    color: var(--xl-default);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

.xabcd-license-card__key {
    flex: 1;
    min-width: 0;
    font-family: "SF Mono", Menlo, Consolas, ui-monospace, monospace;
    font-size: 0.95rem;
    color: var(--xl-dark);
    background: #fff;
    border: 1px solid var(--xl-line);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    user-select: all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.xabcd-license-card__show,
.xabcd-license-card__copy {
    background: #fff;
    border: 1px solid var(--xl-line);
    color: var(--xl-default);
    border-radius: 6px;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}
.xabcd-license-card__show:hover,
.xabcd-license-card__copy:hover {
    background: var(--xl-primary);
    border-color: var(--xl-primary);
    color: #fff;
}

/* ---------- Activation counter ---------- */

.xabcd-license-card__counter {
    margin-bottom: 1.25rem;
}
.xabcd-license-card__counter p {
    margin: 0 0 0.5rem;
    color: var(--xl-default);
    font-size: 0.85rem;
    font-weight: 600;
}
.xabcd-license-card__bar {
    width: 100%;
    height: 6px;
    background: var(--xl-soft);
    border-radius: 999px;
    overflow: hidden;
}
.xabcd-license-card__bar-fill {
    height: 100%;
    background: linear-gradient( 87deg, var(--xl-primary) 0, var(--xl-info) 100% );
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* ---------- Devices ---------- */

.xabcd-license-card__devices h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin: 0 0 0.65rem;
    color: var(--xl-default);
}

.xabcd-license-card__device-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.xabcd-license-card__empty {
    color: var(--xl-muted);
    font-style: italic;
    margin: 0;
    font-size: 0.9rem;
}

.xabcd-device {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--xl-soft);
    border-radius: 8px;
    border: 0;
}

.xabcd-device__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.25rem;
    font-size: 0.8rem;
    color: var(--xl-default);
}

.xabcd-device__name {
    font-weight: 700;
    color: var(--xl-dark);
    font-size: 0.9rem;
}
.xabcd-device__name--unnamed {
    font-weight: 600;
    color: var(--xl-muted);
    font-style: italic;
}

.xabcd-device__rename {
    background: transparent;
    border: 0;
    color: var(--xl-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 0;
    margin-right: 0.25rem;
}
.xabcd-device__rename:hover {
    color: #6c4ab8;
    text-decoration: underline;
}

.xabcd-device__rename-form {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.xabcd-device__rename-form[hidden] { display: none; }

.xabcd-device__rename-input {
    border: 1px solid var(--xl-line);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--xl-dark);
    min-width: 14rem;
    background: #fff;
}
.xabcd-device__rename-input:focus {
    outline: 0;
    border-color: var(--xl-primary);
    box-shadow: 0 0 0 3px rgba( 173, 113, 224, 0.15 );
}

.xabcd-device__rename-save,
.xabcd-device__rename-cancel {
    background: #fff;
    border: 1px solid var(--xl-line);
    color: var(--xl-default);
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.xabcd-device__rename-save {
    color: #2dce89;
    border-color: #2dce89;
}
.xabcd-device__rename-save:hover {
    background: #2dce89;
    color: #fff;
    border-color: #2dce89;
}
.xabcd-device__rename-save:disabled { opacity: 0.6; cursor: not-allowed; }
.xabcd-device__rename-cancel:hover { background: var(--xl-soft); color: var(--xl-dark); }

.xabcd-device__outdated {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba( 253, 93, 147, 0.14 );
    /* Same colour as the "Remove Activation" text on the same row, so the
       two device-level controls read as one family. */
    color: var(--xl-danger);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Minimum supported version. Shares the pill shape of the Outdated badge
   beside it, but carries its own weight: "Outdated" is informational, this is
   a deadline. Amber inside the notice period, red once the cutoff has passed. */
.xabcd-device__cutoff {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: help;
}

.xabcd-device__cutoff--warning {
    background: rgba( 224, 168, 0, 0.16 );
    color: #8a6100;
}

.xabcd-device__cutoff--expired {
    background: rgba( 253, 93, 147, 0.22 );
    color: var(--xl-danger);
}

.xabcd-device__seen {
    color: var(--xl-muted);
}

.xabcd-device__remove {
    background: transparent;
    border: 1px solid var(--xl-danger);
    color: var(--xl-danger);
    border-radius: 6px;
    padding: 0.35rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.15s ease;
}
.xabcd-device__remove:hover {
    background: var(--xl-danger);
    color: #fff;
}
.xabcd-device__remove:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Action buttons (Download + info pages) ---------- */

.xabcd-license-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--xl-line);
    align-items: center;
}

.xabcd-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    box-sizing: border-box;
}
.xabcd-button:hover  { text-decoration: none; }

/* Primary download button — brand purple, the can't-miss CTA.
   The theme uses !important on some link/font rules (see body styles
   like `font-size: var(--cs-base) !important`), so the colour declarations
   below also use !important to win specificity unconditionally. The
   selector still scopes everything under .xabcd-licenses-dashboard so it
   can't leak elsewhere. */
.xabcd-licenses-dashboard a.xabcd-button--download,
.xabcd-licenses-dashboard a.xabcd-button--download:link,
.xabcd-licenses-dashboard a.xabcd-button--download:visited,
.xabcd-licenses-dashboard a.xabcd-button--download .xabcd-button__icon,
.xabcd-licenses-dashboard a.xabcd-button--download .xabcd-button__label {
    color: #fff !important;
}
.xabcd-button--download {
    background: linear-gradient( 87deg, var(--xl-primary) 0, #8965e0 100% );
    border: 0;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 6px rgba( 50, 50, 93, 0.11 ), 0 1px 3px rgba( 0, 0, 0, 0.08 );
    text-decoration: none;
}
.xabcd-licenses-dashboard a.xabcd-button--download:hover,
.xabcd-licenses-dashboard a.xabcd-button--download:focus,
.xabcd-licenses-dashboard a.xabcd-button--download:hover .xabcd-button__icon,
.xabcd-licenses-dashboard a.xabcd-button--download:hover .xabcd-button__label,
.xabcd-licenses-dashboard a.xabcd-button--download:focus .xabcd-button__icon,
.xabcd-licenses-dashboard a.xabcd-button--download:focus .xabcd-button__label {
    color: #ffffff !important;
}
.xabcd-button--download:hover,
.xabcd-button--download:focus {
    background: linear-gradient( 87deg, #9a5fd1 0, #7a52d4 100% );
    transform: translateY( -1px );
    box-shadow: 0 7px 14px rgba( 50, 50, 93, 0.1 ), 0 3px 6px rgba( 0, 0, 0, 0.08 );
    text-decoration: none;
}
.xabcd-button__icon {
    font-size: 0.95rem;
    line-height: 1;
}

/* Secondary info buttons — outlined, take on brand color on hover. */
.xabcd-button--info {
    background: #fff;
    color: var(--xl-default);
    border: 1px solid var(--xl-line);
    padding: 0.6rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.xabcd-button--info:hover,
.xabcd-button--info:focus {
    background: var(--xl-primary);
    color: #fff;
    border-color: var(--xl-primary);
    transform: translateY( -1px );
}

/* ---------- Responsive ---------- */

@media ( max-width: 600px ) {
    /* Product nav on phones: a horizontally-swipeable strip (1 row, or 2
       rows once there are 7+ products) instead of the wrapping grid.
       Measured on a 375px viewport: a wrapping grid of 19 products is
       ~648px tall — the entire phone viewport before the first license
       card. The 2-row strip is ~176px and halves the swipe distance.
       No JS, no collapse widget. */
    .xabcd-licenses-dashboard {
        --xl-nav-offset: 72px;   /* mobile site header is shorter */
    }

    .xabcd-product-nav {
        padding: 1rem;
    }

    .xabcd-product-nav__list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 84px;
        /* Never centre a horizontal scroll container — an overflowing
           centred grid hides its first items past the scroll origin. */
        justify-content: start;
        column-gap: 0.5rem;
        /* Explicit row-gap: with 7+ products the strip becomes two rows
           (below), and the rows need real separation to read as a grid
           rather than a stack. */
        row-gap: 0.625rem;
        overflow-x: auto;
        /* Per spec, setting one axis to a non-visible value computes the
           OTHER axis to auto — which would add a phantom vertical
           scrollbar and clip the tiles. Pin it explicitly. */
        overflow-y: hidden;
        /* overflow-x lives on the LIST only, and the nav shell is
           max-width:100%, so the page body never scrolls sideways. */
        overscroll-behavior-x: contain;   /* don't trigger back-swipe */
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
        padding-bottom: 0.25rem;
    }

    /* Two rows once there are enough products to warrant it. 19 products
       go from 19 columns (~5.6 swipes) to 10 (~2.9) while the nav stays
       ~176px tall — a wrapping grid would be ~648px, i.e. the whole phone
       viewport before the first license card. Fewer than 7 products stay
       on a single row so the second row isn't left half-empty. */
    .xabcd-product-nav__list:has( > .xabcd-product-nav__item:nth-child( 7 ) ) {
        grid-template-rows: repeat( 2, 1fr );
    }

    .xabcd-product-nav__tile {
        scroll-snap-align: start;
        min-height: 84px;          /* comfortably above the 44px touch min */
        padding: 0.6rem 0.35rem;
    }

    .xabcd-product-nav__thumb {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .xabcd-product-nav__name {
        font-size: 0.65rem;
    }

    .xabcd-license-card {
        padding: 1.25rem;
    }
    .xabcd-license-card__header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .xabcd-device {
        flex-direction: column;
        align-items: flex-start;
    }
    .xabcd-button--download {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Suspended state (Phase 12) ---------- */

.xabcd-license-card__license.is-suspended .xabcd-license-card__keyrow,
.xabcd-license-card__license.is-suspended .xabcd-license-card__counter {
    opacity: 0.5;
}

.xabcd-license-card__suspended {
    background: #fdf6f6;
    border: 1px solid #f1c1c1;
    border-left: 4px solid #b32d2e;
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
    border-radius: 4px;
}

.xabcd-license-card__suspended strong {
    color: #b32d2e;
    display: block;
    margin-bottom: 0.25rem;
}

.xabcd-license-card__suspended p {
    margin: 0;
    color: #4a4a4a;
}

/* ---------- Confirm modal (Phase 1.7.5) ---------- */
/* Replaces native window.confirm() with a branded, accessible
   in-page dialog. Built dynamically by licenses.js — no markup in
   the template. Backdrop and wrapper are DOM siblings so opacity
   transitions on the backdrop don't bleed into the modal card. */

/* The brand palette is normally scoped to .xabcd-licenses-dashboard,
   but the modal is appended to document.body — outside that scope.
   Without these declarations every var(--xl-*) inside the modal
   resolves to nothing, so the buttons render with the host theme's
   default button colours (frequently white-on-white). Re-declare
   the palette on both modal roots so the rest of this block can
   keep using the same variable names. */
.xabcd-modal-backdrop,
.xabcd-modal-wrap {
    --xl-primary:   #ad71e0;
    --xl-primary-d: #8c52c4;
    --xl-danger:    #fd5d93;
    --xl-success:   #00f2c3;
    --xl-muted:     #8898aa;
    --xl-soft:      #f4f5f7;
    --xl-line:      #e9ecef;
    --xl-dark:      #32325d;
}

.xabcd-modal-backdrop {
    position: fixed;
    inset: 0;
    /* Animate background-color (not opacity) so the modal — which
       sits in a separate sibling wrapper — never inherits any
       transparency. */
    background-color: rgba( 20, 22, 50, 0 );
    z-index: 99998;
    pointer-events: none;
    transition: background-color 0.2s ease;
}
.xabcd-modal-backdrop.is-open {
    background-color: rgba( 20, 22, 50, 0.65 );
    pointer-events: auto;
}

.xabcd-modal-wrap {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;
    pointer-events: none; /* only the card captures clicks */
    opacity: 0;
    transition: opacity 0.15s ease;
}
.xabcd-modal-wrap.is-open { opacity: 1; }

.xabcd-modal {
    /* Outer wrapper IS the gradient border. The inner element is
       solid white. This is more robust than the two-layer
       background trick (`linear-gradient(#fff,#fff) padding-box`)
       which some themes — notably purple/dark Creative Tim variants
       — silently blend or override, leaving the modal looking
       washed out. With an inner element + !important on its
       background, the white can't be defeated. */
    pointer-events: auto;
    max-width: 460px;
    width: 100%;
    padding: 2px; /* the visible "border" width */
    border-radius: 14px;
    background: linear-gradient( 135deg, var( --xl-primary ), var( --xl-primary-d ) ) !important;
    /* Heavier shadow so the bright card lifts off the dark backdrop. */
    box-shadow:
        0 25px 80px rgba( 0, 0, 0, 0.55 ),
        0 10px 25px rgba( 0, 0, 0, 0.35 );
    color: var( --xl-dark );
    font-family: inherit;
    line-height: 1.5;
    transform: translateY( 12px ) scale( 0.96 );
    transition: transform 0.2s ease;
}
.xabcd-modal-wrap.is-open .xabcd-modal {
    transform: translateY( 0 ) scale( 1 );
}

.xabcd-modal__inner {
    background: #fff !important;
    background-color: #fff !important;
    border-radius: 12px; /* slightly inset from the outer 14px */
    padding: 1.75rem 1.75rem 1.5rem;
    /* Defensive — block any inherited filter / opacity from the
       host theme that would dim the card. */
    opacity: 1 !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    mix-blend-mode: normal !important;
}

.xabcd-modal__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
    color: var( --xl-dark );
    line-height: 1.3;
}
.xabcd-modal__body {
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    color: #495163;
    word-wrap: break-word;
}
.xabcd-modal__body strong { color: var( --xl-dark ); }

.xabcd-modal__actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Modal buttons — every colour/border state is !important because
   host themes (Creative Tim / Bootstrap-derived themes especially)
   apply blanket button rules that win the cascade and leave the
   confirm button white-on-white on hover. Locking the four states
   (cancel rest, cancel hover, confirm rest, confirm hover) makes
   the cards consistent across every WP theme we deploy to. */
.xabcd-modal__btn {
    /* Match .xabcd-device__remove exactly so the modal confirm
       button is a visual clone of the trigger button on the device
       row. Padding and line-height now match: was 0.5rem 1.1rem /
       1.2; now 0.35rem 0.85rem / 1.8. The two buttons should read
       as the same widget at rest, and the confirm button should
       fill pink with white text on hover just like the trigger. */
    border-radius: 6px !important;
    padding: 0.35rem 0.85rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    background-color: transparent !important;
    color: inherit;
    font-family: inherit !important;
    text-shadow: none !important;
    box-shadow: none !important;
    opacity: 1 !important;
    line-height: 1.8 !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
}
.xabcd-modal__btn--cancel,
.xabcd-modal__btn--cancel:link,
.xabcd-modal__btn--cancel:visited {
    border-color: var( --xl-muted ) !important;
    color: var( --xl-muted ) !important;
    background: transparent !important;
    background-color: transparent !important;
}
.xabcd-modal__btn--cancel:hover,
.xabcd-modal__btn--cancel:focus,
.xabcd-modal__btn--cancel:active {
    background: var( --xl-soft ) !important;
    background-color: var( --xl-soft ) !important;
    color: var( --xl-dark ) !important;
    border-color: var( --xl-muted ) !important;
}
.xabcd-modal__btn--confirm,
.xabcd-modal__btn--confirm:link,
.xabcd-modal__btn--confirm:visited {
    border-color: var( --xl-danger ) !important;
    color: var( --xl-danger ) !important;
    background: transparent !important;
    background-color: transparent !important;
}
.xabcd-modal__btn--confirm:hover,
.xabcd-modal__btn--confirm:focus,
.xabcd-modal__btn--confirm:active {
    background: var( --xl-danger ) !important;
    background-color: var( --xl-danger ) !important;
    color: #fff !important;
    border-color: var( --xl-danger ) !important;
}
.xabcd-modal__btn:focus {
    outline: 2px solid var( --xl-primary ) !important;
    outline-offset: 2px !important;
}

@media ( max-width: 480px ) {
    .xabcd-modal__actions { flex-direction: column-reverse; }
    .xabcd-modal__btn { width: 100%; }

    /* Tighter strip on the smallest screens. Labels are kept at every
       breakpoint — a row of similar-looking XABCD icons is unusable
       without names. */
    .xabcd-product-nav__list { grid-auto-columns: 76px; }
    .xabcd-product-nav__thumb { width: 36px; height: 36px; flex-basis: 36px; }
}

/* ---------- Grace-period cooldown badge (Phase 1.7.10) ---------- */
/* Injected by licenses.js into .xabcd-license-card__counter when a
   recent self-deactivate is still within the configured grace
   window. Updates every 1s via setTimeout in the JS. Styled to
   match the existing .xabcd-license-card__sub-meta panel pattern
   (subtle purple-tinted background, left border) so it reads as a
   contextual status chip rather than a hero banner. */

.xabcd-license-card__cooldown {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin: 0.6rem 0 0;
    padding: 0.4rem 0.85rem;
    border-radius: 0 6px 6px 0;
    background: rgba( 173, 113, 224, 0.10 );
    border-left: 3px solid var( --xl-primary );
    color: var( --xl-dark );
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
}
.xabcd-license-card__cooldown.is-ready {
    background: rgba( 0, 242, 195, 0.18 );
    border-left-color: var( --xl-success );
    color: #0c4a3d;
}

/* ---------- MT4 / MT5 broker account section (1.8.0 MT5, 1.9.0 MT4) ----------
   Each rule covers both .__mt5* and .__mt4* via a selector list so the
   two platform forms share one source of truth visually while the
   markup, JS, and REST namespaces stay parallel. */

.xabcd-license-card__mt5,
.xabcd-license-card__mt4 {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    background: var(--xl-soft);
    border-radius: 8px;
}

.xabcd-license-card__mt5 h4,
.xabcd-license-card__mt4 h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin: 0;
    color: var(--xl-default);
}

.xabcd-license-card__mt5-help,
.xabcd-license-card__mt4-help {
    margin: 0;
    font-size: 0.85rem;
    color: var(--xl-muted);
    line-height: 1.4;
}

.xabcd-license-card__mt5-display,
.xabcd-license-card__mt4-display {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

/* Inline the Account # and Activated rows so they share a single
   line. On narrow viewports they wrap naturally. */
.xabcd-license-card__mt5-info,
.xabcd-license-card__mt4-info {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.xabcd-license-card__mt5-row,
.xabcd-license-card__mt4-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.xabcd-license-card__mt5-row--meta,
.xabcd-license-card__mt4-row--meta {
    font-size: 0.85rem;
    color: var(--xl-muted);
}

.xabcd-license-card__mt5-label,
.xabcd-license-card__mt4-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--xl-muted);
}

.xabcd-license-card__mt5-value,
.xabcd-license-card__mt4-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    color: var(--xl-dark);
    background: transparent;
    padding: 0;
}

.xabcd-license-card__mt5-actions,
.xabcd-license-card__mt4-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.xabcd-license-card__mt5-form,
.xabcd-license-card__mt4-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.xabcd-license-card__mt5-field,
.xabcd-license-card__mt4-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.xabcd-license-card__mt5-field input[type="text"],
.xabcd-license-card__mt4-field input[type="text"] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--xl-line);
    border-radius: 6px;
    background: #fff;
    color: var(--xl-dark);
    max-width: 260px;
}

.xabcd-license-card__mt5-field input[type="text"]:focus,
.xabcd-license-card__mt4-field input[type="text"]:focus {
    outline: none;
    border-color: var(--xl-primary);
    box-shadow: 0 0 0 3px rgba( 173, 113, 224, 0.18 );
}

.xabcd-license-card__mt5-edit,
.xabcd-license-card__mt5-cancel,
.xabcd-license-card__mt5-remove,
.xabcd-license-card__mt4-edit,
.xabcd-license-card__mt4-cancel,
.xabcd-license-card__mt4-remove {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 0.95rem;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}

/* Save matches the Show / Copy treatment in the License Key row —
   white bg, grey border, primary-fill on hover. !important because
   themes (Cornerstone / Pro / etc.) ship strong button[type="submit"]
   rules that otherwise paint this green or another brand colour. */
.xabcd-license-card__mt5-save,
.xabcd-license-card__mt4-save {
    font: inherit !important;
    background: #fff !important;
    border: 1px solid var(--xl-line) !important;
    color: var(--xl-default) !important;
    border-radius: 6px !important;
    padding: 0.4rem 0.85rem !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    transition: all 0.15s ease !important;
    box-shadow: none !important;
    text-transform: none !important;
}
.xabcd-license-card__mt5-save:hover,
.xabcd-license-card__mt5-save:focus,
.xabcd-license-card__mt4-save:hover,
.xabcd-license-card__mt4-save:focus {
    background: var(--xl-primary) !important;
    border-color: var(--xl-primary) !important;
    color: #fff !important;
    outline: none !important;
}
.xabcd-license-card__mt5-save[disabled],
.xabcd-license-card__mt4-save[disabled] {
    opacity: 0.6 !important;
    cursor: progress !important;
}

.xabcd-license-card__mt5-edit,
.xabcd-license-card__mt4-edit {
    background: #fff;
    color: var(--xl-primary);
    border-color: var(--xl-line);
}
.xabcd-license-card__mt5-edit:hover,
.xabcd-license-card__mt5-edit:focus,
.xabcd-license-card__mt4-edit:hover,
.xabcd-license-card__mt4-edit:focus {
    border-color: var(--xl-primary);
    background: #faf5fe;
    outline: none;
}

.xabcd-license-card__mt5-cancel,
.xabcd-license-card__mt4-cancel {
    background: transparent;
    color: var(--xl-muted);
    border-color: var(--xl-line);
}
.xabcd-license-card__mt5-cancel:hover,
.xabcd-license-card__mt5-cancel:focus,
.xabcd-license-card__mt4-cancel:hover,
.xabcd-license-card__mt4-cancel:focus {
    color: var(--xl-default);
    border-color: var(--xl-default);
    outline: none;
}

.xabcd-license-card__mt5-remove,
.xabcd-license-card__mt4-remove {
    background: #fff;
    color: var(--xl-danger);
    border-color: var(--xl-line);
}
.xabcd-license-card__mt5-remove:hover,
.xabcd-license-card__mt5-remove:focus,
.xabcd-license-card__mt4-remove:hover,
.xabcd-license-card__mt4-remove:focus {
    background: var(--xl-danger);
    color: #fff;
    border-color: var(--xl-danger);
    outline: none;
}

.xabcd-license-card__mt5-error,
.xabcd-license-card__mt4-error {
    margin: 0;
    font-size: 0.85rem;
    color: var(--xl-danger);
    background: rgba( 253, 93, 147, 0.08 );
    border-left: 3px solid var(--xl-danger);
    padding: 0.5rem 0.7rem;
    border-radius: 4px;
}

/* ---------- AI credits table ([xabcd_ai_credits] shortcode) ---------- */
/* Standalone (can render outside the dashboard), so brand colors are inlined
 * rather than referencing the .xabcd-licenses-dashboard-scoped --xl-* vars. */

.xabcd-ai-credits-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 640px;
    background: #fff;
    color: #32325d;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 2rem 0 rgba( 136, 152, 170, 0.15 );
}

.xabcd-ai-credits-table th,
.xabcd-ai-credits-table td {
    padding: 0.65rem 0.9rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.xabcd-ai-credits-table thead th {
    background: #f4f5f7;
    color: #8898aa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.xabcd-ai-credits-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.xabcd-ai-credits-table .xabcd-ai-credits-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.xabcd-ai-credits-table .xabcd-ai-credits-source {
    font-weight: 600;
    color: #8c52c4;
}

.xabcd-ai-credits-table .xabcd-ai-credits-exp {
    color: #525f7f;
}

.xabcd-ai-credits-table tfoot th,
.xabcd-ai-credits-table tfoot td {
    background: #fff;
    font-weight: 700;
    color: #32325d;
    border-top: 2px solid #e9ecef;
    border-bottom: 0;
}

.xabcd-ai-credits-empty,
.xabcd-ai-credits-login {
    padding: 1.25rem;
    max-width: 640px;
    background: #f4f5f7;
    border-radius: 12px;
    color: #8898aa;
    text-align: center;
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
