/* ==========================================================================
   Reusable Aishaa AI activity status and ticket-specific warning state.
   Loaded directly so dev hot reload cannot leave these components without
   their critical logo and layout constraints.
   ========================================================================== */

.aishaa-ai-status-notice,
.ticket-ai-composer-status-notice {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    color: var(--mud-palette-text-primary, rgba(34, 34, 43, 0.86));
}

.aishaa-ai-status-notice--info {
    width: 100%;
    max-width: none;
    min-height: 46px;
    gap: 10px;
    margin: 0 0 5px;
    padding: 7px 12px;
    border: 1px solid rgba(100, 116, 139, 0.20);
    border-color: color-mix(
        in srgb,
        var(--border-1, rgba(100, 116, 139, 0.22)) 76%,
        var(--sheen-1, rgba(255, 255, 255, 0.9)) 24%);
    border-radius: 10px;
    background:
        linear-gradient(
            112deg,
            color-mix(
                in srgb,
                var(--dialog-surface, #ffffff) 98%,
                var(--sheen-1, #ffffff) 2%),
            color-mix(
                in srgb,
                var(--dialog-surface, #ffffff) 91%,
                var(--border-1, #cbd5e1) 9%) 58%,
            color-mix(
                in srgb,
                var(--dialog-surface, #ffffff) 97%,
                var(--sheen-1, #ffffff) 3%));
    box-shadow:
        0 7px 20px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 color-mix(in srgb, var(--sheen-1, rgba(255, 255, 255, 0.85)) 90%, transparent);
    pointer-events: none;
}

.ticket-ai-composer-status-notice--warning {
    width: 100%;
    min-height: 38px;
    gap: 10px;
    margin-bottom: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 152, 0, 0.26);
    border-radius: 10px;
    background: linear-gradient(115deg, #ffffff, #fff8eb);
    background:
        linear-gradient(
            115deg,
            color-mix(
                in srgb,
                var(--dialog-surface, rgba(252, 251, 254, 0.98)) 94%,
                var(--sheen-1, rgba(255, 255, 255, 0.85)) 6%),
            color-mix(
                in srgb,
                var(--dialog-surface, rgba(252, 251, 254, 0.98)) 90%,
                #ff9800 10%));
    box-shadow:
        0 5px 16px rgba(160, 92, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.ticket-ai-composer-status-icon,
.aishaa-ai-status-spinner {
    flex: 0 0 auto;
    color: var(--accent-primary, #6f42c1);
    filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--accent-primary, #5b21d0) 28%, transparent));
}

.aishaa-ai-status-notice--info .aishaa-ai-status-spinner {
    width: 16px !important;
    height: 16px !important;
    opacity: 0.9;
}

.ticket-ai-composer-status-notice--warning .ticket-ai-composer-status-icon {
    color: #e78300;
    filter: drop-shadow(0 1px 3px rgba(255, 152, 0, 0.24));
}

.aishaa-ai-status-copy,
.ticket-ai-composer-status-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    overflow: hidden;
}

.aishaa-ai-status-notice--info .aishaa-ai-status-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.aishaa-ai-status-title,
.ticket-ai-composer-status-title {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.1;
}

.aishaa-ai-status-notice--info .aishaa-ai-status-title {
    flex: 0 0 auto;
    gap: 0;
}

.aishaa-ai-status-notice--info .aishaa-ai-status-title::after {
    display: none;
}

.aishaa-ai-status-logo {
    display: block;
    width: auto;
    height: 17px;
    max-width: 86px;
    flex: 0 0 auto;
    object-fit: contain;
    opacity: 0.96;
}

.aishaa-ai-status-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.aishaa-ai-status-text,
.ticket-ai-composer-status-text {
    min-width: 0;
    overflow: hidden;
    color: var(--mud-palette-text-secondary, rgba(34, 34, 43, 0.62));
    font-size: 0.74rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-ai-composer-status-close {
    flex: 0 0 auto;
    margin-right: -4px;
}

/* Desktop: the ticket composer notice is one slim row above the editor (AI-1719);
   wordmark and progress line side by side instead of stacked. Scoped to the
   composer variant: the same notice also serves registration and plugin views. */
@media (min-width: 961px) {
    .ticket-ai-composer-status-notice.aishaa-ai-status-notice--info {
        min-height: 36px;
        padding: 4px 12px;
    }

    .ticket-ai-composer-status-notice.aishaa-ai-status-notice--info .aishaa-ai-status-copy {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .ticket-ai-composer-status-notice--warning {
        min-height: 34px;
        padding: 3px 10px;
    }

    .ticket-ai-composer-status-notice--warning .ticket-ai-composer-status-copy {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
    }

    .ticket-ai-composer-status-notice--warning .ticket-ai-composer-status-title {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}

@media (max-width: 960px) {
    .aishaa-ai-status-notice--info {
        position: absolute;
        top: -24px;
        right: auto;
        left: 8px;
        z-index: 5;
        width: fit-content;
        max-width: calc(100% - 24px);
        min-height: 22px;
        gap: 5px;
        margin: 0;
        padding: 2px 8px 2px 6px;
        border: 1px solid color-mix(in srgb, var(--accent-primary, #5b21d0) 15%, transparent);
        border-bottom-color: transparent;
        border-radius: 8px 8px 0 0;
        background: color-mix(
            in srgb,
            var(--dialog-surface, rgba(252, 251, 254, 0.98)) 96%,
            var(--accent-primary, #5b21d0) 4%);
        box-shadow: 0 -3px 10px color-mix(in srgb, var(--accent-primary, #5b21d0) 7%, transparent);
    }

    .aishaa-ai-status-notice--info .aishaa-ai-status-spinner {
        width: 12px !important;
        height: 12px !important;
    }

    .aishaa-ai-status-notice--info .aishaa-ai-status-copy {
        flex-direction: row;
        align-items: center;
        gap: 5px;
    }

    .ticket-ai-composer-status-notice--warning {
        gap: 7px;
        margin-bottom: 4px;
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .aishaa-ai-status-logo {
        height: 10px;
        max-width: 52px;
    }

    .aishaa-ai-status-text,
    .ticket-ai-composer-status-text {
        font-size: 0.69rem;
    }
}
