/**
 * userTitleData.css - Styles for User Title Data Component
 */

/* Tab styling - smaller tabs (use class selector for prefixed IDs) */
.your-title-data-card .nav-tabs .nav-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
}

/* Quick tab compact styling */
.your-title-data-card .tab-pane label {
    margin-bottom: 0.25rem;
}

/* Tags tab */
.your-title-data-card [id$="TagsDisplay"] {
    min-height: 30px;
}

.your-title-data-card [id$="TagsDisplay"] .badge {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.your-title-data-card [id$="TagsPresets"] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* RIYL tab */
.your-title-data-card [id$="RiylContainer"] {
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
}

.your-title-data-card [id$="RiylContainer"] .similar-scroll-row {
    padding: 0.5rem 0;
}

/* Viewings tab */
.utd-viewings-list {
    max-height: 250px;
    overflow-y: auto;
}

.utd-viewing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.utd-viewing-item:last-child {
    border-bottom: none;
}

.utd-viewing-info {
    flex: 1;
    min-width: 0;
    font-size: 0.85rem;
}

.utd-viewing-info strong {
    font-weight: 500;
}

@media (max-width: 576px) {
    .utd-viewing-info {
        font-size: 0.8rem;
    }
}

.utd-viewing-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.utd-viewing-actions .btn {
    padding: 0.15rem 0.4rem;
}

/* Notes tab */
.your-title-data-card [id$="NotesTextarea"] {
    resize: vertical;
    min-height: 80px;
    font-size: 0.9rem;
}

.your-title-data-card [id$="NotesSaveStatus"] {
    font-size: 0.75rem;
}

/* Collapse toggle */
.your-title-data-card .utd-collapse-toggle {
    color: #6c757d;
    text-decoration: none;
}

.your-title-data-card .utd-collapse-toggle:hover {
    color: #495057;
}

/* Modal specific styles */
.utd-modal-content {
    min-height: 250px;
}

#userTitleDataModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Age group selector - consistent button sizing.
   margin: 0 !important kills the 4px bottom margin Bootstrap (or another stylesheet)
   adds to <label class="btn"> elements; that margin was offsetting the note toggle
   by 2px because the marginless <button> centered to true row mid while the
   margined <label> sat above it. */
.age-group-selector .btn {
    min-width: 44px;
    padding: 0.2rem 0.4rem;
    font-size: 0.72rem;
    margin: 0 !important;
}
/* Note toggle sits next to the age buttons — square, no min-width.
   Heights match the age labels (same btn-sm + font-size + padding), and
   align-self + margin: 0 pin it to the row's vertical center to override
   browser defaults that shift <button> 2px lower than <label>. */
.age-group-selector .age-group-reason-toggle {
    min-width: 0;
    padding: 0.2rem 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin: 0 !important;
    vertical-align: middle;
}

/* Inline label+control rows (Recommend, Watch Again, Ages) — keep label
   on the same line as the control group. Label never shrinks; the control
   container may wrap internally on narrow screens. */
.utd-inline-row .utd-inline-label {
    flex-shrink: 0;
    white-space: nowrap;
}
.utd-inline-row > div {
    flex: 1 1 auto;
    min-width: 0;
}
/* Ages row uses align-items-start so the "Ages:" label stays on the top
   line (with the buttons) instead of vertically centering to the middle
   of the component when the optional "Why?" note input is visible below.
   Small padding-top fine-tunes the label's baseline to match the button text. */
.utd-ages-row .utd-inline-label {
    padding-top: 0.15rem;
}

/* Recommend toggle: thumb icons inflate button height vs the icon-less
   Watch Again row. Shrink the icon and trim vertical padding so the row
   matches the surrounding btn-group-sm rows. */
.recommend-toggle .btn-group-sm > .btn,
.recommend-toggle .btn-sm {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    line-height: 1.2;
}
.recommend-toggle .btn .bi {
    font-size: 0.85em;
    vertical-align: -1px;
}

/* ========================================
   Episode-progress row at bottom of Quick tab
   "Watched: [bar 23 of 50] [pill 3 Seasons, 12 EPs] [Browse ⌄]"
   ======================================== */
.utd-ep-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.utd-ep-progress-label {
    font-size: 0.78rem;
    color: var(--mv-text-secondary);
    flex-shrink: 0;
    font-weight: 600;
}
.utd-ep-progress-bar {
    flex: 1;
    height: 16px;
    background: var(--mv-border-color);
    border-radius: 8px;
    overflow: hidden;
    min-width: 80px;
    position: relative;
}
.utd-ep-progress-fill {
    height: 100%;
    background: #198754;
    transition: width 0.3s ease;
}
.utd-ep-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    letter-spacing: 0.2px;
}
/* When nothing is watched, drop the white-on-green and show muted text instead */
.utd-ep-progress-bar.is-empty .utd-ep-progress-text {
    color: var(--mv-text-secondary);
    text-shadow: none;
}
.utd-ep-progress-pill {
    font-size: 0.68rem;
    background: var(--mv-bg-surface);
    border: 1px solid var(--mv-border-color);
    color: var(--mv-text-primary);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}
.utd-ep-progress-pill .bi {
    color: #ffc107;
    font-size: 0.65rem;
}
.utd-ep-progress-btn {
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1.4 !important;
}
.utd-ep-progress-btn .bi-chevron-down {
    font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .your-title-data-card .nav-tabs .nav-link {
        font-size: 0.75rem;
        padding: 0.25rem 0.4rem;
    }

    .your-title-data-card .nav-tabs .nav-link i {
        display: none;
    }
}

/* ========================================
   DARK MODE OVERRIDES
   ======================================== */

[data-bs-theme="dark"] .utd-viewing-item {
    border-bottom-color: var(--mv-border-color);
}
[data-bs-theme="dark"] .your-title-data-card .utd-collapse-toggle {
    color: var(--mv-text-muted);
}
[data-bs-theme="dark"] .your-title-data-card .utd-collapse-toggle:hover {
    color: var(--mv-text-secondary);
}
