/* MyDataTheme - license card, secret reveal control and activation timeline.
   Used on My Licenses, License detail, Devices and Activation history. */

/* -- License card (My Licenses list) -------------------------------------- */

.md-license-card {
    background: var(--md-surface);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-lg);
    padding: 0;
    overflow: hidden;
}
.md-license-card + .md-license-card { margin-top: 16px; }

.md-license-card__head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--md-surface-alt);
    border-bottom: 1px solid var(--md-border);
}
.md-license-card__title { margin: 0 0 2px; font-size: 17px; font-weight: 700; letter-spacing: 0; }
.md-license-card__vendor {
    margin: 0;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--md-muted);
}

.md-license-card__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 20px 24px;
}
@media (max-width: 640px) { .md-license-card__facts { grid-template-columns: minmax(0, 1fr); gap: 12px; } }

.md-license-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--md-border);
}

/* -- Secret reveal --------------------------------------------------------
   The masked form is the rendered default. The real value is never present in
   markup: it is fetched only after a successful re-authentication, so "view
   source" on a My Licenses page can never leak a product key. */

.md-secret {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--md-surface-alt);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-md);
}
.md-secret__value {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 16px;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--md-ink);
    word-break: break-all;
}
.md-secret__note { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--md-muted); }

/* -- Activation timeline --------------------------------------------------
   Marker glyphs come from CSS, not from the rendered text, so the backend only
   has to put the right state modifier on each item: --done renders a check,
   --failed a cross, everything else the hollow "not yet" ring. */

.md-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.md-timeline__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-top: 1px solid var(--md-border);
}
.md-timeline__item:first-child { border-top: 0; padding-top: 0; }
.md-timeline__marker {
    flex: 0 0 20px;
    width: 20px; height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    background: transparent;
    border: 1.5px solid var(--md-border-strong);
    color: var(--md-muted);
}
.md-timeline__marker::before { content: ""; }
.md-timeline__item--done .md-timeline__marker {
    background: var(--md-success);
    border-color: var(--md-success);
    color: #fff;
}
.md-timeline__item--done .md-timeline__marker::before { content: "\2713"; }
.md-timeline__item--current .md-timeline__marker {
    background: var(--md-primary-soft);
    border-color: var(--md-primary);
    color: var(--md-primary-dark);
}
.md-timeline__item--failed .md-timeline__marker {
    background: var(--md-danger);
    border-color: var(--md-danger);
    color: #fff;
}
.md-timeline__item--failed .md-timeline__marker::before { content: "\00D7"; font-size: 14px; }
.md-timeline__label { font-weight: 600; margin: 0; color: var(--md-ink); }
.md-timeline__item--current .md-timeline__label { color: var(--md-primary-dark); }
.md-timeline__meta { margin: 0; font-size: 13px; color: var(--md-muted); }

/* -- Account sub-navigation -----------------------------------------------
   A bordered list with a leading blue marker on the active row - the same
   active-state language the header uses. */

.md-account { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.md-account__nav {
    display: grid;
    gap: 0;
    background: var(--md-surface);
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-lg);
    overflow: hidden;
    position: sticky;
    top: calc(var(--md-header-offset) + 16px);
}
.md-account__nav a {
    padding: 11px 14px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--md-ink-soft);
    border-top: 1px solid var(--md-border);
    border-left: 3px solid transparent;
}
.md-account__nav a:first-child { border-top: 0; }
.md-account__nav a:hover { background: var(--md-surface-alt); text-decoration: none; }
.md-account__nav a[aria-current="page"] {
    background: var(--md-primary-soft);
    border-left-color: var(--md-primary);
    color: var(--md-primary-dark);
    font-weight: 700;
}
/* Sign-out sits in the same bordered list as the nav links, once a real session exists. */
.md-account__nav .md-account__signout { border-top: 1px solid var(--md-border); padding: 8px; }
.md-account__nav .md-account__signout .md-btn { justify-content: flex-start; padding: 3px 6px; }
@media (max-width: 900px) {
    .md-account { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .md-account__nav { position: static; grid-auto-flow: column; overflow-x: auto; }
    .md-account__nav a {
        white-space: nowrap;
        border-top: 0;
        border-left: 1px solid var(--md-border);
        border-bottom: 3px solid transparent;
    }
    .md-account__nav a:first-child { border-left: 0; }
    .md-account__nav a[aria-current="page"] { border-left-color: var(--md-border); border-bottom-color: var(--md-primary); }
    .md-account__nav .md-account__signout { border-top: 0; border-left: 1px solid var(--md-border); }
}

/* -- Guided Activation (lock 2026-09-13 §6) ---------------------------------
   Three stages on one page. The stage strip is plain anchors - no wizard state,
   nothing hidden - so the customer always sees where they are and loses nothing
   on refresh. Only the verification stage gets a visual accent: it is the part
   the customer must not skip, and it is the customer's own check, never MyData's. */

.md-activation__intro { margin: 0 0 20px; color: var(--md-ink-soft); }

.md-stage-nav {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.md-stage-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px 7px 7px;
    border: 1px solid var(--md-border);
    border-radius: var(--md-radius-md);
    background: var(--md-surface-alt);
    color: var(--md-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.md-stage-nav a:hover { border-color: var(--md-primary); color: var(--md-primary-dark); text-decoration: none; }
.md-stage-nav__num,
.md-stage__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--md-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}
.md-stage { scroll-margin-top: 88px; }
.md-stage .md-panel__title { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.md-stage__count {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--md-muted);
}
.md-stage__lead { margin: 0 0 16px; color: var(--md-ink-soft); }

.md-steps { margin: 0; padding-left: 1.6rem; }
.md-steps li { padding-left: 6px; line-height: 1.55; overflow-wrap: anywhere; }
.md-steps li + li { margin-top: 12px; }
.md-steps li::marker { font-weight: 700; color: var(--md-primary-dark); }

.md-panel--verify { border-left: 4px solid var(--md-primary); }
.md-panel--verify .md-panel__head { background: var(--md-primary-soft); margin: -24px -24px 16px; padding: 16px 24px 12px; border-bottom-color: var(--md-primary-border); }

.md-stage__result { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--md-border); }
.md-stage__result-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.md-actions--result { align-items: flex-start; }
.md-actions--result form { margin: 0; }
.md-stage__support { display: grid; gap: 8px; }
.md-stage__support .md-field__label { margin-bottom: 0; }
.md-field__optional { font-weight: 400; color: var(--md-muted); }
.md-link--wrap { overflow-wrap: anywhere; }

@media (max-width: 640px) {
    .md-actions--result { flex-direction: column; align-items: stretch; }
    .md-actions--result .md-btn { width: 100%; }
    .md-stage-nav a { font-size: 13px; padding-right: 10px; }
}
