/* PORTAL_CONTROLS_20261123: Customer Portal only. App.razor links this file AFTER the shared Universal.WebAssets
   app.css, so it wins the ties against it. The Admin portal and the CRM load app.css but never this file, so nothing
   here reaches them. Jordan, 2026-11-23: "I dont like how grey looks in the locked selection" and "The popup isnt
   properly placed". Square (the portal's other fields are), no shadows, tokens only. */

/* 1. The dropdown arrow never gets a tinted block behind it. Radzen positions .rz-dropdown-trigger absolutely over the
   full height of the field, so app.css's hover fill (rgba(0, 72, 144, 0.08)) read as a grey slab at the right edge.
   Hover feedback is the caret turning brand blue instead. */
.rz-dropdown .rz-dropdown-trigger:hover {
    background: transparent !important;
}

.rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-trigger .rzi,
.rz-dropdown:not(.rz-state-disabled):hover .rz-dropdown-trigger-icon {
    color: var(--ua-primary-blue) !important;
}

/* 2. A locked (disabled) dropdown is one flat white field. Radzen renders it as a <div class="rz-dropdown
   rz-state-disabled"> (aria-disabled="true", tabindex -1), so app.css's ":disabled" rules never reach it, and the theme
   paints the inner label (.rz-dropdown-label.rz-inputtext) with --rz-input-disabled-background-color while app.css
   forces the outer field white: a grey box inside a white box. "Locked" now reads from the brand disabled gray border
   (--ua-secondary-light-gray, the guide's "disabled" color), no shadow, a light caret and the not-allowed cursor. The
   text stays --ua-primary-gray, 5.1:1 on white (WCAG AA). */
.rz-dropdown.rz-state-disabled {
    background: #ffffff !important;
    border: 1px solid var(--ua-secondary-light-gray) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.rz-dropdown.rz-state-disabled .rz-dropdown-label,
.rz-dropdown.rz-state-disabled .rz-inputtext {
    background: transparent !important;
    color: var(--ua-primary-gray) !important;
    cursor: not-allowed !important;
}

.rz-dropdown.rz-state-disabled .rz-dropdown-trigger {
    background: transparent !important;
    cursor: not-allowed !important;
}

.rz-dropdown.rz-state-disabled .rz-dropdown-trigger .rzi,
.rz-dropdown.rz-state-disabled .rz-dropdown-trigger-icon {
    color: var(--ua-secondary-light-gray) !important;
}

/* A click still focuses the locked field (tabindex -1 is mouse-focusable), and app.css's focus glow then made a control
   that will not open look active. Keyboard focus, should a page ever make the field reachable, keeps the 2 px ring. */
.rz-dropdown.rz-state-disabled:focus {
    box-shadow: none !important;
}

.rz-dropdown.rz-state-disabled:focus-visible {
    outline: 2px solid var(--ua-primary-blue) !important;
    outline-offset: 2px !important;
}

/* 3. Toasts (Radzen NotificationService, every portal page) sit in the bottom-right corner. Radzen's default is fixed at
   top 100px, right 1rem, which lands on the page header band (PageHeader) and the tabs row of every hub page. Rendered
   in <body> on some layouts and inside the app shell on others, so this rule is not scoped to a wrapper. Still a
   polite live region with its close button; only the position changes. */
.rz-notification {
    inset-block-start: auto !important;
    inset-block-end: 1.5rem !important;
    inset-inline-end: 1.5rem !important;
}

/* The close button. app.css hides every direct .rzi child of a toast to drop the severity icon, and in Radzen 10 the
   close control is one of them (button.rzi.rz-notification-close, aria-label "Close"), so a toast could only time out.
   Bring it back so it can be dismissed, with the portal's 2 px keyboard ring. It is a flex sibling of the card
   (.rz-notification-message carries the fill and the severity border), so it is placed inside the card's top-right
   corner and the card keeps room for it. */
.rz-notification .rz-notification-item {
    position: relative;
}

.rz-notification .rz-notification-item > .rz-notification-close {
    display: inline-block !important;
    position: absolute !important;
    inset-block-start: 0.75rem;
    inset-inline-end: 0.75rem;
    /* Radzen draws it in the inherited (white) text at 0.75 opacity, which vanished on the pale cards. */
    color: var(--ua-primary-gray) !important;
    opacity: 1 !important;
}

.rz-notification .rz-notification-item > .rz-notification-close:focus-visible {
    outline: 2px solid var(--ua-primary-blue) !important;
    outline-offset: 2px !important;
}

.rz-notification .rz-notification-item > .rz-notification-message-wrapper {
    flex: 1 1 auto;
}

.rz-notification .rz-notification-message {
    padding-inline-end: 2.5rem !important;
}

/* Phones and small tablets: full width between 1rem gutters, lifted above the sticky Back / Continue bars some pages pin
   to the bottom (Register's is 68px tall at 390px). 768px matches the breakpoint where Register pins that bar and the
   Dealer Resources cart button floats bottom-right; at 577-768px a corner toast sat on top of both. */
@media (max-width: 768px) {
    .rz-notification {
        inset-inline-start: 1rem !important;
        inset-inline-end: 1rem !important;
        inset-block-end: calc(5.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* app.css sizes each toast to its content (fit-content, min 320px); on a phone that left it hugging the left gutter. */
    .rz-notification .rz-notification-item-wrapper {
        width: 100% !important;
        max-width: none !important;
    }

    .rz-notification .rz-notification-item {
        flex: 1 1 auto !important;
    }
}
