﻿/* ai progress */

/* Layout Overrides over Bootstrap 3 Elements */
.ai-indicator-container {
    position: relative;
    display: block;
}

.ai-trigger-btn {
    background: none;
    border: none;
    color: #9d9d9d; /* Standard inverse link color */
    padding: 15px;
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    outline: none !important;
}

.ai-trigger-btn:hover,
.ai-trigger-btn:focus {
    background-color: #222;
    color: #fff;
}

.ai-trigger-btn .fa {
    font-size: 16px;
}

/* SVG Tracer Visibility Setup */
.status-ring-svg {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 34px;
    height: 34px;
    z-index: 1;
    transform: rotate(-90deg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.status-ring-svg.visible {
    opacity: 1;
    visibility: visible;
}

.status-ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 2px;
}

.status-ring-active {
    fill: none;
    stroke: transparent;
    stroke-width: 2.5px;
    stroke-linecap: round;
    transform-origin: center;
}

.status-ring-active.error {
    stroke: #d9534f;
    stroke-dasharray: 113;
}

.status-ring-active.processing {
    stroke: #aa7cd1;
    animation: stroke-morph 2s ease-in-out infinite, stroke-rotate 2s linear infinite;
}

@keyframes stroke-morph {
    0% {
        stroke-dasharray: 1, 113;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 85, 113;
        stroke-dashoffset: -20;
    }

    100% {
        stroke-dasharray: 1, 113;
        stroke-dashoffset: -113;
    }
}

@keyframes stroke-rotate {
    100% {
        transform: rotate(360deg);
    }
}

/* Customize Badge color to integrate smoothly alongside purple theme branding */
.badge.label-purple {
    background-color: #aa7cd1;
    color: #fff;
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 2;
    padding: 3px 6px;
    font-size: 10px;
}

/* Alignment and bounding rules for dropdown element */
.ai-dropdown {
    width: 340px;
    border-radius: 8px !important;
    font-weight: 400;
}

.ai-dropdown .panel-heading {
    background-color: #fff;
}

.ai-dropdown .panel-heading .panel-title {
    font-weight: bold !important;
}

.ai-dropdown.open-panel {
    display: block;
}

.request-list {
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 0;
}

/* Shared base rules for both list element states */
.request-item {
    display: block;
    text-decoration: none;
    padding: 12px 15px;
}

/* Explicit rules for successful, clickable links */
a.list-group-item.request-link {
    color: inherit;
    cursor: pointer; /* Explicitly forces pointer finger mouse */
    transition: background-color 0.2s ease;
}

/* Hover effects ONLY apply to the successful link records */
a.list-group-item.request-link:hover,
a.list-group-item.request-link:focus {
    background-color: #f8f9fa; /* Slight subtle tint shift on hover */
    color: inherit;
}

/* Explicit rules for static items (Processing / Failed) */
div.list-group-item.request-static {
    color: inherit;
    cursor: default; /* Changes mouse to regular selection arrow */
    background-color: #ffffff;
}

/* Optional: Make failed item text slightly dimmed to show it is unclickable, if desired */
div.list-group-item.request-static .text-danger {
    font-weight: bold;
}

.request-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.request-title {
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.request-status {
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Sub-Row Progress Track Structure wrapping Bootstrap rules */
.progress {
    margin-bottom: 0;
    height: 6px;
    position: relative;
    overflow: hidden;
}

/* Spans the entire track moving seamlessly border-to-border */
.progress-bar-processing-override {
    width: 100% !important;
    background-color: #aa7cd1 !important;
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: left center;
    animation: full-length-loading 2s infinite linear;
}

@keyframes full-length-loading {
    0% {
        transform: translateX(-100%) scaleX(1);
    }

    50% {
        transform: translateX(0%) scaleX(0.4);
    }

    100% {
        transform: translateX(100%) scaleX(1);
    }
}