/* Public read-only shared Agent Chat: title and sign-up call to action. */
/* Remove bottom padding in shared mode so CTA sits flush */
.content-container:has(.shared-chat-cta-section) .chat-messages {
    padding-bottom: 0;
}

/* Shared Chat Title - Centered at top */
.shared-chat-title {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 1.5rem 0 1rem;
    padding: 0 var(--horizontal-padding);
    letter-spacing: -0.01em;
}

/* Mobile adjustments for title */
@media (max-width: 768px) {
    .shared-chat-title {
        font-size: 1.125rem;
        margin: 1.25rem 0 0.875rem;
        padding: 0 var(--horizontal-padding);
    }
}

/* Compact Shared Chat CTA Section */
.shared-chat-cta-section {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 2rem auto 0;
    padding: 0 var(--horizontal-padding) 0;
    text-align: center;
}

/* Enhanced description card styling */
.shared-chat-description-wrapper {
    max-width: 850px;
    margin: 0 auto 2rem;
    padding: 0 var(--horizontal-padding);
}

.shared-chat-description-card {
    background: linear-gradient(135deg, rgba(86, 98, 246, 0.05) 0%, rgba(86, 98, 246, 0.02) 100%);
    border: 1px solid var(--light-border);
    border-left: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.description-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.description-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background-color: rgba(86, 98, 246, 0.1);
    border: 1px solid rgba(86, 98, 246, 0.2);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.description-badge i {
    font-size: 0.875rem;
}

.description-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.shared-chat-description-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

.shared-chat-description-text p {
    margin: 0 0 1rem 0;
}

.shared-chat-description-text p:last-child {
    margin-bottom: 0;
}

.shared-chat-description-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Mobile adjustments for description */
@media (max-width: 768px) {
    .shared-chat-description-card {
        padding: 1.25rem 1.5rem;
    }

    .description-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .description-title {
        font-size: 0.95rem;
    }

    .shared-chat-description-text {
        font-size: 0.95rem;
    }
}

.shared-chat-cta-content {
    background-color: var(--dark-gray);
    border: 1px solid var(--light-border);
    border-radius: 12px 12px 0 0;
    padding: 1.25rem 1.75rem;
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.shared-chat-cta-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), rgba(86, 98, 246, 0.4));
}

.cta-main-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.shared-chat-login-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.shared-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
    min-width: 160px;
    position: relative;
    overflow: hidden;
}

.shared-login-btn.email-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4651c7 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(86, 98, 246, 0.25);
}

.shared-login-btn.email-btn:hover {
    background: linear-gradient(135deg, #4651c7 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(86, 98, 246, 0.4);
}

.shared-login-btn.email-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(86, 98, 246, 0.3);
}

.shared-login-btn.google-btn {
    background-color: white;
    color: #1f1f1f;
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shared-login-btn.google-btn:hover {
    background-color: #f8f9fa;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.shared-login-btn.google-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.shared-login-btn i,
.shared-login-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cta-credits {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.cta-credits i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.cta-credits-text {
    font-weight: 500;
}

.cta-credits-amount {
    color: var(--primary-color);
    font-weight: 600;
}

.cta-divider-vertical {
    width: 1px;
    height: 40px;
    background-color: var(--light-border);
    flex-shrink: 0;
}

.cta-use-cases-link {
    flex-shrink: 0;
}

.cta-use-cases-link a {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.2s ease;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 8px;
    background-color: rgba(86, 98, 246, 0.1);
    border: 1px solid rgba(86, 98, 246, 0.2);
}

.cta-use-cases-link a:hover {
    background-color: rgba(86, 98, 246, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(86, 98, 246, 0.15);
}

.cta-use-cases-link a:active {
    transform: translateY(0);
}

.cta-use-cases-link a i {
    font-size: 1rem;
}

/* Light theme adjustments */
:root.light-theme .shared-chat-cta-content {
    background-color: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

:root.light-theme .shared-login-btn.google-btn {
    background-color: white;
    border-color: #d1d5db;
}

:root.light-theme .cta-divider-vertical {
    background-color: #e5e7eb;
}

:root.light-theme .cta-use-cases-link a {
    background-color: rgba(86, 98, 246, 0.08);
    border-color: rgba(86, 98, 246, 0.15);
}

:root.light-theme .cta-use-cases-link a:hover {
    background-color: rgba(86, 98, 246, 0.12);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .shared-chat-cta-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding: 1.25rem;
        text-align: center;
    }

    .cta-main-group {
        align-items: center;
    }

    .shared-chat-login-buttons {
        flex-direction: column;
        width: 100%;
    }

    .shared-login-btn {
        width: 100%;
    }

    .cta-divider-vertical {
        display: none;
    }

    .cta-use-cases-link {
        border-top: 1px solid var(--light-border);
        padding-top: 1rem;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    :root.light-theme .cta-use-cases-link {
        border-top-color: #e5e7eb;
    }
}

@media (max-width: 480px) {
    .shared-chat-cta-section {
        margin: 1.5rem auto 0;
        padding: 0 var(--horizontal-padding) 0;
    }

    .shared-chat-cta-content {
        padding: 1rem;
    }

    .cta-headline {
        font-size: 1rem;
    }

    .cta-description {
        font-size: 0.8rem;
    }

    .shared-login-btn {
        font-size: 0.85rem;
        padding: 10px 18px;
    }
}

/* Owner-only controls: a shared page is read-only, so anything that changes
   the conversation or its project stays hidden even when the live script
   toggles it on. */
.file-viewer-analyze-action,
#analyzeYoutubeVideo,
#projectUploadBtn,
#projectFileInput,
#projectUploadProgress,
.project-files-guidance,
.chat-input-container,
.agent-owner-only,
#researchReportAsk,
.ai-usage-badge {
    display: none !important;
}
