/* ===== Reasoning Modal ===== */
.reasoning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.reasoning-modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

.reasoning-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.reasoning-modal-header h3 {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.reasoning-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.reasoning-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.reasoning-modal-body {
    padding: 2rem;
    color: #e2e8f0;
    font-size: 0.95rem;
    line-height: 1.7;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.reasoning-modal-body p {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Scrollbar styling for modal */
.reasoning-modal-body::-webkit-scrollbar {
    width: 8px;
}

.reasoning-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.reasoning-modal-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.5);
    border-radius: 4px;
}

.reasoning-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}