/*
 * HG License Manager – My Account > Licenses
 *
 * No fixed colors: backgrounds are transparent and borders/tints are derived
 * from the theme's text color (currentColor), so the page follows light and
 * dark themes automatically. Buttons use the theme's own .button styles.
 */
.hg-lm-licenses,
.hg-lm-order-licenses {
    --hg-lm-border: rgba(128, 128, 128, .28);
    --hg-lm-tint: rgba(128, 128, 128, .08);
    --hg-lm-muted-opacity: .7;
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
    .hg-lm-licenses,
    .hg-lm-order-licenses {
        --hg-lm-border: color-mix(in srgb, currentColor 18%, transparent);
        --hg-lm-tint: color-mix(in srgb, currentColor 6%, transparent);
    }
}

.hg-lm-intro { margin-bottom: 1.25em; opacity: var(--hg-lm-muted-opacity, .7); }

.hg-lm-licenses { display: grid; gap: 18px; }

.hg-lm-card {
    border: 1px solid var(--hg-lm-border);
    border-radius: 10px;
    padding: 18px 20px;
    background: transparent;
    color: inherit;
}
.hg-lm-card--expired,
.hg-lm-card--inactive { opacity: .8; }

.hg-lm-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.hg-lm-card__title { margin: 0 0 2px; font-size: 1.1em; line-height: 1.4; color: inherit; }
.hg-lm-card__version { font-size: .85em; opacity: var(--hg-lm-muted-opacity, .7); }

/* Status badge: theme text color + colored dot + translucent tint. */
.hg-lm-badge {
    --hg-lm-status: #8c8f94;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .8em;
    font-weight: 600;
    color: inherit;
    background: rgba(140, 143, 148, .16);
    border: 1px solid rgba(140, 143, 148, .35);
}
.hg-lm-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hg-lm-status);
    flex: none;
}
.hg-lm-badge--active    { --hg-lm-status: #22a35a; background: rgba(34, 163, 90, .14);  border-color: rgba(34, 163, 90, .4); }
.hg-lm-badge--inactive  { --hg-lm-status: #e0901b; background: rgba(224, 144, 27, .14); border-color: rgba(224, 144, 27, .4); }
.hg-lm-badge--expired   { --hg-lm-status: #e5484d; background: rgba(229, 72, 77, .14);  border-color: rgba(229, 72, 77, .4); }
.hg-lm-badge--scheduled { --hg-lm-status: #3b82f6; background: rgba(59, 130, 246, .14); border-color: rgba(59, 130, 246, .4); }

.hg-lm-key {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 14px;
}
.hg-lm-key__value {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    border-radius: 6px;
    background: var(--hg-lm-tint);
    border: 1px dashed var(--hg-lm-border);
    color: inherit;
    font-family: Consolas, Menlo, Monaco, monospace;
    font-size: .95em;
    word-break: break-all;
    direction: ltr;
    text-align: left;
}
.hg-lm-copy { white-space: nowrap; }
.hg-lm-copy--small { padding: 2px 8px !important; font-size: .8em !important; margin-inline-start: 6px; }

.hg-lm-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 18px;
    margin: 0;
}
.hg-lm-meta dt { font-size: .8em; opacity: var(--hg-lm-muted-opacity, .7); margin: 0; font-weight: normal; color: inherit; }
.hg-lm-meta dd { margin: 2px 0 0; word-break: break-word; color: inherit; }

.hg-lm-card__actions { margin-top: 16px; }

.hg-lm-order-licenses { margin-top: 2em; }
.hg-lm-order-table code {
    direction: ltr;
    background: var(--hg-lm-tint);
    color: inherit;
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 480px) {
    .hg-lm-card { padding: 14px; }
    .hg-lm-key { flex-direction: column; }
}
