/**
 * titleQuickViewModal.css - Title Quick View Modal Styles
 *
 * Mobile-first responsive design for the title quick view modal.
 *
 * @since 2026-02-03
 */

/* Modal sizing - mobile first */
#titleQuickViewModal .modal-dialog {
    max-width: 600px;
    margin: 0;
}

/* On mobile (< 576px), use full screen via Bootstrap's modal-fullscreen-sm-down */

/* Tablet and up - centered modal with margins */
@media (min-width: 576px) {
    #titleQuickViewModal .modal-dialog {
        margin: 1.75rem auto;
    }
}

/* Action row (#tqvmActionBar) is styled entirely by heroActionBar.css — same
   shared system the title detail hero, book modal, video game modal, place
   quick view, and every other entity action bar uses. Nothing custom here. */

/* Tabs wrapper - sticky on scroll */
.tqvm-tabs-wrapper {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--mv-border-color);
}

.tqvm-tabs-wrapper .nav-tabs {
    border-bottom: none;
}

.tqvm-tabs-wrapper .nav-link {
    border-radius: 0;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    font-size: 0.9rem;
}

.tqvm-tabs-wrapper .nav-link.active {
    border-bottom-color: #0d6efd;
    color: #0d6efd;
    background: transparent;
}

.tqvm-tabs-wrapper .nav-link:hover:not(.active) {
    border-bottom-color: var(--mv-border-color);
    background: #f8f9fa;
}

/* Title Block */
.tqvm-title-block {
    background: #f8f9fa;
    border-bottom: 1px solid var(--mv-border-color);
}

/* Poster */
.tqvm-poster-wrap {
    position: relative;
    width: 100px;
}

.tqvm-poster {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tqvm-trailer-btn {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    opacity: 0.9;
}

.tqvm-trailer-btn:hover {
    opacity: 1;
}

/* Larger poster on tablet+ */
@media (min-width: 576px) {
    .tqvm-poster-wrap {
        width: 130px;
    }

    .tqvm-trailer-btn {
        padding: 0.25rem 0.6rem;
        font-size: 0.75rem;
    }
}

/* Title info */
.tqvm-title-info {
    min-width: 0; /* Allow text truncation */
}

.tqvm-title-info h5 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (min-width: 576px) {
    .tqvm-title-info h5 {
        font-size: 1.25rem;
    }
}

/* Text truncation helpers */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Score badges - match existing site styles */
.tqvm-title-block .score-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tqvm-title-block .score-badge .score-label {
    font-weight: 400;
    opacity: 0.8;
}

.tqvm-title-block .imdb-score {
    background: #f5c518;
    color: #000;
}

.tqvm-title-block .rt-score {
    color: #fff;
}

.tqvm-title-block .rt-score.rt-fresh {
    background: #fa320a;
}

.tqvm-title-block .rt-score.rt-rotten {
    background: #0ac855;
}

.tqvm-title-block .tmdb-score {
    background: #01b4e4;
    color: #fff;
}

/* Genre badges */
.tqvm-genre-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    background: #e9ecef;
    color: #495057;
    border-radius: 3px;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* Sections */
.tqvm-section {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--mv-border-color);
}

.tqvm-section:last-child {
    border-bottom: none;
}

.tqvm-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.tqvm-section-title i {
    color: #6c757d;
}

/* Synopsis */
#tqvmSynopsis {
    line-height: 1.5;
    color: #212529;
}

/* Cast & Crew */
#tqvmCastContent .tqvm-cast-group {
    margin-bottom: 0.5rem;
}

#tqvmCastContent .tqvm-cast-group:last-child {
    margin-bottom: 0;
}

#tqvmCastContent .tqvm-cast-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.8rem;
}

#tqvmCastContent .tqvm-cast-names {
    color: #212529;
    font-size: 0.85rem;
}

/* Streaming services */
.tqvm-streaming-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border: 1px solid var(--mv-border-color);
    border-radius: 4px;
    font-size: 0.8rem;
}

.tqvm-streaming-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.tqvm-streaming-item .tqvm-streaming-name {
    font-weight: 500;
    color: #212529;
}

.tqvm-streaming-item .tqvm-streaming-type {
    font-size: 0.7rem;
    color: #6c757d;
}

.tqvm-no-streaming {
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
}

/* Action button styling is handled by the shared heroActionBar.css via the
   #tqvmActionBar wrapper. No per-button id overrides here — those caused
   the inconsistent yellow/grey colors you saw. */

/* User data container adjustments */
#tqvmUserDataContainer {
    padding-top: 0.5rem !important;
}

#tqvmUserDataContainer .nav-tabs-sm {
    font-size: 0.8rem;
}

#tqvmUserDataContainer .nav-tabs-sm .nav-link {
    padding: 0.35rem 0.5rem;
}

/* Awards display */
.tqvm-award-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 3px;
    margin-right: 0.35rem;
    margin-bottom: 0.25rem;
}

.tqvm-award-badge.oscar {
    background: #c9a227;
    color: #fff;
}

.tqvm-award-badge.emmy {
    background: #c49a6c;
    color: #fff;
}

.tqvm-award-badge.golden-globe {
    background: #ffcb05;
    color: #000;
}

/* Modal footer */
#titleQuickViewModal .modal-footer {
    justify-content: space-between;
}

/* ========================================
   DARK MODE OVERRIDES
   ======================================== */

[data-bs-theme="dark"] .tqvm-tabs-wrapper {
    background: var(--mv-bg-card);
    border-bottom-color: var(--mv-border-color);
}
[data-bs-theme="dark"] .tqvm-tabs-wrapper .nav-link {
    color: var(--mv-text-muted);
}
[data-bs-theme="dark"] .tqvm-tabs-wrapper .nav-link:hover:not(.active) {
    border-bottom-color: var(--mv-border-color);
    background: var(--mv-bg-surface);
}
[data-bs-theme="dark"] .tqvm-title-block {
    background: var(--mv-bg-surface);
    border-bottom-color: var(--mv-border-color);
}
[data-bs-theme="dark"] .tqvm-genre-badge {
    background: var(--mv-bg-hover);
    color: var(--mv-text-secondary);
}
[data-bs-theme="dark"] .tqvm-section {
    border-bottom-color: var(--mv-border-color);
}
[data-bs-theme="dark"] .tqvm-section-title {
    color: var(--mv-text-secondary);
}
[data-bs-theme="dark"] .tqvm-section-title i {
    color: var(--mv-text-muted);
}
[data-bs-theme="dark"] #tqvmSynopsis {
    color: var(--mv-text-primary);
}
[data-bs-theme="dark"] #tqvmCastContent .tqvm-cast-label {
    color: var(--mv-text-secondary);
}
[data-bs-theme="dark"] #tqvmCastContent .tqvm-cast-names {
    color: var(--mv-text-primary);
}
[data-bs-theme="dark"] .tqvm-streaming-item {
    background: var(--mv-bg-surface);
    border-color: var(--mv-border-color);
}
[data-bs-theme="dark"] .tqvm-streaming-item .tqvm-streaming-name {
    color: var(--mv-text-primary);
}
[data-bs-theme="dark"] .tqvm-streaming-item .tqvm-streaming-type {
    color: var(--mv-text-muted);
}
[data-bs-theme="dark"] .tqvm-no-streaming {
    color: var(--mv-text-muted);
}
[data-bs-theme="dark"] .tqvm-action-buttons {
    background: var(--mv-bg-surface);
}
