/* AI Thinking Steps Animation Styles */

.display-none {
    display: none !important;
}

.ai-thinking-steps {
    width: 100%;
    margin-bottom: 20px;
}

.thinking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thinking-header:hover {
    background: rgba(255, 255, 255, 0.15);
}

.thinking-header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thinking-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #fff;
}

.thinking-icon-complete {
    color: #10b981;
}

.thinking-chevron {
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.thinking-chevron.expanded {
    transform: rotate(180deg);
}

.thinking-progress {
    text-align: right;
    margin-bottom: 12px;
    padding-right: 4px;
}

.thinking-progress-text {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}

.thinking-steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 8px;
}

/* Connecting line */
.thinking-steps-list::before {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 30px;
    left: 20px;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.thinking-step {
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left center;
}

.step-icon-container {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.thinking-step.active .step-icon-container {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.step-icon {
    font-size: 14px;
    line-height: 1;
}

.step-icon.rotating {
    animation: spin 2s linear infinite;
}

.step-content {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}

.step-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.step-description {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.step-duration {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.4);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding-top: 4px;
}

/* Result Styles */
.thinking-result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    animation: fadeIn 0.4s ease;
}

.thinking-result.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.thinking-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.result-title {
    font-weight: 600;
    font-size: 0.95em;
}

.thinking-result.success .result-title {
    color: #10b981;
}

.thinking-result.error .result-title,
.result-icon-error {
    color: #ef4444;
}

.result-message {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base fade/scale for items */
.thinking-step {
    opacity: 0;
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}