/**
 * File: assets/css/frontend/header-widgets/account-widget.css
 * Purpose: Split piece of a larger source file (1.0.191 file-size programme; cascade/build order unchanged). Split from assets/css/frontend/header-widgets/widgets.css (1.0.191, 300-line standard): cascade order is preserved by the enqueue chain; this file holds lines 1330-2141 of the original file, verbatim.
 * Scope: Same feature scope as the source file named in the provenance line; not a standalone design source.
 * Package: HyperDAF Engine
 */
/* RC.69 premium commercial Account widget: one canonical renderer, provider icons and bounded desktop/responsive workspace. */
.hdf-header-action--account {
    --hdf-engine-account-widget-width: var(--hdf-engine-cart-widget-width, 346px);
}

.hdf-header-action--account .hdf-header-action__widget {
    width: min(var(--hdf-engine-account-widget-width), calc(100vw - 2rem));
    max-height: min(29rem, calc(100dvh - 7rem));
    overflow: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.hdf-header-account-panel {
    display: grid;
    width: 20.625rem;
    max-width: calc(100vw - 2rem);
    height: 28rem;
    max-height: min(28rem, calc(100dvh - 7rem));
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    overflow: hidden;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border: 1px solid var(--hdf-engine-color-border, #e2e8ee);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .75rem 2rem rgba(11, 31, 58, .10);
    color: var(--hdf-engine-color-text);
    white-space: normal;
}

.hdf-header-account-panel::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.hdf-header-account-profile {
    display: grid;
    min-height: 82px;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--hdf-engine-color-border, #e2e8ee);
    background: linear-gradient(90deg, #eaf6ee, #f4faf6);
}

.hdf-header-account-avatar {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--hdf-engine-color-primary-strong) 36%, var(--hdf-engine-color-border));
    border-radius: 15px;
    background: var(--hdf-engine-color-surface-selected);
    color: var(--hdf-engine-color-primary-strong);
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: -.03em;
}

.hdf-header-account-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hdf-header-account-profile__identity {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.hdf-header-account-profile__identity small {
    color: var(--hdf-engine-color-primary-strong);
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.hdf-header-account-profile__identity strong,
.hdf-header-account-profile__identity > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdf-header-account-profile__identity strong {
    color: var(--hdf-engine-color-text);
    font-size: .88rem;
    line-height: 1.3;
}

.hdf-header-account-profile__identity > span {
    color: var(--hdf-engine-color-text-muted);
    font-size: .66rem;
}

/* Name row: name link left, Sign out right. */
.hdf-header-account-profile__namerow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-width: 0;
}

.hdf-header-account-profile__namelink {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    min-width: 0;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
}

.hdf-header-account-profile__namelink strong {
    min-width: 0;
}

.hdf-header-account-profile__namelink:hover strong,
.hdf-header-account-profile__namelink:focus-visible strong {
    color: var(--hdf-color-primary-strong, #4F7A20);
    text-decoration: underline;
    text-underline-offset: .18em;
}

.hdf-header-account-profile__namelink--unset strong {
    color: var(--hdf-color-primary-strong, #4F7A20);
}

/* Small info icon with black tooltip for the "Set Name" prompt. */
.hdf-header-account-profile__info {
    position: relative;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: .95rem;
    height: .95rem;
    color: var(--hdf-engine-color-text-muted);
    cursor: help;
}

.hdf-header-account-profile__info .hdf-engine-icon {
    width: .95rem;
    height: .95rem;
}

.hdf-header-account-profile__tip {
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    z-index: 30;
    width: max-content;
    max-width: 11rem;
    padding: .45rem .6rem;
    border-radius: .45rem;
    background: #101828;
    color: #fff;
    font-size: .68rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(2px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}

.hdf-header-account-profile__tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #101828;
}

.hdf-header-account-profile__info:hover .hdf-header-account-profile__tip,
.hdf-header-account-profile__info:focus-visible .hdf-header-account-profile__tip,
.hdf-header-account-profile__info:focus-within .hdf-header-account-profile__tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hdf-header-account-secure {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid color-mix(in srgb, var(--hdf-engine-color-success) 24%, var(--hdf-engine-color-border));
    border-radius: var(--hdf-engine-radius-pill, 999px);
    background: color-mix(in srgb, var(--hdf-engine-color-success) 8%, var(--hdf-engine-color-surface));
    color: var(--hdf-engine-color-success-text);
    font-size: .58rem;
    font-weight: 750;
    line-height: 1;
}

.hdf-header-account-secure .hdf-engine-icon {
    width: 13px;
    height: 13px;
}

.hdf-header-account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--hdf-engine-color-border-subtle);
    background: var(--hdf-engine-color-surface);
}

/* Four compact stat blocks in one row — square 1:1, like the reference. */
.hdf-header-account-stats--quad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .5rem;
    padding: .6rem .8rem;
    border-bottom: 0;
    background: transparent;
}

.hdf-header-account-stats--quad > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .2rem;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    padding: .4rem .2rem;
    border: 1px solid var(--hdf-engine-color-border, #e2e8ee);
    border-radius: .7rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    text-align: center;
    overflow: hidden;
}

.hdf-header-account-stats > a:hover,
.hdf-header-account-stats > a:focus-visible {
    background: var(--hdf-engine-color-surface-selected);
    color: var(--hdf-engine-color-primary-strong);
}

/* Quad blocks: hover turns parent green with white text/icons. */
.hdf-header-account-stats--quad > a:hover,
.hdf-header-account-stats--quad > a:focus-visible {
    background: var(--hdf-color-primary-strong, #4F7A20);
    color: #fff;
}

