/* smkk-result-banner.css — dedicated styles for the global SUCCESS/FAIL result banner.
   Dense, flat, theme-aware via CSS custom properties with hardcoded fallbacks.
   Self-contained; does NOT touch site.css. */

.smkk-result-banner-host {
    position: sticky;
    top: 0;
    z-index: 2000;
    width: 100%;
}

/* Empty host must take no space so it never disturbs page flow. */
.smkk-result-banner-host:empty {
    display: none;
}

.smkk-result-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 1rem;
    border: 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.18);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 600;
    color: #fff;
    -webkit-text-fill-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.smkk-result-banner--ok {
    background: var(--smkk-spx-success, #1b7f4d);
}

.smkk-result-banner--error {
    background: var(--smkk-spx-danger, #c0392b);
}

.smkk-result-banner__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
}

.smkk-result-banner__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.smkk-result-banner__message {
    font-size: 1.02rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.smkk-result-banner__why {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.92;
    overflow-wrap: anywhere;
}

.smkk-result-banner__goto {
    flex: 0 0 auto;
    appearance: none;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    -webkit-text-fill-color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    white-space: nowrap;
}

.smkk-result-banner__goto:hover,
.smkk-result-banner__goto:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}

.smkk-result-banner__dismiss {
    flex: 0 0 auto;
    appearance: none;
    cursor: pointer;
    border: 0;
    background: transparent;
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0 0.25rem;
    opacity: 0.85;
}

.smkk-result-banner__dismiss:hover,
.smkk-result-banner__dismiss:focus-visible {
    opacity: 1;
    outline: none;
}

/* Brief focus highlight applied by the JS "Take me there" target. */
.smkk-result-target-flash {
    animation: smkk-result-target-flash 1.6s ease-out 1;
}

@keyframes smkk-result-target-flash {
    0% {
        box-shadow: 0 0 0 3px var(--smkk-spx-danger, #c0392b);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(192, 57, 43, 0);
    }
}

@media (max-width: 600px) {
    .smkk-result-banner {
        flex-wrap: wrap;
        padding: 0.6rem 0.75rem;
    }

    .smkk-result-banner__goto {
        order: 3;
    }
}
