/* SoloListen — Orb UI Styles */

/* Call AI Agent Button */
#call-ai-agent-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44.8px;
    width: 180px;
    padding: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: white;
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(12px);
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#call-ai-agent-btn:hover {
    background: rgba(31, 41, 55, 0.35);
}

#call-ai-agent-btn:disabled {
    cursor: default;
}

#call-ai-agent-btn:disabled:hover {
    background: rgba(31, 41, 55, 0.5);
    transform: none;
}

/* Button content wrapper for slide animation */
.btn-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn-content-wrapper.slide-up-out {
    animation: slideUpOut 0.3s ease forwards;
}

.btn-content-wrapper.slide-up-in {
    animation: slideUpIn 0.3s ease forwards;
}

@keyframes slideUpOut {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

@keyframes slideUpIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Icon circle inside button */
.btn-icon-circle {
    width: 2rem;
    height: 2rem;
    margin-left: 0.05rem;
    background-color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#call-ai-agent-btn:disabled .btn-icon-circle {
    background-color: rgba(156, 163, 175, 0.4);
}

#thinking-spinner {
    margin-left: 0.6rem;
}

.btn-text {
    margin-left: auto;
    margin-right: auto;
    white-space: nowrap;
}

/* Orb container */
#call-agent-container {
    position: relative;
    width: 325px;
    height: 325px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#glow-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Bottom Transcript Panel */
.transcript-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(75, 85, 99, 0.5);
    transition: height 0.3s ease;
    display: flex;
    flex-direction: column;
}

.transcript-panel.collapsed {
    height: 40px;
}

.transcript-panel:not(.collapsed) {
    height: 200px;
}

.transcript-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    flex-shrink: 0;
    width: 100%;
    text-align: left;
}

.transcript-toggle:hover {
    color: #D1D5DB;
}

.transcript-panel.collapsed .transcript-toggle svg {
    transform: rotate(180deg);
}

.transcript-toggle svg {
    transition: transform 0.3s ease;
}

.transcript-preview {
    margin-left: auto;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: #6B7280;
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.transcript-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 12px;
    scrollbar-width: thin;
    scrollbar-color: #374151 transparent;
}

.transcript-content::-webkit-scrollbar {
    width: 4px;
}

.transcript-content::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 2px;
}

.transcript-panel.collapsed .transcript-content {
    display: none;
}

#transcript-history {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.transcript-entry {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.transcript-label {
    font-weight: 600;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.transcript-label.user {
    background: #1E3A5F;
    color: #60A5FA;
}

.transcript-label.bot {
    background: #1C3D2E;
    color: #34D399;
}

.transcript-label.partial {
    background: #292524;
    color: #A8A29E;
}

.transcript-text {
    color: #D1D5DB;
}

.transcript-text.partial {
    color: #6B7280;
    font-style: italic;
}

/* Sidebar collapse/expand */
#sidebar {
    transition: margin-left 0.3s ease, width 0.3s ease;
}

#sidebar.collapsed {
    margin-left: -256px;
}

#sidebar-toggle {
    position: fixed;
    left: 256px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    transition: left 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(75, 85, 99, 0.6);
    border-left: none;
    border-radius: 0 0.375rem 0.375rem 0;
    padding: 0.75rem 0;
    width: 0.9rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: white;
}

#sidebar-toggle:hover {
    background: rgba(31, 41, 55, 1);
    border-color: rgba(75, 85, 99, 0.8);
}

#sidebar.collapsed + #sidebar-toggle {
    left: 0;
}

@media (max-width: 768px) {
    #sidebar-toggle {
        display: none;
    }
}

/* Enrollment mic button recording state */
#enrollment-mic-btn.recording {
    background-color: #EF4444 !important;
    animation: pulse-enrollment 1s infinite;
}

@keyframes pulse-enrollment {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}
