/* =============================================================================
   VerbaMind - Process Videos Page Styles
   Styles for Process Videos page elements
   Created: November 11, 2025
   ============================================================================= */

/* Page Headers */
h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #6366F1 0%, #84CC16 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #9CA3AF;
    margin-bottom: 2rem;
}

/* Form Elements */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #F9FAFB;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

textarea {
    min-height: 150px;
    resize: vertical;
    font-family: 'Inter', sans-serif;
}

/* Mode Selector (Analysis Type & Processing Mode) */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mode-card {
    padding: 0.65rem;
    background: #1F2937;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.mode-card:hover {
    border-color: #6366F1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.mode-card.active {
    border-color: #6366F1;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.mode-card.active::after {
    content: '✓';
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 16px;
    height: 16px;
    background: #6366F1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.65rem;
}

.mode-icon {
    display: none;
}

.mode-name {
    font-weight: 600;
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
}

.mode-desc {
    font-size: 0.7rem;
    color: #9CA3AF;
    line-height: 1.3;
}

/* Format Grid (Synthesis Format) */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.format-card {
    padding: 0.65rem;
    background: #1F2937;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    position: relative;
}

.format-card:hover {
    border-color: #6366F1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.format-card.active {
    border-color: #6366F1;
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.format-card.active::after {
    content: '✓';
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 16px;
    height: 16px;
    background: #6366F1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.65rem;
}

.format-card .mode-icon {
    display: none;
}

.format-card .mode-name {
    font-weight: 600;
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
}

.format-card .mode-desc {
    font-size: 0.7rem;
    color: #9CA3AF;
    line-height: 1.3;
}

/* Feature Selection */
.feature-selection {
    display: none;
    margin-bottom: 1.5rem;
}

.feature-selection.show {
    display: block;
}

/* Feature Tabs (Category Navigation) */
.feature-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    flex-wrap: wrap;
}

.feature-tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-bottom: -2px;
}

.feature-tab:hover {
    color: #6366F1;
}

.feature-tab.active {
    color: #6366F1;
    border-bottom-color: #6366F1;
}

/* Feature Categories */
.feature-category {
    display: none;
}

.feature-category.active {
    display: block;
}

/* Feature Grid (68 Features) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
}

.feature-checkbox {
    padding: 0.4rem 0.5rem;
    background: #1F2937;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.feature-checkbox:hover {
    border-color: #6366F1;
}

.feature-checkbox.selected {
    border-color: #6366F1;
    background: rgba(99, 102, 241, 0.1);
}

.feature-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    transform: scale(0.85);
}

.feature-checkbox label {
    margin: 0;
    cursor: pointer;
    font-size: 0.8rem;
    flex: 1;
    line-height: 1.3;
}

/* URL Counter */
.url-counter {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin-top: -1rem;
    margin-bottom: 1rem;
}

/* Primary Button */
button.primary {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #6366F1 0%, #84CC16 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    width: 100%;
    margin-top: 1rem;
}

button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

button.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* =============================================================================
   YouTube Search Section
   ============================================================================= */

.yt-search-section {
    margin-bottom: 0;
}

.yt-search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
}

.yt-search-bar input {
    flex: 1;
    margin-bottom: 0;
}

.yt-max-select {
    width: auto !important;
    min-width: 60px;
    padding: 0.75rem 0.5rem;
    margin-bottom: 0;
    font-size: 0.85rem;
    text-align: center;
    flex-shrink: 0;
}

.yt-search-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1.25rem;
    background: #6366F1;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.yt-search-btn:hover {
    background: #4F46E5;
    transform: translateY(-1px);
}

.yt-search-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* AI Toggle */
.yt-ai-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 400;
}

.yt-ai-toggle input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.yt-ai-toggle-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #A5B4FC;
}

.yt-ai-toggle-desc {
    font-size: 0.75rem;
    color: #6B7280;
}

/* Toolbar: filters + sort */
.yt-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    flex-wrap: wrap;
}

.yt-filters {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.yt-filter-chip {
    padding: 0.3rem 0.7rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #9CA3AF;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.yt-filter-chip:hover {
    border-color: rgba(99, 102, 241, 0.5);
    color: #C7D2FE;
}

.yt-filter-chip.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366F1;
    color: #A5B4FC;
}

.yt-sort select {
    padding: 0.3rem 0.6rem;
    background: #1F2937;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #D1D5DB;
    font-size: 0.75rem;
    margin-bottom: 0;
    width: auto;
    cursor: pointer;
}

.yt-result-count {
    font-size: 0.75rem;
    color: #6B7280;
    margin-left: auto;
    white-space: nowrap;
}

/* Load More */
.yt-load-more {
    text-align: center;
    margin-top: 0.75rem;
}

.yt-load-more-btn {
    padding: 0.5rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #D1D5DB;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.yt-load-more-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    color: #A5B4FC;
}

.yt-search-results {
    margin-top: 0.75rem;
}

.yt-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.yt-search-loading,
.yt-search-empty {
    text-align: center;
    padding: 2rem;
    color: #9CA3AF;
    font-size: 0.875rem;
}

.yt-video-card {
    background: #1F2937;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.yt-video-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.yt-video-card.selected {
    border-color: #6366F1;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.yt-card-check {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 24px;
    height: 24px;
    background: rgba(99, 102, 241, 0.9);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
}

.yt-video-card.selected .yt-card-check {
    display: flex;
}

.yt-card-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #111827;
    overflow: hidden;
}

.yt-card-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-card-duration {
    position: absolute;
    bottom: 0.35rem;
    right: 0.35rem;
    padding: 0.15rem 0.4rem;
    background: rgba(0, 0, 0, 0.8);
    color: #F9FAFB;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
}

.yt-card-ai-badge {
    position: absolute;
    top: 0.35rem;
    left: 0.35rem;
    padding: 0.15rem 0.45rem;
    color: #111827;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: help;
}

.yt-card-ai-why {
    font-size: 0.65rem;
    color: #6B7280;
    margin-top: 0.25rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.yt-card-info {
    padding: 0.6rem 0.75rem;
}

.yt-card-title {
    font-weight: 600;
    color: #F9FAFB;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
    min-height: 2.1em;
}

.yt-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}

.yt-card-channel {
    font-size: 0.7rem;
    color: #9CA3AF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.yt-card-views {
    font-size: 0.65rem;
    color: #6B7280;
    white-space: nowrap;
    flex-shrink: 0;
}

.yt-search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
}

.yt-selected-count {
    font-size: 0.85rem;
    color: #A5B4FC;
    font-weight: 500;
}

.yt-add-selected-btn {
    padding: 0.5rem 1.25rem;
    background: #84CC16;
    border: none;
    border-radius: 6px;
    color: #1F2937;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.yt-add-selected-btn:hover {
    background: #65A30D;
    transform: translateY(-1px);
}

.yt-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #6B7280;
    font-size: 0.8rem;
}

.yt-divider::before,
.yt-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.yt-divider span {
    padding: 0 1rem;
}

/* Results Section */
.results {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
