/* Index.css - Combined styles for both regular and V2 interfaces */

/* Loading state for file processing */
#askQuestion.processing {
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed;
}

#askQuestion.processing img {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* V2-specific styles */
.v2-welcome-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 20px;
    justify-content: center;
    min-height: auto;
    width: 100%;
    margin: 0 auto;
    background: transparent;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.v2-welcome-section.hiding {
    opacity: 0;
    transform: translateY(-20px);
}

/* Welcome text styling */
.v2-welcome-text {
    text-align: center;
    margin-bottom: 30px;
    max-width: 700px;
    width: 100%;
}

.v2-welcome-text h2 {
    font-size: 36px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0;
    line-height: 1.2;
}

.v2-welcome-text p {
    font-size: 16px;
    color: #4b4b4b;
    margin: 0;
}

/* V2 Browse Tabs - Agent Cards */
.v2-browse-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    padding: 20px;
    padding-top: 0;
}

#v2BrowseTabsContainer {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#v2BrowseTabsContainer.hiding {
    opacity: 0;
    transform: translateY(-20px);
}

/* Agent Card Styling */
.v2-agent-card {
    background: #E8E8E8;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid #c1c4c6;
}

.v2-agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.v2-agent-card:hover .v2-card-title {
    color: #007db6;
}

.v2-agent-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.v2-card-image {
    padding: 20px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    position: relative;
}

.v2-card-image img {
    width: 65px;
    object-fit: contain;
}

/* Icon wrapper for types using FontAwesome icons */
.v2-card-icon-wrapper {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(27, 58, 87, 0.1);
    border-radius: 50%;
}

.v2-card-icon-wrapper i {
    font-size: 48px;
    color: #1B3A57;
    opacity: 0.7;
}

.v2-card-title {
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #002532;
    background: #fff;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}

/* View All Agents Card */
.v2-view-all-card {
    background: #f0f0f0;
}

.v2-view-all-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #002532;
    border-radius: 50%;
}

.v2-view-all-icon img {
    width: 40px;
}

.v2-view-all-icon i {
    font-size: 48px;
    color: #1B3A57;
    opacity: 0.7;
}

/* Initial state - questionSubmitterHolder in middle */
#questionSubmitterHolder.in-middle,
#v2QuestionSubmitterHolder.in-middle {
    position: relative;
    background-color: transparent;
    padding: 2rem 0;
    margin-top: 10px;
    left: 0;
    bottom: auto;
}

/* Ensure proper fixed positioning after animation */
#questionSubmitterHolder.at-bottom,
#v2QuestionSubmitterHolder.at-bottom {
    position: fixed !important;
    
    right: 0;
    z-index: 1000;
}

/* Adjust container when questionSubmitterHolder is fixed */
.prompt-main-container.has-fixed-bottom {
    padding-bottom: 120px;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .v2-browse-tabs {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .v2-welcome-section {
        padding: 60px 15px 30px;
        min-height: 50vh;
    }
    
    .v2-welcome-text h2 {
        font-size: 24px;
    }
    
    .v2-browse-tabs {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px;
    }
    
    .v2-agent-card {
        min-height: 200px;
    }
    
    .v2-card-image {
        height: 140px;
    }
    
    .v2-card-image img,
    .v2-view-all-icon,
    .v2-card-icon-wrapper {
        width: 80px;
        height: 80px;
    }
    
    .v2-view-all-icon i,
    .v2-card-icon-wrapper i {
        font-size: 36px;
    }
    
    .v2-card-title {
        font-size: 13px;
        min-height: 60px;
        padding: 12px;
    }
    
    #questionSubmitterHolder.at-bottom {
        padding: 1rem 0;
    }
    
    .prompt-main-container.has-fixed-bottom {
        padding-bottom: 100px;
    }
}

/* Voice Mode Button - Match icon-group styling */
.voice-mode-btn {
    display: inline-block;
    text-decoration: none;
}

.voice-mode-btn svg {
    width: 24px;
    height: 24px;
    opacity: 0.7;
    filter: brightness(0) saturate(100%) invert(37%) sepia(45%) saturate(7183%) hue-rotate(179deg) brightness(91%) contrast(101%);
    transition: opacity 0.2s ease;
}

.voice-mode-btn:hover svg {
    opacity: 1;
}