/**
 * File: assets/css/frontend/header/actions.css
 * Purpose: Styles the screenshot-matched Account, Wishlist, Compare and Cart actions with provider-owned counts/popovers.
 * Scope: Header action presentation only; action state and widget contents belong to HyperDAF Engine.
 * Related PHP: src/Frontend/Header/Components/Actions.php
 * Related CSS: assets/css/frontend/header/main-row.css
 * Related JS: assets/js/frontend/header/actions.js
 * Package: HyperDAF Pro
 */

.hdf-header-actions {
    display: flex;
    max-width: 100%;
    align-items: flex-start;
    justify-content: flex-end;
    gap: var(--hdf-component-header-action-gap);
    gap: clamp(.28rem, .455vw, .49rem);
    --hdf-header-action-icon-size: 1.3rem;
    --hdf-header-action-label-size: 9px;
    white-space: nowrap;
}
.hdf-header-action { position: relative; flex: 0 0 auto; }

.hdf-header-action__button {
    position: relative;
    display: inline-flex;
    min-width: 3.15rem;
    min-height: 3rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    padding: var(--hdf-component-header-action-padding);
    padding: 0 .1rem;
    border: 1px solid transparent;
    border-radius: var(--hdf-radius-lg);
    background: transparent;
    color: var(--hdf-color-text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: color 180ms ease, border-color 180ms ease;
}
.hdf-header-action__button:hover {
    border-color: var(--hdf-color-primary);
    background: transparent;
    color: var(--hdf-color-primary-strong);
    box-shadow: none;
    transform: none;
}
.hdf-header-action__button[aria-expanded="true"] { border-color: transparent; background: transparent; color: var(--hdf-color-primary-strong); box-shadow: none; }
.hdf-header-action__button:active { transform: none; }
.hdf-header-action__button .hdf-icon,
.hdf-header-action__button .hdf-engine-icon { width: var(--hdf-header-action-icon-size); height: var(--hdf-header-action-icon-size); }
.hdf-header-action__label {
    display: block;
    max-width: 5.5rem;
    overflow: hidden;
    color: currentColor;
    font-size: var(--hdf-header-action-label-size);
    font-weight: 500;
    line-height: 1.1;
    text-overflow: ellipsis;
}

.hdf-header-action__badge {
    position: absolute;
    top: .05rem;
    right: .12rem;
    display: inline-flex;
    min-width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    padding-inline: .22rem;
    border: 1px solid var(--hdf-color-surface);
    border-radius: 999px;
    background: var(--hdf-color-primary-strong);
    color: var(--hdf-color-on-primary-strong);
    font-size: .56rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
}

.hdf-header-action__widget {
    position: absolute;
    z-index: var(--hdf-z-index-dropdown);
    top: calc(100% + .75rem);
    right: 0;
    width: min(var(--hdf-component-header-widget-width), calc(100vw - 2rem));
    max-height: var(--hdf-component-header-widget-max-height);
    overflow: auto;
    border: 1px solid var(--hdf-color-border);
    border-radius: var(--hdf-radius-xl);
    background: var(--hdf-color-surface);
    box-shadow: var(--hdf-shadow-lg);
}
.hdf-header-action__widget[hidden] { display: none; }
.hdf-header-action.is-open::after { position: absolute; z-index: calc(var(--hdf-z-index-dropdown) - 1); top: 100%; right: 0; width: max(100%, var(--hdf-component-header-widget-width)); height: var(--hdf-spacing-3); content: ""; }
.hdf-header-action__button .hdf-engine-icon { display: block; max-width: 100%; max-height: 100%; color: currentColor; opacity: .88; transition: opacity 180ms ease; }
.hdf-header-action__button:hover .hdf-engine-icon,
.hdf-header-action__button[aria-expanded="true"] .hdf-engine-icon { opacity: 1; }
