/* The Nexus admin shell: header chips, ghost header controls and the dropdown popups the header
 * owns. Moved out of MainLayout.razor (the POS shell follows the same convention - no <style>
 * blocks in .razor files). Everything here mirrors the POS header language: the bar carries ONE
 * filled action at most, utilities are ghost chips with white ink.
 */
.main-header {
    display: flex;
    align-items: center;
}

/* Ghost utility buttons on the accent bar (hamburger, logout) - same treatment as the POS
   header's quiet buttons. */
.main-header .header-ghost-button.rz-button {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: none !important;
    color: #ffffff !important;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.main-header .header-ghost-button.rz-button:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: #ffffff !important;
}

.main-header .header-ghost-button.rz-button .rzi,
.main-header .header-ghost-button.rz-button .rz-button-text {
    color: #ffffff !important;
}

.main-header .header-user-name {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

.header-time-chip-text {
    font-weight: 700;
    color: #ffffff;
    padding: 6px 12px;
    display: inline-block;
    min-height: 40px;
    line-height: 28px;
    user-select: none;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Tenant / single-location chips: transparent with white ink, sized to content - the same chip
   the POS header renders for the acting business. */
.header-tenant-chip,
.header-location-chip {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    height: 38px;
    margin-left: 1rem;
    padding: 0.05rem 0.6rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    box-sizing: border-box;
    overflow: hidden;
    max-width: 260px;
}

.header-location-chip {
    margin-left: 0.6rem;
}

/* RadzenText renders a bare <p class="rz-text-body2"> - there is no .rz-text class to hook. */
.header-tenant-chip p,
.header-location-chip p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
}

.header-tenant-chip .rzi,
.header-location-chip .rzi {
    font-size: 1rem;
    color: #ffffff;
}

/* Ghost dropdowns on the accent bar: the location picker and the display time zone share one
   look, like every other header utility. */
.header-timezone-select,
.header-timezone-select.rz-dropdown,
.header-timezone-select.rz-dropdown.rz-state-focus,
.header-location-select,
.header-location-select.rz-dropdown,
.header-location-select.rz-dropdown.rz-state-focus {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff;
    border-radius: 6px;
    padding-right: 6px;
    min-height: 40px;
    box-shadow: none !important;
}

.header-timezone-select .rz-dropdown,
.header-timezone-select .rz-dropdown:focus-within,
.header-timezone-select .rz-dropdown.rz-state-focus,
.header-timezone-select .rz-inputtext,
.header-timezone-select .rz-inputtext:focus,
.header-timezone-select .rz-inputtext:active,
.header-location-select .rz-dropdown,
.header-location-select .rz-dropdown:focus-within,
.header-location-select .rz-dropdown.rz-state-focus,
.header-location-select .rz-inputtext,
.header-location-select .rz-inputtext:focus,
.header-location-select .rz-inputtext:active {
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

.header-timezone-select .rz-dropdown-label,
.header-location-select .rz-dropdown-label {
    color: #ffffff !important;
    font-weight: 700;
}

.header-timezone-select .rz-dropdown-trigger-icon,
.header-location-select .rz-dropdown-trigger-icon {
    color: #ffffff !important;
}

.header-timezone-select:hover,
.header-timezone-select:focus-within,
.header-timezone-select.rz-state-focus,
.header-location-select:hover,
.header-location-select:focus-within,
.header-location-select.rz-state-focus {
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

#popup-header-display-timezone {
    max-height: 260px !important;
    overflow: hidden !important;
}

#popup-header-display-timezone .rz-dropdown-items-wrapper {
    max-height: 215px !important; /* ~5 rows visible */
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#popup-header-display-timezone .rz-dropdown-item,
#popup-header-display-timezone .rz-dropdown-item > span {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

#popup-header-location-select .rz-dropdown-items-wrapper {
    max-height: 240px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Radzen's outlined Light buttons render #eee-on-white - invisible ink that reads as disabled.
   Same fix as the POS app.css: readable ink for every enabled one. */
.rz-button.rz-variant-outlined.rz-light:not(:disabled) {
    border-color: var(--rz-base-400);
    color: var(--rz-text-secondary-color);
}

.rz-button.rz-variant-outlined.rz-light:not(:disabled) .rzi,
.rz-button.rz-variant-outlined.rz-light:not(:disabled) .rz-button-text {
    color: var(--rz-text-secondary-color);
}
