/* 
 * AI Teacher YouTube Transcript Viewer Styles
 * Updated: 2023-03-23
 * Version: 1.0.10
 * Added mobile responsive layout improvements
 */

/* Main container */
.ytv-container {
    /* max-width: 1200px; */
    margin: 20px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
    
    /* Define CSS variables for consistent styling */
    --ytv-bg-primary: #fff;
    --ytv-bg-secondary: #f9f9f9;
    --ytv-bg-tertiary: #f5f5f5;
    --ytv-text-primary: #333;
    --ytv-text-secondary: #555;
    --ytv-text-muted: #666;
    --ytv-border-color: #eaeaea;
    --ytv-accent-color: #000;
    --ytv-shadow-color: rgba(0, 0, 0, 0.1);
}

/* Form styles */
.ytv-form {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.ytv-form-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ytv-form-group label {
    display: block;
    font-weight: 600;
    margin-right: 10px;
}

.ytv-form-group input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ytv-submit-btn {
    background: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.ytv-submit-btn:hover {
    background: #333;
}

/* Layout */
.ytv-layout {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Main container adjustments to prevent double scrollbars */
.yt-teacher-container {
    background: #ffffff;
    color: #333333;
    padding: 0 0 20px;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: none;
}

/* Content wrapper to prevent overflow */
.yt-content-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
}

/* Left column adjustments */
.yt-left-column {
    flex: 6;
    min-width: 300px;
}

.yt-right-column {
    flex: 4;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #e5e7eb;
}

/* Tab content should have local scrolling */
.ytv-tab-content {
    display: none;
}

.ytv-tab-content.ytv-active {
    display: block !important;
}

/* Chapters specific styling */
#ytv-chapters {
    max-height: 500px;
    overflow-y: auto;
}

#ytv-chapters.ytv-active {
    height: auto;
    min-height: 200px;
}

/* Full transcript specific styling */
#ytv-full-transcript {
    max-height: 500px;
    overflow-y: auto;
}

#ytv-full-transcript.ytv-active {
    height: auto;
    min-height: 200px;
}

/* Container that holds both tabs */
.ytv-chapter-tabs + div {
    position: relative;
    height: auto;
    transition: height 0.3s ease;
}

/* Add custom scrollbar styling */
.ytv-tab-content::-webkit-scrollbar {
    width: 8px;
}

.ytv-tab-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ytv-tab-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.ytv-tab-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Dark mode support */
.bb-dark-theme .ytv-tab-content {
    background: #2a2a2a;
}

.bb-dark-theme .ytv-tab-content::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.bb-dark-theme .ytv-tab-content::-webkit-scrollbar-thumb {
    background: #555;
}

.bb-dark-theme .ytv-tab-content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Full transcript tab settings */
#ytv-full-transcript {
    overflow-y: auto;
    background: #ffffff;
    height: 500px;
}

/* Chapters tab settings */
#ytv-chapters {
    overflow-y: auto;
    background: #ffffff;
    height: 500px;
}

/* Modern Chat Styles */
.ytv-chat {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    height: 80%;
    overflow: hidden;
}

/* Chat Messages Container */
.ytv-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
    height: calc(100% - 60px); /* Adjusted to account for input area */
    border: none;
}

/* Base Message Styles */
.ytv-chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
    line-height: 1.5;
    font-size: 15px;
    margin: 8px 0;
    clear: both;
    word-wrap: break-word;
}

/* User Message */
.ytv-chat-user {
    background-color: #2A8E9E;
    color: #ffffff;
    margin-left: auto;
    border-radius: 12px 12px 0 12px;
    text-align: right;
    max-width: 85%;
    padding: 12px 16px;
    position: relative;
    line-height: 1.5;
    font-size: 15px;
    margin: 8px 0;
    clear: both;
    word-wrap: break-word;
    align-self: flex-end;
}

.ytv-chat-user::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -10px;
    width: 20px;
    height: 20px;
    background-color: #2A8E9E;
    clip-path: polygon(0 0, 0% 100%, 100% 100%);
}

/* Assistant Message */
.ytv-chat-assistant {
    background-color: #f8f9fa;
    color: #1f2937;
    margin-right: auto;
    border-radius: 12px 12px 12px 0;
    border: 1px solid #e5e7eb;
    max-width: 85%;
    padding: 12px 16px;
    position: relative;
    line-height: 1.5;
    font-size: 15px;
    margin: 8px 0;
    clear: both;
    word-wrap: break-word;
    align-self: flex-start;
}

.ytv-chat-assistant::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -10px;
    width: 20px;
    height: 20px;
    background-color: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

/* Message States */
.ytv-chat-message.ytv-chat-thinking {
    background-color: #f3f4f6;
    color: #6b7280;
    margin-right: auto;
    border-radius: 12px;
}

.ytv-chat-message.ytv-chat-error {
    background-color: #fee2e2;
    color: #991b1b;
    margin-right: auto;
    border-radius: 12px;
}

/* Message Content Formatting */
.ytv-message-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ytv-message-text p {
    margin: 0;
}

.ytv-message-text p:last-child {
    margin-bottom: 0;
}

.ytv-message-text pre {
    background: #f8fafc;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.4;
}

.ytv-message-text code {
    font-family: monospace;
    background: #f1f5f9;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 14px;
}

.ytv-message-text ul,
.ytv-message-text ol {
    margin: 8px 0;
    padding-left: 24px;
}

.ytv-message-text li {
    margin: 4px 0;
}

.ytv-message-text a {
    color: #2563eb;
    text-decoration: none;
}

.ytv-message-text a:hover {
    text-decoration: underline;
}

.ytv-message-text table {
    border-collapse: collapse;
    margin: 8px 0;
    width: 100%;
}

.ytv-message-text th,
.ytv-message-text td {
    border: 1px solid #e5e7eb;
    padding: 8px;
    text-align: left;
}

.ytv-message-text th {
    background-color: #f8fafc;
}

.ytv-message-text blockquote {
    border-left: 4px solid #e5e7eb;
    margin: 8px 0;
    padding: 8px 16px;
    background-color: #f8fafc;
}

/* Chat Input Area */
.ytv-chat-input {
    padding: 16px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.ytv-chat-textarea {
    width: 100%;
    min-height: 40px;
    max-height: 120px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    resize: none;
    font-size: 15px;
    line-height: 1.5;
    background: #fff;
}

.ytv-chat-textarea:focus {
    outline: none;
    border-color: #2A8E9E;
    box-shadow: 0 0 0 2px rgba(42, 142, 158, 0.1);
}

.ytv-chat-send-btn {
    position: absolute;
    right: 24px;
    bottom: 24px;
    padding: 8px;
    background: #2A8E9E;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ytv-chat-send-btn:hover {
    background: #237c8a;
}

/* Dark Mode Styles */
.bb-dark-theme .ytv-chat {
    background: #1a1a1a;
}

.bb-dark-theme .ytv-chat-messages {
    background: #1a1a1a;
}

.bb-dark-theme .ytv-chat-user {
    background-color: #2A8E9E;
    color: #ffffff;
}

.bb-dark-theme .ytv-chat-user::after {
    background-color: #2A8E9E;
}

.bb-dark-theme .ytv-chat-assistant {
    background-color: #374151;
    color: #fff;
    border-color: #4b5563;
}

.bb-dark-theme .ytv-chat-assistant::after {
    background-color: #374151;
    border-color: #4b5563;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-thinking {
    background-color: #374151;
    color: #9ca3af;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-error {
    background-color: #7f1d1d;
    color: #fecaca;
}

.bb-dark-theme .ytv-message-text pre {
    background: #1f2937;
    border: 1px solid #4b5563;
}

.bb-dark-theme .ytv-message-text code {
    background: #1f2937;
    color: #e5e7eb;
}

.bb-dark-theme .ytv-message-text a {
    color: #60a5fa;
}

.bb-dark-theme .ytv-message-text th,
.bb-dark-theme .ytv-message-text td {
    border-color: #4b5563;
}

.bb-dark-theme .ytv-message-text th {
    background-color: #1f2937;
}

.bb-dark-theme .ytv-message-text blockquote {
    border-color: #4b5563;
    background-color: #1f2937;
}

.bb-dark-theme .ytv-chat-input {
    background: #1a1a1a;
    border-color: #4b5563;
}

.bb-dark-theme .ytv-chat-textarea {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #4b5563;
}

.bb-dark-theme .ytv-chat-textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.1);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .ytv-chat-messages {
        padding: 12px;
        gap: 12px;
    }
    
    .ytv-chat-message,
    .ytv-chat-assistant,
    .ytv-chat-user {
        max-width: 90%;
        padding: 10px 12px;
    }
    
    .ytv-chat-input {
        padding: 12px;
    }
    
    .ytv-chat-textarea {
        font-size: 14px;
    }
    
    .ytv-chat-send-btn {
        right: 20px;
        bottom: 20px;
        padding: 6px;
    }
}

.ytv-chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.ytv-chat-welcome i {
    font-size: 48px;
    color: #019e7c;
    margin-bottom: 16px;
    opacity: 0.8;
}

.ytv-chat-welcome p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

.ytv-chat-message.ytv-chat-thinking {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
}

.ytv-chat-message.ytv-chat-thinking i {
    color: #019e7c;
    animation: pulse 1.5s infinite;
}

.ytv-chat-message.ytv-chat-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Dark mode styles */
.bb-dark-theme .ytv-chat {
    background: #1f2937;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bb-dark-theme .ytv-chat-assistant {
    background: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
}

.bb-dark-theme .ytv-chat-input {
    background: #1f2937;
    border-top-color: #374151;
}

.bb-dark-theme .ytv-chat-textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.bb-dark-theme .ytv-chat-textarea:focus {
    border-color: #019e7c;
    box-shadow: 0 0 0 3px rgba(1, 158, 124, 0.2);
}

.bb-dark-theme .ytv-chat-welcome {
    color: #9ca3af;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.4;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ytv-chat {
        border-radius: 0;
        box-shadow: none;
    }

    .ytv-chat-messages {
        padding: 15px;
    }

    .ytv-chat-message {
        font-size: 14px;
        padding: 10px 14px;
    }

    .ytv-chat-input {
        padding: 12px;
    }

    .ytv-chat-textarea {
        padding: 10px 14px;
        font-size: 14px;
    }

    .ytv-chat-send-btn {
        padding: 10px;
    }

    .ytv-chat-send-btn i {
        font-size: 16px;
    }
}

/* Message content formatting */
.ytv-message-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ytv-message-text pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.ytv-message-text code {
    font-family: monospace;
    font-size: 14px;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

/* Dark mode styles */
.bb-dark-theme .ytv-chat {
    background: #1e1e1e;
}

.bb-dark-theme .ytv-chat-messages {
    background: #1e1e1e;
    scrollbar-color: #666 #1e1e1e;
}

.bb-dark-theme .ytv-chat-messages::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.bb-dark-theme .ytv-chat-assistant {
    background: #2d2d2d;
    color: #e4e4e4;
}

.bb-dark-theme .ytv-chat-input {
    background: #2d2d2d;
    border-top: 1px solid #404040;
}

.bb-dark-theme .ytv-chat-textarea {
    background: #1e1e1e;
    border-color: #404040;
    color: #e4e4e4;
}

.bb-dark-theme .ytv-message-text pre,
.bb-dark-theme .ytv-message-text code {
    background: #161616;
    color: #e4e4e4;
}

.bb-dark-theme .ytv-chat-welcome {
    color: #888;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-thinking {
    color: #888;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

/* Video wrapper */
.ytv-video-wrapper {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 0;
    overflow: hidden;
    background: #000;
    position: relative;
    z-index: 0;
    box-shadow: none;
}

/* Video embed */
.ytv-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.ytv-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Tabs */
.ytv-tabs {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.ytv-tab-btn {
    flex: 1;
    padding: 12px 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    color: #555;
}

.ytv-tab-btn:hover {
    background: #eaeaea;
    color: #000;
}

.ytv-tab-btn.ytv-active {
    border-bottom-color: #000;
    background: #fff;
    color: #000;
}

/* Tab container to hold both chat and summary */
.ytv-tab-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: calc(100% - 50px); /* Adjust for tab buttons height */
    position: relative;
}

/* Dark mode improvements for tab content */
.bb-dark-theme .ytv-tab-content {
    background: #2a2a2a;
    color: #ddd;
    box-shadow: none;
}

.bb-dark-theme .ytv-tab-btn.ytv-active {
    background: #2a2a2a;
    color: #fff;
    border-bottom-color: #0066cc;
}

/* Chapter tabs styling */
.ytv-chapter-tabs {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 16px;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
    width: auto;
    display: inline-flex;
    gap: 20px;
}

.ytv-chapter-tabs .ytv-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
    flex: 0 0 auto;
}

.ytv-chapter-tabs .ytv-tab-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.5px;
    flex-shrink: 0;
}

.ytv-chapter-tabs .ytv-tab-btn.ytv-active {
    color: #019e7c;
}

.ytv-chapter-tabs .ytv-tab-btn.ytv-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #019e7c;
}

.ytv-chapter-tabs .ytv-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

/* Dark mode support */
.bb-dark-theme .ytv-chapter-tabs {
    border-bottom-color: #374151;
}

.bb-dark-theme .ytv-chapter-tabs .ytv-tab-btn {
    color: #9ca3af;
}

.bb-dark-theme .ytv-chapter-tabs .ytv-tab-btn.ytv-active,
.bb-dark-theme .ytv-chapter-tabs .ytv-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

/* Ensure consistent icon sizes */
.ytv-chapter-tabs .ytv-tab-btn i,
.ytv-video-tabs .ytv-tab-btn i {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ensure consistent spacing between icon and text */
.ytv-chapter-tabs .ytv-tab-btn,
.ytv-video-tabs .ytv-tab-btn {
    gap: 6px;
}

/* Ensure consistent tab heights */
.ytv-chapter-tabs,
.ytv-video-tabs {
    height: 40px;
    align-items: center;
}

/* Chapters list styling */
.ytv-chapters-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ytv-chapter-item {
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ytv-chapter-header {
    display: flex;
    align-items: center;
    padding: 16px 12px;
    gap: 24px;
}

.ytv-chapter-time {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    min-width: 36px;
}

.ytv-chapter-title {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 400;
    flex: 1;
}

.ytv-chapter-item:hover {
    background-color: rgba(1, 158, 124, 0.05);
}

.ytv-chapter-item.ytv-active {
    background-color: rgba(1, 158, 124, 0.1);
}

.ytv-chapter-item.ytv-active .ytv-chapter-title {
    color: #019e7c;
}

/* Remove accordion-related styles */
.ytv-chapter-expand,
.ytv-chapter-description,
.ytv-chapter-duration {
    display: none;
}

/* Dark mode support */
.bb-dark-theme .ytv-chapter-item {
    border-color: #374151;
}

.bb-dark-theme .ytv-chapter-title {
    color: #e5e7eb;
}

.bb-dark-theme .ytv-chapter-time {
    color: #9ca3af;
}

.bb-dark-theme .ytv-chapter-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.bb-dark-theme .ytv-chapter-item.ytv-active {
    background-color: rgba(1, 158, 124, 0.1);
}

.bb-dark-theme .ytv-chapter-item.ytv-active .ytv-chapter-title {
    color: #019e7c;
}

/* Transcript */
.ytv-caption-item {
    padding: 8px 0;
    cursor: pointer;
    border-bottom: 1px solid #eaeaea;
    transition: background 0.2s ease;
}

.ytv-caption-item:hover {
    background: #f5f5f5;
}

.ytv-caption-time {
    color: #000;
    font-weight: 600;
    margin-right: 10px;
    font-family: monospace;
}

.ytv-transcript-heading {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
    color: #333;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.ytv-transcript-intro {
    margin: 0 0 20px 0;
    color: #555;
    text-align: center;
    font-style: italic;
    line-height: 1.5;
    padding: 0 15px;
}

/* Chapter-based transcript styling */
.ytv-transcript-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ytv-transcript-chapter-item {
    padding: 0;
    margin-bottom: 15px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.ytv-transcript-chapter-item .ytv-chapter-header {
    padding: 12px 15px;
    background: #f5f5f5;
    cursor: pointer;
    border-bottom: 1px solid #eaeaea;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
}

.ytv-transcript-chapter-item .ytv-chapter-header:hover {
    background: #f9f9f9;
}

.ytv-transcript-chapter-item .ytv-chapter-time {
    color: #000;
    font-weight: 600;
    margin-right: 10px;
    min-width: 40px;
}

.ytv-transcript-chapter-item .ytv-chapter-title {
    font-weight: 600;
    font-size: 16px;
    flex: 1;
}

.ytv-transcript-chapter-item .ytv-chapter-duration {
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

.ytv-transcript-content {
    padding: 15px;
    line-height: 1.6;
    color: #555;
    background: #fff;
    display: block;
}

.ytv-transcript-content .ytv-caption-item {
    padding: 5px 0;
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.ytv-transcript-content .ytv-caption-time {
    min-width: 50px;
    color: #000;
    font-size: 14px;
    background: #f8f8f8;
    padding: 2px 5px;
    border-radius: 4px;
}

.ytv-transcript-content .ytv-caption-text {
    flex: 1;
    line-height: 1.5;
    padding-left: 8px;
}

/* Add expand/collapse indicator */
.ytv-transcript-chapter-item .ytv-chapter-header:after {
    content: "−";
    font-size: 18px;
    font-weight: bold;
    margin-left: 10px;
    transition: transform 0.2s;
}

.ytv-transcript-chapter-item:not(.ytv-chapter-expanded) .ytv-chapter-header:after {
    content: "+";
}

/* Summary */
.ytv-summary {
    display: none; /* Hidden by default until activated */
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    height: 500px;
    box-shadow: none;
}

.ytv-summary.ytv-active {
    display: block !important; /* Force display when active */
}

.ytv-summary h1, 
.ytv-summary h2,
.ytv-summary h3,
.ytv-summary h4,
.ytv-summary h5,
.ytv-summary h6 {
    color: #000;
    margin: 0.5em 0;
    font-weight: 600;
}

.ytv-summary h1 {
    font-size: 1.5em;
}

.ytv-summary p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* Dark mode styles for summary */
.dark-mode .ytv-summary {
    background-color: #2a2a2a !important;
    box-shadow: none;
}

.dark-mode .ytv-summary h1,
.dark-mode .ytv-summary h2,
.dark-mode .ytv-summary h3,
.dark-mode .ytv-summary h4,
.dark-mode .ytv-summary h5,
.dark-mode .ytv-summary h6 {
    color: #fff !important;
}

.dark-mode .ytv-summary p {
    color: #ddd !important;
}

/* Loading - Light mode */
.ytv-loading {
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: none;
}

.ytv-loader {
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid #000;
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error */
.ytv-error {
    color: #ff0000;
    padding: 15px;
    border-radius: 8px;
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    margin-bottom: 20px;
}

.bb-dark-theme .ytv-error {
    color: #ff5f5f;
    background: #3a2a2a;
    border-color: #553333;
}

/* Fix empty chapters placeholder */
.ytv-chapters:empty:before,
.ytv-full-transcript:empty:before {
    content: "Loading content...";
    display: block;
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.bb-dark-theme .ytv-chapters:empty:before,
.bb-dark-theme .ytv-full-transcript:empty:before {
    color: #999;
}

/* Utility classes */
.ytv-hidden {
    display: none !important;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Hide chapters and transcript sections on mobile */
    .ytv-chapter-tabs,
    .ytv-bottom-tabs,
    #ytv-chapters,
    #ytv-full-transcript {
        display: none !important;
    }

    /* Adjust video container for mobile */
    .ytv-video-wrapper {
        margin-bottom: 0;
    }

    /* Adjust right column for mobile */
    .yt-right-column {
        margin-top: 20px;
        width: 100%;
        min-width: 100%;
    }

    /* Ensure chat, summary, and quiz are properly displayed */
    .ytv-main-tabs {
        display: flex;
        justify-content: space-between;
        padding: 0 10px;
        margin-bottom: 15px;
    }

    .ytv-main-tabs .ytv-tab-btn {
        padding: 8px 12px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* Chat container adjustments */
    .ytv-chat {
        min-height: 300px;
        max-height: 50vh;
        overflow: hidden;
    }

    .ytv-chat-messages {
        max-height: calc(50vh - 100px);
        overflow-y: auto;
    }

    .ytv-chat-input {
    padding: 10px;
    }

    .ytv-chat-textarea {
        min-height: 60px;
        max-height: 120px;
    }

    /* Summary and quiz container adjustments */
    .ytv-summary,
    .ytv-quiz {
        min-height: 300px;
        max-height: 50vh;
        overflow-y: auto;
        padding: 15px;
    }

    /* Ensure tab content is properly displayed */
    .ytv-tab-content {
        display: none;
        width: 100%;
    }

    .ytv-tab-content.ytv-active {
        display: block;
    }

    /* Adjust tab container */
    .ytv-tab-container {
        width: 100%;
        min-height: 300px;
    }

    /* Fix spacing issues */
    .yt-content-wrapper {
        gap: 15px;
        padding: 0 10px;
    }

    .yt-teacher-container {
        padding: 0 10px 20px;
    }
}

.ytv-transcript-paragraph {
    margin: 0;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    font-size: 15px;
}

.ytv-transcript-chapters {
    margin-top: 20px;
}

.ytv-transcript-chapter-section {
    margin-bottom: 30px;
    padding: 15px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background: #fff;
}

.ytv-transcript-chapter-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaeaea;
}

.ytv-transcript-paragraph {
    margin: 0;
    line-height: 1.6;
    color: #333;
    font-size: 15px;
    text-align: left;
}

/* Theme toggle - removed as we use BuddyBoss theme toggle */
.yt-header {
    display: none;
}

.ytv-theme-toggle {
    display: none;
}

/* Hide/show icons based on theme - removed */
.ytv-light-theme .ytv-dark-mode,
.ytv-light-mode,
.ytv-dark-mode {
    display: none;
} 

/* Main container - Use BuddyBoss theme's dark mode class */
.bb-dark-theme .yt-teacher-container {
    background: #1a1a1a;
    color: #ffffff;
}

/* Update all theme-related colors to respond to BuddyBoss dark mode */
.bb-dark-theme .ytv-tab-btn {
    color: #ccc !important;
}

.bb-dark-theme .ytv-tab-btn:hover {
    background-color: #3a3a3a !important;
    color: #fff !important;
}

.bb-dark-theme .ytv-tab-btn.ytv-active {
    background-color: #2a2a2a !important;
    color: #fff !important;
    border-bottom-color: #0066cc !important;
}

.bb-dark-theme .ytv-tab-content {
    background-color: #2a2a2a !important;
    color: #ddd !important;
    box-shadow: none;
}

.bb-dark-theme .ytv-tabs {
    background-color: #333 !important;
}

.bb-dark-theme .ytv-full-transcript {
    background: #2a2a2a;
    color: #ddd;
}

.bb-dark-theme .ytv-transcript-heading {
    color: #ddd !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-transcript-intro {
    color: #ddd !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-transcript-chapters {
    background: #2a2a2a;
}

.bb-dark-theme .ytv-transcript-chapter-section {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-transcript-paragraph {
    color: #ccc !important;
}

/* Make sure the transcript area in dark mode has appropriate styling */
.bb-dark-theme #ytv-full-transcript {
    background: #2a2a2a;
}

/* Ensure transcript content is readable in dark mode */
.bb-dark-theme .ytv-transcript-content {
    background: #2a2a2a;
    color: #ddd;
}

/* Fix chat input area in dark mode */
.bb-dark-theme .ytv-chat-textarea {
    background: #1a1a1a !important;
    color: #fff !important;
    border-color: #444 !important;
}

/* Ensure chat messages area has proper background in dark mode */
.bb-dark-theme .ytv-chat-messages {
    background: #1a1a1a !important;
    border-color: #444 !important;
}

/* Fix dark mode chat text and elements */
.bb-dark-theme .ytv-chat-assistant {
    background: #333 !important;
    color: #fff !important;
}

.bb-dark-theme .ytv-chat-welcome {
    color: #ccc !important;
}

/* Fix summary headings in dark mode */
.bb-dark-theme .ytv-summary h1,
.bb-dark-theme .ytv-summary h2,
.bb-dark-theme .ytv-summary h3,
.bb-dark-theme .ytv-summary h4,
.bb-dark-theme .ytv-summary h5,
.bb-dark-theme .ytv-summary h6 {
    color: #fff !important;
}

/* Ensure the overall container has proper dark styling */
.bb-dark-theme .yt-teacher-container {
    background: #1a1a1a;
    color: #fff;
}

.bb-dark-theme .ytv-chapter-item {
    border-color: #444;
}

.bb-dark-theme .ytv-chapter-item:hover {
    background-color: #3a3a3a;
}

.bb-dark-theme .ytv-chapter-item.ytv-chapter-active {
    background-color: #3a3a3a;
    border-left-color: #0066cc;
}

.bb-dark-theme .ytv-chapter-title {
    color: #ddd;
}

.bb-dark-theme .ytv-chapter-time {
    color: #999;
}

.bb-dark-theme .ytv-chapter-description {
    color: #888;
}

.bb-dark-theme .ytv-loader {
    border-color: #333;
    border-top-color: #0066cc;
}

.bb-dark-theme .ytv-loading {
    background: rgba(26, 26, 26, 0.9);
    color: #fff;
    box-shadow: none;
}

.bb-dark-theme .ytv-transcript-chapter-title {
    color: #ddd;
    border-color: #444;
}

.bb-dark-theme .ytv-transcript-paragraph {
    color: #aaa;
}

/* Full Transcript specific styles */
#ytv-full-transcript {
    background: #ffffff;
}

.bb-dark-theme #ytv-full-transcript {
    background: #2a2a2a;
    color: #ddd;
}

/* Summary tab */
#ytv-summary {
    background: #ffffff;
}

.bb-dark-theme #ytv-summary {
    background: #2a2a2a;
    color: #ddd;
}

/* Chat tab */
#ytv-chat {
    background: #ffffff;
    height: 70vh !important;
}

.bb-dark-theme #ytv-chat {
    background: #2a2a2a;
    color: #ddd;
}

/* Chapter tab */
#ytv-chapters {
    background: #ffffff;
}

.bb-dark-theme #ytv-chapters {
    background: #2a2a2a;
    color: #ddd;
}

.bb-dark-theme .ytv-chat-messages {
    background: #1a1a1a;
    border-color: #444;
}

.bb-dark-theme .ytv-chat-assistant {
    background: #333;
    color: #fff;
}

.bb-dark-theme .ytv-chat-textarea {
    background: #1a1a1a;
    color: #fff;
    border-color: #444;
}

.bb-dark-theme .ytv-chat-welcome {
    color: #ccc;
}

.bb-dark-theme .ytv-summary h1,
.bb-dark-theme .ytv-summary h2,
.bb-dark-theme .ytv-summary h3,
.bb-dark-theme .ytv-summary h4,
.bb-dark-theme .ytv-summary h5,
.bb-dark-theme .ytv-summary h6 {
    color: #fff;
}

/* Dark mode global overrides - More specific and with !important */
.bb-dark-theme .yt-teacher-container,
.bb-dark-theme .yt-content-wrapper {
    background-color: #1a1a1a !important;
    color: #fff !important;
}

.bb-dark-theme .ytv-tabs {
    background-color: #333 !important;
}

.bb-dark-theme .ytv-tab-content,
.bb-dark-theme #ytv-full-transcript,
.bb-dark-theme #ytv-summary,
.bb-dark-theme #ytv-chat,
.bb-dark-theme #ytv-chapters {
    background-color: #2a2a2a !important;
    color: #ddd !important;
    box-shadow: none;
}

.bb-dark-theme .ytv-transcript-chapter-section {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-transcript-chapter-title {
    color: #fff !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-transcript-paragraph {
    color: #ccc !important;
}

.bb-dark-theme .ytv-chat-messages {
    background-color: #1a1a1a !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-chat-textarea {
    background-color: #1a1a1a !important;
    color: #fff !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-chat-assistant {
    background-color: #333 !important;
    color: #fff !important;
}

/* Force dark background on chapters */
.bb-dark-theme .ytv-chapters-list li,
.bb-dark-theme .ytv-chapter-item {
    background-color: transparent !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-chapter-item:hover {
    background-color: #3a3a3a !important;
}

.bb-dark-theme .ytv-chapter-item.ytv-chapter-active {
    background-color: #3a3a3a !important;
    border-left-color: #0066cc !important;
}

/* High specificity rules for dark mode */
.bb-dark-theme .yt-teacher-container,
.bb-dark-theme .yt-teacher-container p,
.bb-dark-theme .yt-teacher-container h1, 
.bb-dark-theme .yt-teacher-container h2,
.bb-dark-theme .yt-teacher-container h3,
.bb-dark-theme .yt-teacher-container h4,
.bb-dark-theme .yt-teacher-container h5,
.bb-dark-theme .yt-teacher-container h6,
.bb-dark-theme .yt-teacher-container div,
.bb-dark-theme .yt-teacher-container span {
    color: #ffffff !important;
}

.bb-dark-theme .ytv-tab-content,
.bb-dark-theme #ytv-full-transcript,
.bb-dark-theme #ytv-summary,
.bb-dark-theme #ytv-chat,
.bb-dark-theme #ytv-chapters {
    background-color: #2a2a2a !important;
}

/* Dark mode global overrides - More specific and with !important */ 

#learndash-page-content {
    padding: 0px !important;
    overflow: hidden;
}

.learndash-content-body {
    overflow: hidden;
}

/* Remove duplicate chat layout styles */
.ytv-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.ytv-chat-messages {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 90px; /* Space for input area */
    overflow-y: auto;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.ytv-chat-input {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #ffffff;
    border-top: 1px solid #eaeaea;
    z-index: 10;
}

/* Dark mode chat input styling */
.dark-mode .ytv-chat-input,
.bb-dark-theme .ytv-chat-input {
    background-color: #2a2a2a !important;
    border-top-color: #444 !important;
}

/* Remove duplicate .ytv-summary styles */
.ytv-summary {
    height: 100%;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Remove any unnecessary duplicates */
#ytv-chat .ytv-chat-messages {
    padding-bottom: 90px;
}

/* Chat layout specifically for this structure */
.ytv-chat {
    height: 100% !important;
}

/* Dark mode styles for tabs */
.bb-dark-theme #ytv-full-transcript,
.bb-dark-theme #ytv-chapters {
    background-color: #2a2a2a !important;
    color: #ddd !important;
}

/* Ensure all transcript sections have consistent dark mode styling */
.bb-dark-theme .ytv-transcript-chapter-section {
    background-color: #2a2a2a !important;
    border-color: #444 !important;
}

.bb-dark-theme .ytv-transcript-chapter-title {
    color: #fff !important;
    border-color: #444 !important;
}

/* Summary Controls */
.ytv-summary-controls {
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #e5e5e5;
    text-align: center;
}

#ytv-generate-summary {
    padding: 8px 16px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 15px;
}

#ytv-generate-summary:hover {
    background-color: #333;
}

.dark-mode #ytv-generate-summary {
    background-color: #666;
    color: #fff;
}

.dark-mode #ytv-generate-summary:hover {
    background-color: #999;
}

/* Content tab styles */
.ytv-content {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.ytv-content-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.ytv-content-wrapper img {
    max-width: 100%;
    height: auto;
}

.ytv-content-wrapper p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* Dark mode support for content tab */
.bb-dark-theme .ytv-content {
    background-color: #2a2a2a;
    color: #ddd;
}

.bb-dark-theme .ytv-content-wrapper a {
    color: #0066cc;
}

.bb-dark-theme .ytv-content-wrapper a:hover {
    color: #0088ff;
}

/* Quiz Styles */
.ytv-quiz-section {
    margin-top: 15px;
    padding: 15px;
    background: var(--ytv-bg-color);
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid var(--ytv-border-color);
}

.ytv-quiz-container {
    margin-top: 15px;
}

.ytv-quiz-progress {
    margin-bottom: 15px;
    font-size: 1.1em;
    color: var(--ytv-text-color);
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ytv-border-color);
}

.ytv-quiz-question {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--ytv-bg-color-secondary);
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid var(--ytv-border-color);
}

.ytv-quiz-question h4 {
    margin-bottom: 10px;
    color: var(--ytv-text-color);
    font-size: 1.2em;
}

.ytv-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.ytv-quiz-option {
    display: flex;
    align-items: center;
    background: var(--ytv-bg-color);
    border: 1px solid var(--ytv-border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ytv-quiz-option:hover {
    background: var(--ytv-bg-color-hover);
    border-color: var(--ytv-primary-color);
}

.ytv-quiz-option input[type="radio"] {
    margin-right: 10px;
}

.ytv-quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--ytv-border-color);
}

.ytv-quiz-navigation button {
    min-width: 120px;
    margin: 0 5px;
}

.ytv-quiz-results {
    text-align: center;
    padding: 15px;
    background: var(--ytv-bg-color-secondary);
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid var(--ytv-border-color);
}

.ytv-quiz-results h3 {
    margin-bottom: 10px;
    color: var(--ytv-text-color);
}

.ytv-quiz-results p {
    margin-bottom: 8px;
    color: var(--ytv-text-color);
}

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

/* Course Navigation */
.sfwd-course-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
}

.bb-ld-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.learndash-status-bubble {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    background: #019e7c;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.learndash-status-bubble svg {
    width: 16px;
    height: 16px;
}

.sfwd-course-status {
    font-size: 14px;
    color: #6b7280;
}

.learndash_next_prev_link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.learndash_next_prev_link .prev-link,
.learndash_next_prev_link .next-link,
.learndash_next_prev_link .empty-post {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #6b7280;
    transition: all 0.2s ease;
}

.learndash_next_prev_link .prev-link:hover,
.learndash_next_prev_link .next-link:hover {
    background: #e5e7eb;
    color: #374151;
}

.learndash_next_prev_link svg {
    width: 16px;
    height: 16px;
}

/* Dark mode styles */
.bb-dark-theme .sfwd-course-nav {
    background: #1f2937;
}

.bb-dark-theme .sfwd-course-status {
    color: #9ca3af;
}

.bb-dark-theme .learndash_next_prev_link .prev-link,
.bb-dark-theme .learndash_next_prev_link .next-link,
.bb-dark-theme .learndash_next_prev_link .empty-post {
    background: #374151;
    color: #9ca3af;
}

.bb-dark-theme .learndash_next_prev_link .prev-link:hover,
.bb-dark-theme .learndash_next_prev_link .next-link:hover {
    background: #4b5563;
    color: #f3f4f6;
}

/* Mobile styles */
@media (max-width: 768px) {
    .sfwd-course-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 12px;
    }

    .bb-ld-status {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .sfwd-course-status {
        font-size: 13px;
        text-align: center;
        flex: 1;
        margin: 0 10px;
    }

    .learndash_next_prev_link {
        width: 100%;
        justify-content: center;
        padding-top: 12px;
        border-top: none !important;
    }

    /* Chat input adjustments for mobile */
    .ytv-chat-input {
        padding: 12px;
        gap: 8px;
    }

    .ytv-chat-textarea {
        padding: 10px;
        font-size: 14px;
        min-height: 40px;
    }

    .ytv-chat-send-btn {
        padding: 10px 20px;
        font-size: 14px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ensure proper spacing and alignment */
    .learndash-status-bubble {
        font-size: 13px;
        padding: 6px 12px;
        height: 32px;
    }

    .learndash_next_prev_link .prev-link,
    .learndash_next_prev_link .next-link,
    .learndash_next_prev_link .empty-post {
        width: 32px;
        height: 32px;
    }
} 

.ytv-course-generator {
    max-width: 100%;
    margin: 0;
    padding: 40px;
    background: #fff;
    color: #1a1a1a;
    min-height: 100vh;
    box-sizing: border-box;
}

.ytv-course-generator h2 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 40px;
    color: #1a1a1a;
    text-align: center;
}

.ytv-form-step {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: none;
}

.ytv-form-group {
    margin-bottom: 32px;
}

.ytv-form-group label {
    display: block;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.5;
}

.ytv-form-group label span.required {
    color: #6366f1;
    margin-left: 4px;
}

.ytv-form-group input,
.ytv-form-group select,
.ytv-form-group textarea {
    width: 100%;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #1a1a1a;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.ytv-form-group input:focus,
.ytv-form-group select:focus,
.ytv-form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: none;
}

.ytv-form-group textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.ytv-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 16px;
    padding: 0 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.ytv-submit-btn,
.ytv-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 160px;
    justify-content: center;
}

.ytv-submit-btn {
    background: #000;
    color: #fff;
    border: none;
}

.ytv-submit-btn:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.ytv-secondary-btn {
    background: #fff;
    color: #666;
    border: 1px solid #e5e7eb;
}

.ytv-secondary-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.ytv-progress-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 16px 32px;
    border-radius: 24px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}

.ytv-progress-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.ytv-progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.ytv-progress-fill {
    height: 100%;
    background: #6366f1;
    transition: width 0.3s ease;
}

/* Dark mode support */
.dark-mode .ytv-course-generator {
    background: #1a1a1a;
    color: #fff;
}

.dark-mode .ytv-form-step {
    background: #262626;
    box-shadow: none;
}

.dark-mode .ytv-form-group label {
    color: #fff;
}

.dark-mode .ytv-form-group input,
.dark-mode .ytv-form-group select,
.dark-mode .ytv-form-group textarea {
    background: #333;
    border-color: #404040;
    color: #fff;
}

.dark-mode .ytv-form-group input:focus,
.dark-mode .ytv-form-group select:focus,
.dark-mode .ytv-form-group textarea:focus {
    border-color: #6366f1;
    box-shadow: none;
}

.dark-mode .ytv-progress-indicator {
    background: #262626;
    box-shadow: none;
}

.dark-mode .ytv-progress-bar {
    background: #404040;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .ytv-course-generator {
        padding: 20px;
    }

    .ytv-form-step {
        padding: 20px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .ytv-form-navigation {
        padding: 0 20px;
        flex-direction: column;
    }

    .ytv-submit-btn,
    .ytv-secondary-btn {
        width: 100%;
    }

    .ytv-progress-indicator {
        bottom: 20px;
        width: calc(100% - 40px);
    }
} 

/* Video/Content Tab Switcher */
.ytv-video-tabs {
    background: none !important;
    padding: 0 !important;
    position: relative;
    border-bottom: 1px solid #e5e7eb;
}

.ytv-tab-wrapper {
    display: inline-flex;
    background: none;
    gap: 32px;
}

.ytv-video-tabs .ytv-tab-btn,
.ytv-main-tabs .ytv-tab-btn,
.ytv-chapter-tabs .ytv-tab-btn,
.ytv-top-tab-btn,
.ytv-bottom-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    background: none !important;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    box-shadow: none !important;
}

.ytv-video-tabs .ytv-tab-btn:hover,
.ytv-main-tabs .ytv-tab-btn:hover,
.ytv-chapter-tabs .ytv-tab-btn:hover,
.ytv-top-tab-btn:hover,
.ytv-bottom-tab-btn:hover {
    background: none !important;
    color: #019e7c;
}

.ytv-video-tabs .ytv-tab-btn.ytv-active,
.ytv-main-tabs .ytv-tab-btn.ytv-active,
.ytv-chapter-tabs .ytv-tab-btn.ytv-active,
.ytv-top-tab-btn.ytv-active,
.ytv-bottom-tab-btn.ytv-active {
    color: #019e7c;
    background: none !important;
}

.ytv-video-tabs .ytv-tab-btn.ytv-active::after,
.ytv-main-tabs .ytv-tab-btn.ytv-active::after,
.ytv-chapter-tabs .ytv-tab-btn.ytv-active::after,
.ytv-top-tab-btn.ytv-active::after,
.ytv-bottom-tab-btn.ytv-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #019e7c;
}

/* Dark mode support */
.bb-dark-theme .ytv-video-tabs .ytv-tab-btn,
.bb-dark-theme .ytv-main-tabs .ytv-tab-btn,
.bb-dark-theme .ytv-chapter-tabs .ytv-tab-btn,
.bb-dark-theme .ytv-top-tab-btn,
.bb-dark-theme .ytv-bottom-tab-btn {
    color: #9ca3af;
    background: none !important;
}

.bb-dark-theme .ytv-video-tabs .ytv-tab-btn.ytv-active,
.bb-dark-theme .ytv-main-tabs .ytv-tab-btn.ytv-active,
.bb-dark-theme .ytv-chapter-tabs .ytv-tab-btn.ytv-active,
.bb-dark-theme .ytv-top-tab-btn.ytv-active,
.bb-dark-theme .ytv-bottom-tab-btn.ytv-active {
    color: #019e7c;
    background: none !important;
}

.bb-dark-theme .ytv-video-tabs .ytv-tab-btn:hover,
.bb-dark-theme .ytv-main-tabs .ytv-tab-btn:hover,
.bb-dark-theme .ytv-chapter-tabs .ytv-tab-btn:hover,
.bb-dark-theme .ytv-top-tab-btn:hover,
.bb-dark-theme .ytv-bottom-tab-btn:hover {
    color: #019e7c;
    background: none !important;
}

/* Remove any box shadows */
.ytv-tab-btn,
.ytv-tab-btn:hover,
.ytv-tab-btn:focus,
.ytv-tab-btn:active,
.ytv-tab-btn.ytv-active {
    box-shadow: none !important;
    outline: none !important;
}

/* Ensure chapter expand buttons also have no background */
.ytv-chapter-expand {
    background: none !important;
    border: none;
    box-shadow: none !important;
    outline: none !important;
}

.ytv-chapter-expand:hover,
.ytv-chapter-expand:focus,
.ytv-chapter-expand:active {
    background: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Main Tabs (Right Side) */
.ytv-main-tabs {
    display: flex;
    gap: 24px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.ytv-main-tabs .ytv-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ytv-main-tabs .ytv-tab-btn i {
    font-size: 16px;
}

.ytv-main-tabs .ytv-tab-btn.ytv-active {
    color: #019e7c;
}

.ytv-main-tabs .ytv-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

.ytv-tab-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.yt-right-column .ytv-tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    padding: 16px;
    overflow-y: auto;
}

.yt-right-column .ytv-tab-content.ytv-active {
    display: block;
}

/* Chat specific styles */
.ytv-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ytv-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    min-height: 200px;
}

.ytv-chat-input {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.ytv-chat-textarea {
    flex: 1;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    resize: none;
    font-size: 14px;
}

.ytv-chat-send-btn {
    padding: 8px 16px;
    background: #019e7c;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

/* Dark mode support */
.bb-dark-theme .yt-right-column {
    background: #1a1a1a;
    border-left-color: #374151;
}

.bb-dark-theme .ytv-main-tabs {
    background: #1a1a1a;
    border-bottom-color: #374151;
}

.bb-dark-theme .ytv-main-tabs .ytv-tab-btn {
    color: #9ca3af;
}

.bb-dark-theme .ytv-main-tabs .ytv-tab-btn.ytv-active {
    color: #019e7c;
}

.bb-dark-theme .ytv-main-tabs .ytv-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

.bb-dark-theme .ytv-chat-messages {
    border-color: #374151;
    background: #1a1a1a;
}

.bb-dark-theme .ytv-chat-input {
    background: #1a1a1a;
    border-top-color: #374151;
}

.bb-dark-theme .ytv-chat-textarea {
    background: #1a1a1a;
    border-color: #374151;
    color: #fff;
}

/* Responsive styles */
@media (max-width: 768px) {
    .yt-content-wrapper {
        flex-direction: column;
    }
    
    .yt-right-column {
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
    
    .bb-dark-theme .yt-right-column {
        border-top-color: #374151;
    }
} 

/* Top Tabs (Video/Content) */
.ytv-top-tabs-container {
    margin-bottom: 20px;
}

.ytv-top-tabs {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0;
    background: transparent;
}

.ytv-top-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.ytv-top-tab-btn i {
    font-size: 18px;
}

.ytv-top-tab-btn.ytv-active {
    color: #019e7c;
}

.ytv-top-tab-btn.ytv-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #019e7c;
}

.ytv-top-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

.ytv-top-tab-content {
    display: none;
}

.ytv-top-tab-content.ytv-active {
    display: block;
}

/* Bottom Tabs (Chapters/Transcript) */
.ytv-bottom-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
    position: relative;
    padding: 0;
}

.ytv-bottom-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: none !important;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

.ytv-bottom-tab-btn i {
    width: 16px;
    height: 16px;
}

.ytv-bottom-tab-btn.ytv-active {
    color: #019e7c;
}

.ytv-bottom-tab-btn.ytv-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #019e7c;
}

.ytv-bottom-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

.ytv-bottom-tab-content {
    display: none;
    padding: 0;
    margin: 0;
}

.ytv-bottom-tab-content.ytv-active {
    display: block;
}

/* Dark mode support */
.bb-dark-theme .ytv-top-tabs {
    border-bottom-color: #374151;
}

.bb-dark-theme .ytv-top-tab-btn {
    color: #9ca3af;
}

.bb-dark-theme .ytv-top-tab-btn.ytv-active,
.bb-dark-theme .ytv-top-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

.bb-dark-theme .ytv-bottom-tabs {
    border-bottom-color: #374151;
}

.bb-dark-theme .ytv-bottom-tab-btn {
    color: #9ca3af;
}

.bb-dark-theme .ytv-bottom-tab-btn.ytv-active,
.bb-dark-theme .ytv-bottom-tab-btn:hover:not(.ytv-active) {
    color: #019e7c;
}

/* Responsive styles */
@media (max-width: 768px) {
    .ytv-top-tabs,
    .ytv-bottom-tabs {
        gap: 16px;
    }
    
    .ytv-top-tab-btn,
    .ytv-bottom-tab-btn {
        font-size: 14px;
    }
    
    .ytv-top-tab-btn i,
    .ytv-bottom-tab-btn i {
        font-size: 16px;
    }
} 

.ytv-chat-message {
    max-width: 85%;
    padding: 12px 16px;
    margin: 8px 0;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
}

.ytv-chat-message.user {
    background-color: #019e7c;
    color: #fff;
    margin-left: auto;
    border-radius: 12px 0 12px 12px;
}



.ytv-chat-message.ytv-chat-error {
    background-color: #fff;
    color: #dc3545;
    text-align: center;
    border: 1px solid #dc3545;
    margin: 8px auto;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-error {
    background-color: #2a2a2a;
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.ytv-chat-message.ytv-chat-thinking {
    background-color: transparent;
    color: #666;
    text-align: center;
    margin: 8px auto;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-thinking {
    color: #999;
}

/* User (sent) messages */
.ytv-chat-message.user::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 16px;
    height: 16px;
    background: #019e7c;
    clip-path: polygon(0 0, 0 100%, 100% 100%);
}

/* Assistant (received) messages */
.ytv-chat-message.assistant::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 16px;
    height: 16px;
    background: #f3f4f6;
    clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

/* Message text formatting */
.ytv-message-text {
    white-space: pre-wrap;
}

.ytv-message-text p {
    margin: 0 0 8px 0;
}

.ytv-message-text p:last-child {
    margin-bottom: 0;
}

/* Code blocks */
.ytv-message-text pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
    font-family: monospace;
}

.ytv-message-text code {
    font-family: monospace;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

/* User message code blocks */
.ytv-chat-message.user pre,
.ytv-chat-message.user code {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Lists */
.ytv-message-text ul,
.ytv-message-text ol {
    margin: 8px 0;
    padding-left: 24px;
}

.ytv-message-text li {
    margin: 4px 0;
}

/* Links */
.ytv-message-text a {
    color: #2563eb;
    text-decoration: underline;
}

.ytv-chat-message.user a {
    color: #fff;
}

/* Error messages */
.ytv-chat-message.ytv-chat-error {
    align-self: center;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    max-width: 100%;
    margin: 8px auto;
    padding: 12px 16px;
    text-align: center;
}

/* Typing indicator */
.ytv-chat-message.ytv-chat-thinking {
    align-self: flex-start;
    background: #f3f4f6;
    min-width: 60px;
    padding: 8px 16px;
    border-radius: 16px 16px 16px 4px;
}

/* Dark mode styles */
.bb-dark-theme .ytv-chat-assistant {
    background: #374151;
    color: #fff;
}

.bb-dark-theme .ytv-chat-assistant::after {
    background: #374151;
}

.bb-dark-theme .ytv-message-text pre {
    background: rgba(0, 0, 0, 0.2);
}

.bb-dark-theme .ytv-message-text code {
    background: rgba(0, 0, 0, 0.2);
    color: #e4e4e4;
}

.bb-dark-theme .ytv-message-text a {
    color: #60a5fa;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-thinking {
    background: #374151;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-error {
    background: #7f1d1d;
    color: #fee2e2;
}

/* Tables */
.ytv-message-text table {
    border-collapse: collapse;
    margin: 8px 0;
    width: 100%;
}

.ytv-message-text th,
.ytv-message-text td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px;
    text-align: left;
}

.ytv-message-text th {
    background: rgba(0, 0, 0, 0.05);
}

.bb-dark-theme .ytv-message-text th,
.bb-dark-theme .ytv-message-text td {
    border-color: rgba(255, 255, 255, 0.1);
}

.bb-dark-theme .ytv-message-text th {
    background: rgba(255, 255, 255, 0.05);
}

/* Blockquotes */
.ytv-message-text blockquote {
    margin: 8px 0;
    padding: 8px 16px;
    border-left: 4px solid #e5e7eb;
    background: rgba(0, 0, 0, 0.02);
}

.ytv-chat-message.user .ytv-message-text blockquote {
    border-left-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.bb-dark-theme .ytv-message-text blockquote {
    border-left-color: #4b5563;
    background: rgba(255, 255, 255, 0.02);
}

.bb-dark-theme .ytv-chat-message.ytv-chat-error {
    background: #7f1d1d;
    color: #fee2e2;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-thinking {
    background: #374151;
}

.bb-dark-theme .ytv-chat-message.ytv-chat-error {
    background: #7f1d1d;
    color: #fee2e2;
}

.bb-dark-theme .ytv-message-text table th,
.bb-dark-theme .ytv-message-text table td {
    border-color: rgba(255, 255, 255, 0.1);
}

.bb-dark-theme .ytv-message-text table th {
    background: rgba(255, 255, 255, 0.05);
}

.bb-dark-theme .ytv-message-text blockquote {
    border-left-color: #4b5563;
    background: rgba(255, 255, 255, 0.02);
}

.bb-dark-theme .ytv-chat-message.ytv-chat-error {
    background: #7f1d1d;
    color: #fee2e2;
} 
.ytv-main-tabs .ytv-tab-btn{
    padding: 10px 15px !important;
} 