/* Shared overlay controls retain feature positioning and dismissal hooks, while this
   presentation contract overrides legacy button styles in every dialog and drawer. */
.overlay-close {
    display: grid !important;
    place-items: center !important;
    box-sizing: border-box !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--muted) !important;
    box-shadow: none !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transform: none !important;
    cursor: pointer;
}

/* Hover follows the reference control; keyboard focus remains clearly visible. */
.overlay-close:hover,
.overlay-close:focus-visible {
    border-color: var(--blue-500) !important;
    background: var(--blue-050) !important;
    color: var(--blue-700) !important;
}

/* Native hidden state still takes precedence over the shared display geometry. */
.overlay-close[hidden] {
    display: none !important;
}

.overlay-close:focus-visible {
    outline: 2px solid var(--blue-500);
    outline-offset: 2px;
}

/* The icon never intercepts clicks intended for the existing close controller. */
.overlay-close svg {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    margin: 0 !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-linecap: round !important;
    stroke-width: 2 !important;
    pointer-events: none;
}
