/* Global Dialog Footer Styles - Sticky Footer for All Dialogs */

/* Sticky Dialog Footer - Apply this class to all dialog footers */
.dialog-footer-sticky {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--ua-secondary-light-gray);
    padding: 1rem 1.5rem;
    margin: 0;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Alternative sticky footer for dark themes */
.dialog-footer-sticky-dark {
    position: sticky;
    bottom: 0;
    background: #2d3748;
    border-top: 1px solid #4a5568;
    padding: 1rem 1.5rem;
    margin: 0;
    z-index: 10;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
}

/* Responsive adjustments for sticky footers */
@media (max-width: 768px) {
    .dialog-footer-sticky,
    .dialog-footer-sticky-dark {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .dialog-footer-sticky,
    .dialog-footer-sticky-dark {
        padding: 0.5rem;
    }
    
    .dialog-footer-sticky .rz-stack,
    .dialog-footer-sticky-dark .rz-stack {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .dialog-footer-sticky .rz-button,
    .dialog-footer-sticky-dark .rz-button {
        width: 100%;
    }
}

/* Standard dialog body padding for Customer UniNet dialogs */
.ua-dialog-body {
    padding: 1.25rem 1.5rem;
}

/* Dialog content wrapper for sticky footers */
.dialog-content-with-sticky-footer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dialog-content-with-sticky-footer .dialog-main-content {
    flex: 1;
    overflow-y: auto;
}

/* Utility classes for common dialog layouts */
.dialog-side-by-side {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
}

.dialog-side-by-side .dialog-form-section {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.dialog-side-by-side .dialog-preview-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 1rem;
    align-self: flex-start;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

/* Responsive side-by-side layout */
@media (max-width: 1200px) {
    .dialog-side-by-side {
        flex-direction: column;
        gap: 1rem;
    }
    
    .dialog-side-by-side .dialog-form-section {
        padding-right: 0;
    }
    
    .dialog-side-by-side .dialog-preview-section {
        margin-top: 1rem;
    }
}

/* Common dialog button styles */
.dialog-footer-sticky .rz-button,
.dialog-footer-sticky-dark .rz-button {
    min-width: 120px;
}

/* Loading state for dialog footers */
.dialog-footer-sticky.loading,
.dialog-footer-sticky-dark.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success state for dialog footers */
.dialog-footer-sticky.success {
    background: #d4edda;
    border-top-color: #c3e6cb;
}

.dialog-footer-sticky-dark.success {
    background: #22543d;
    border-top-color: #38a169;
}

/* Error state for dialog footers */
.dialog-footer-sticky.error {
    background: #f8d7da;
    border-top-color: #f5c6cb;
}

.dialog-footer-sticky-dark.error {
    background: #742a2a;
    border-top-color: #e53e3e;
}

/* Mobile: cap dialog widths to viewport on phones/tablets */
@media (max-width: 768px) {
    .rz-dialog {
        width: calc(100vw - 2rem) !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        margin-left: 1rem !important;
        margin-right: 1rem !important;
    }
    .rz-dialog-content {
        max-height: min(70vh, calc(100dvh - 8rem)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 576px) {
    .rz-dialog {
        width: calc(100vw - 1rem) !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }
    .rz-dialog .rz-dialog-titlebar {
        padding: 0.75rem !important;
    }
    .rz-dialog-content {
        padding: 0.75rem !important;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)) !important;
    }
}

/* Radzen side dialogs (DialogService.OpenSideAsync — e.g. the invoice "Pay" panel)
   render as position:fixed but the left/right variants NEVER set `top`
   (default-base.css v10.3 only gives them right/left + height:100%). With top:auto
   the fixed panel falls to its in-flow static position — below all page content,
   off the bottom of the viewport — so only the dim mask shows and the panel is
   invisible (the classic "click Pay → nothing appears"). Pin it to the top.
   NOTE: Radzen emits the class `.rz-dialog-side`, NOT `.rz-side-dialog`. */
.rz-dialog-side-position-right,
.rz-dialog-side-position-left {
    top: 0;
}

/* Mobile: side dialogs take full width on phones */
@media (max-width: 576px) {
    .rz-dialog-side {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

@media (max-width: 768px) {
    .rz-dialog-side {
        width: calc(100vw - 2rem) !important;
        max-width: 100vw !important;
    }
}

/* Customer site only: the <=576 "side dialogs take full width on phones" rule above is overridden by the <=768 rule
   that follows it (same specificity, both !important, later wins), which left a 32px strip of mask on phones.
   A customer-scoped rule outranks both and restores the stated intent. Admin keeps the existing behaviour. */
@media (max-width: 576px) {
    .viewport-zoom-wrapper:not(.admin-mode) .rz-dialog-side {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* fix-plan PR6 (2026-06-23): cap CUSTOMER dialogs to the viewport on tablets (577-1024px) so
   hard-coded Width=900px / Height=700px dialogs (e.g. the navdata Release Calendar) no longer
   overflow an iPad. Phones are already capped by the <=768px rules above. Scoped to the customer
   site (the RadzenComponents dialog host renders inside .viewport-zoom-wrapper) so Admin is untouched. */
@media (min-width: 577px) and (max-width: 1024px) {
    .viewport-zoom-wrapper:not(.admin-mode) .rz-dialog {
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100dvh - 2rem) !important;
    }

    .viewport-zoom-wrapper:not(.admin-mode) .rz-dialog .rz-dialog-content {
        max-height: calc(100dvh - 8rem) !important;
        overflow-y: auto !important;
    }
}

/* Invoice payment side panel */
.rz-dialog-side:has(.invoice-payment-dialog) {
    border-radius: 0 !important;
}

.rz-dialog-side:has(.invoice-payment-dialog) .rz-dialog-side-titlebar {
    background: var(--ua-secondary-dark-blue, #203864) !important;
    color: #fff !important;
    border-radius: 0 !important;
    padding: 0.85rem 1rem !important;
}

.rz-dialog-side:has(.invoice-payment-dialog) .rz-dialog-side-titlebar .rz-dialog-side-title {
    color: #fff !important;
    font-weight: 600 !important;
}

.rz-dialog-side:has(.invoice-payment-dialog) .rz-dialog-side-content {
    padding: 1rem 1.25rem 1.25rem !important;
    overflow-y: auto !important;
    height: calc(100% - 3rem);
}

/* Custom full-viewport side panels (notifications, payment methods) — hide empty Radzen shell */
.rz-side-dialog:has(.notification-sidebar-wrapper),
.rz-side-dialog:has(.payment-methods-wrapper) {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    pointer-events: none !important;
}

.rz-side-dialog:has(.notification-sidebar-wrapper) .rz-dialog-titlebar,
.rz-side-dialog:has(.payment-methods-wrapper) .rz-dialog-titlebar {
    display: none !important;
}

.rz-side-dialog:has(.notification-sidebar-wrapper) .rz-dialog-content,
.rz-side-dialog:has(.payment-methods-wrapper) .rz-dialog-content {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: none !important;
    height: auto !important;
    width: auto !important;
    pointer-events: none !important;
}

.rz-side-dialog:has(.notification-sidebar-wrapper) .rz-dialog-content > *,
.rz-side-dialog:has(.payment-methods-wrapper) .rz-dialog-content > * {
    pointer-events: auto;
}

/* Dialog close button - remove box around X (per website design) */
.rz-dialog .rz-window-titlebar-close,
.rz-dialog .rz-window-titlebar-icon.rz-window-titlebar-close,
.rz-dialog [class*="titlebar-close"],
.rz-dialog .rz-dialog-titlebar-close,
.rz-window .rz-window-titlebar-close,
.rz-window [class*="titlebar-close"] {
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
}

.rz-dialog .rz-window-titlebar-close:hover,
.rz-dialog .rz-window-titlebar-close:focus,
.rz-dialog .rz-window-titlebar-icon.rz-window-titlebar-close:hover,
.rz-dialog [class*="titlebar-close"]:hover,
.rz-dialog [class*="titlebar-close"]:focus,
.rz-window .rz-window-titlebar-close:hover,
.rz-window [class*="titlebar-close"]:hover {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   Admin Portal — shared dialog utilities (Resources, TechPubs, Messaging)
   Sharp corners, UA tokens. Loaded with dialog-styles.css in Admin + Portal.
   ========================================================================== */

/* Muted preview / placeholder panel (replaces #f8f9fa + #e9ecef inline boxes) */
.admin-preview-container {
    background: var(--rz-base-100, #f3f4f6);
    border: 1px solid var(--ua-secondary-light-gray);
    border-radius: 0;
    padding: 1rem;
    color: var(--ua-primary-gray);
}

/* Consistent inner section spacing for admin dialog bodies */
.admin-dialog-section {
    padding: 1.5rem;
}

/* File list rows in TechPubs service letter / bulletin dialogs — sharp corners */
.admin-tech-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ua-secondary-light-gray);
    border-radius: 0;
    margin-bottom: 0.5rem;
    background: var(--rz-card-background-color, #fff);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.admin-tech-file-item:hover {
    background: var(--rz-base-100, #f3f4f6);
}

.admin-tech-file-item.selected {
    background: rgba(0, 72, 144, 0.08);
    border-color: var(--ua-primary-blue);
    border-left: 3px solid var(--ua-primary-blue);
}

/* Standard admin dialog “footer” strip (duplicate of sticky footer tokens; class name matches razor patterns) */
.admin-dialog-footer {
    position: sticky;
    bottom: 0;
    background: var(--rz-base-100, #f3f4f6);
    border-top: 1px solid var(--ua-secondary-light-gray);
    padding: 1rem 1.5rem;
    margin: 0;
    z-index: 10;
    border-radius: 0;
}

/* TechPubs — service letter / bulletin dialogs (opened with CssClass admin-techpub-dialog) */
.admin-techpub-dialog .rz-dialog-content {
    padding: 0.5rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    display: flex;
    flex-direction: column;
}

/* Product family selection grid */
.admin-product-selection-container {
    border: 1px solid var(--ua-secondary-light-gray);
    border-radius: 0;
    background: var(--rz-base-100, #f3f4f6);
    padding: 1rem;
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.admin-product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.admin-product-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--rz-card-background-color, #fff);
    border: 1px solid var(--ua-secondary-light-gray);
    border-radius: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.admin-product-item:has(input[type="checkbox"]:checked) {
    background: rgba(0, 72, 144, 0.08);
    border-color: var(--ua-primary-blue);
}

.admin-no-products-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

/* ==========================================================================
   Admin Portal — dialog shell + field system (UniNet Admin, .admin-mode)
   Mirrors the CRM dialog system (dialog-container / dialog-body / field-grid)
   with admin styling: navy titlebar, sharp corners, UA tokens, dense controls.
   ========================================================================== */

/* Shell guard: an admin dialog may never grow past the viewport. Content
   scrolls inside as a fallback; well-formed dialogs fit without scrolling. */
.admin-mode .rz-dialog {
    max-height: calc(100vh - 4rem);
    max-width: calc(100vw - 2rem);
    display: flex;
    flex-direction: column;
    border-radius: 0;
    overflow: hidden;
}

.admin-mode .rz-dialog .rz-dialog-titlebar {
    flex-shrink: 0;
    background: var(--ua-secondary-dark-blue, #203864);
    color: #fff;
    padding: 0.8rem 1.25rem;
    border-radius: 0;
}

.admin-mode .rz-dialog .rz-dialog-titlebar .rz-dialog-title,
.admin-mode .rz-dialog .rz-dialog-titlebar .rz-window-title {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.admin-mode .rz-dialog .rz-dialog-titlebar .rz-window-titlebar-close,
.admin-mode .rz-dialog .rz-dialog-titlebar [class*="titlebar-close"],
.admin-mode .rz-dialog .rz-dialog-titlebar .rzi {
    color: rgba(255, 255, 255, 0.92) !important;
}

.admin-mode .rz-dialog .rz-dialog-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Body: standard padding inside the scrollable content (rz-dialog-content
   itself is zero-padded globally). Pair with sticky .admin-dialog-footer. */
.admin-dialog-body {
    padding: 1.5rem;
}

/* Section header — CRM .section-header, admin scale */
.admin-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ua-primary-blue, #004890);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid color-mix(in srgb, var(--ua-secondary-dark-blue, #203864) 14%, #ffffff);
}

.admin-section-header .rzi,
.admin-section-header .rz-icon {
    font-size: 1rem;
    color: var(--ua-secondary-light-blue, #49b3e7);
}

.admin-dialog-body .admin-section-header:not(:first-child) {
    margin-top: 1.5rem;
}

/* Two-column responsive field grid — labels above inputs (halves dialog
   height vs the legacy label-left RadzenRow layout) */
.admin-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
}

.admin-field-grid + .admin-field-grid {
    margin-top: 1rem;
}

.admin-field-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.admin-field-item.full-width {
    grid-column: 1 / -1;
}

.admin-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ua-primary-gray, #6e6e6e);
    letter-spacing: 0.01em;
}

.admin-field-label.required::after {
    content: " *";
    color: #dc2626;
    font-weight: 600;
}

/* Inputs fill their grid cell */
.admin-field-item .rz-textbox,
.admin-field-item .rz-textarea,
.admin-field-item .rz-dropdown,
.admin-field-item .rz-numeric,
.admin-field-item .rz-datepicker,
.admin-field-item .rz-multiselect {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Validation messages — compact, under the field */
.admin-field-item .rz-message,
.admin-field-item .rz-messages-error {
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.125rem;
}

/* Inline checkbox field (e.g. Out of Stock) — aligns with input baseline */
.admin-field-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.15rem;
}

.admin-field-check .admin-field-label {
    margin: 0;
    cursor: pointer;
}

/* Image preview thumbnail inside dialogs — bounded so it cannot blow up
   dialog height; pairs with .admin-preview-container */
.admin-preview-thumb {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    border: 1px solid var(--ua-secondary-light-gray, #c8c8c8);
    background: #fff;
}

.admin-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    border: 1px dashed var(--ua-secondary-light-gray, #c8c8c8);
    background: var(--rz-base-100, #f3f4f6);
    color: var(--ua-primary-gray, #6e6e6e);
    font-size: 0.78rem;
}

/* Read-only field value (details / view dialogs) */
.admin-field-value {
    font-size: 0.875rem;
    color: var(--rz-text-color, #1f2937);
    line-height: 1.45;
    padding: 0.1rem 0;
    word-break: break-word;
}

.admin-field-value--muted {
    color: var(--ua-primary-gray, #6e6e6e);
}

/* Built-in Radzen confirm dialogs (DialogService.Confirm) — compact right-aligned
   buttons instead of stretched half-width blocks */
.admin-mode .rz-dialog-confirm .rz-dialog-confirm-buttons,
.admin-mode .rz-dialog .rz-dialog-confirm-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-mode .rz-dialog-confirm .rz-dialog-confirm-buttons .rz-button,
.admin-mode .rz-dialog .rz-dialog-confirm-buttons .rz-button {
    width: auto !important;
    flex: 0 0 auto !important;
    min-width: 5.5rem;
}

.admin-mode .rz-dialog-confirm .rz-dialog-content,
.admin-mode .rz-dialog:has(.rz-dialog-confirm-buttons) .rz-dialog-content {
    padding: 1.25rem 1.5rem !important;
}

/* Single column on narrow screens */
@media (max-width: 700px) {
    .admin-field-grid {
        grid-template-columns: 1fr;
    }
}

/* Pre-save duplicate warnings (create account / contact dialogs) */
.duplicate-warning {
    margin-top: 1rem;
    border-radius: 0;
    border: 1px solid var(--ua-secondary-light-gray, #c8c8c8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: var(--ua-font-primary, Tenorite, sans-serif);
}

.duplicate-warning.duplicate-soft {
    border: 1px solid var(--ua-orange, #f05a23);
    border-left-width: 4px;
    border-left-color: var(--ua-orange, #f05a23);
    background: linear-gradient(135deg, rgba(240, 90, 35, 0.12) 0%, rgba(240, 90, 35, 0.05) 100%);
}

.duplicate-warning.duplicate-hard {
    border-left: 4px solid var(--ua-button-danger, #fa0000);
    background: linear-gradient(135deg, rgba(250, 0, 0, 0.03) 0%, rgba(250, 0, 0, 0.07) 100%);
}

.duplicate-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(240, 90, 35, 0.25);
}

.duplicate-hard .duplicate-banner {
    border-bottom-color: rgba(250, 0, 0, 0.12);
}

.duplicate-banner-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--ua-orange, #f05a23);
    color: #fff;
}

.duplicate-soft .duplicate-banner-icon {
    background: var(--ua-orange, #f05a23);
}

.duplicate-hard .duplicate-banner-icon {
    background: var(--ua-button-danger, #fa0000);
}

.duplicate-banner-icon .rzi {
    font-size: 1.25rem;
}

.duplicate-banner-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.duplicate-eyebrow {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ua-orange, #f05a23);
}

.duplicate-soft .duplicate-eyebrow {
    color: var(--ua-orange, #f05a23);
}

.duplicate-hard .duplicate-eyebrow {
    color: var(--ua-button-danger, #fa0000);
}

.duplicate-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ua-primary-gray, #6e6e6e);
}

.duplicate-subtitle {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--rz-text-secondary-color, #6b7280);
    max-width: 42rem;
}

.duplicate-checking-badge {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ua-orange, #f05a23);
    padding: 0.25rem 0.5rem;
    background: #fff;
    border: 1px solid rgba(240, 90, 35, 0.35);
}

.duplicate-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    max-height: 14rem;
    overflow-y: auto;
}

.duplicate-match-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    column-gap: 1rem;
    row-gap: 0.5rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid rgba(240, 90, 35, 0.35);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.duplicate-match-card .duplicate-link {
    grid-column: 1;
    grid-row: 1;
}

.duplicate-match-details {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.duplicate-detail-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.duplicate-detail-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ua-primary-gray, #6e6e6e);
    white-space: nowrap;
}

.duplicate-detail-value {
    color: var(--rz-text-color, #000);
    word-break: break-word;
}

.duplicate-match-reason {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: start;
    justify-self: end;
}

@media (max-width: 520px) {
    .duplicate-match-card {
        grid-template-columns: 1fr;
    }

    .duplicate-match-reason {
        grid-column: 1;
        grid-row: 3;
        justify-self: start;
    }
}

.duplicate-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--ua-primary-blue, #004890);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    line-height: 1.3;
}

.duplicate-link:hover {
    color: var(--ua-secondary-dark-blue, #203864);
}

.duplicate-link:hover .duplicate-link-icon {
    transform: translate(1px, -1px);
}

.duplicate-link-label {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.duplicate-link-icon {
    font-size: 0.875rem !important;
    opacity: 0.85;
    transition: transform 0.15s ease;
}

.duplicate-ack {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 0;
    padding: 0.75rem 1rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.85);
    border-top: 1px solid rgba(240, 90, 35, 0.3);
    transition: background-color 0.15s ease;
}

.duplicate-ack:hover {
    background: #fff;
}

.duplicate-ack--checked {
    background: rgba(240, 90, 35, 0.08);
    border-top-color: var(--ua-orange, #f05a23);
}

.duplicate-ack-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.8125rem;
    color: var(--rz-text-color, #000);
}

.duplicate-ack-text strong {
    font-weight: 600;
    color: var(--ua-primary-gray, #6e6e6e);
}

.duplicate-ack-detail {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color, #6b7280);
    line-height: 1.4;
}

/* ==========================================================================
   Manage Groups — page-access editor (EditGroupPageAccessDialog)
   Grouped, friendly-labelled Access/Write grid replacing the raw key list.
   ========================================================================== */
.page-access .page-access-intro {
    font-size: 0.82rem;
    color: var(--ua-primary-gray, #6e6e6e);
    margin: 0 0 0.85rem;
}

.page-access-head,
.page-access-row {
    display: grid;
    grid-template-columns: 1fr 5rem 5rem;
    align-items: center;
}

.page-access-head {
    padding: 0 0.5rem 0.4rem;
    border-bottom: 2px solid color-mix(in srgb, var(--ua-secondary-dark-blue, #203864) 14%, #ffffff);
}

.page-access-head-page,
.page-access-head-toggle {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ua-primary-blue, #004890);
}

.page-access-head-toggle {
    text-align: center;
}

.page-access-sections {
    max-height: 52vh;
    overflow-y: auto;
}

.page-access-section-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    margin-top: 0.5rem;
    background: color-mix(in srgb, var(--ua-secondary-dark-blue, #203864) 6%, #fafbfc);
    border-left: 3px solid var(--ua-secondary-light-blue, #49b3e7);
}

.page-access-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ua-secondary-dark-blue, #203864);
}

.page-access-row {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ua-secondary-dark-blue, #203864) 8%, #ffffff);
}

.page-access-row:hover {
    background: color-mix(in srgb, var(--ua-secondary-light-blue, #49b3e7) 8%, #ffffff);
}

.page-access-row-label {
    font-size: 0.86rem;
    color: var(--rz-text-color, #1f2937);
}

.page-access-row-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Preview access (mini impersonator) — PreviewAccessDialog
   Renders the filtered sidebar a profile would see, as a navy sidebar mock.
   ========================================================================== */
.access-preview .access-preview-intro {
    font-size: 0.85rem;
    color: var(--ua-primary-gray, #6e6e6e);
    margin: 0 0 0.85rem;
}

.access-preview-picker {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
}

.access-preview-dropdown {
    width: 100%;
    max-width: 360px;
}

.access-preview-meta {
    background: var(--rz-base-100, #f3f4f6);
    border: 1px solid var(--ua-secondary-light-gray, #c8c8c8);
    border-left: 3px solid var(--ua-primary-blue, #004890);
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.access-preview-meta-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.access-preview-meta-name {
    font-weight: 700;
    color: var(--ua-secondary-dark-blue, #203864);
}

.access-preview-meta-desc {
    font-size: 0.82rem;
    color: var(--ua-primary-gray, #6e6e6e);
}

.access-preview-meta-count {
    font-size: 0.82rem;
    color: var(--rz-text-color, #1f2937);
}

/* Navy sidebar mock — mirrors .admin-sidebar so the preview reads as the real nav */
.access-preview-sidebar {
    background: var(--ua-secondary-dark-blue, #203864);
    border-radius: 8px;
    padding: 0.6rem 0.5rem;
    max-height: 46vh;
    overflow-y: auto;
}

.access-preview-group {
    margin-bottom: 0.4rem;
}

.access-preview-group-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.5rem 0.6rem 0.25rem;
}

.access-preview-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    color: #f3f6fb;
}

.access-preview-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.access-preview-item .rzi,
.access-preview-item .rz-icon {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
}

.access-preview-item-text {
    flex: 1;
    min-width: 0;
    font-size: 0.88rem;
}

.access-preview-tag {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    white-space: nowrap;
}

.access-preview-tag-write {
    background: rgba(130, 200, 10, 0.3);
    color: #eaffd2;
    border: 1px solid rgba(130, 200, 10, 0.6);
}

.access-preview-tag-read {
    background: rgba(73, 179, 231, 0.22);
    color: #dff3fd;
    border: 1px solid rgba(73, 179, 231, 0.5);
}
