/*
 Theme Name:   BoxOffice Child
 Theme URI:    https://boxofficeradar.com
 Description:  GeneratePress child theme for BoxOffice Tracker — SEO optimized
 Author:       BoxOffice Team
 Template:     generatepress
 Version:      1.1.0
 Text Domain:  boxoffice-child
*/

/* === Base === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.7;
    color: #1a1a2e;
}

/* === Breadcrumbs === */
.bo-breadcrumbs {
    margin: 0 0 20px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.bo-breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.bo-breadcrumbs li {
    display: inline;
}

.bo-breadcrumbs a {
    color: #0073aa;
    text-decoration: none;
}

.bo-breadcrumbs a:hover {
    text-decoration: underline;
}

.bo-breadcrumb-sep {
    color: #999;
    margin: 0 4px;
}

/* === Table of Contents === */
.bo-toc {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    padding: 16px 20px;
    margin: 20px 0 30px;
}

.bo-toc strong {
    display: block;
    font-size: 15px;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.bo-toc ol {
    margin: 0;
    padding-left: 20px;
}

.bo-toc li {
    margin: 6px 0;
    font-size: 14px;
}

.bo-toc a {
    color: #0073aa;
    text-decoration: none;
}

.bo-toc a:hover {
    text-decoration: underline;
}

/* === FAQ Section === */
.bo-faq {
    margin: 30px 0;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}

.bo-faq h2 {
    margin-top: 0;
}

.bo-faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.bo-faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.bo-faq-item h3 {
    font-size: 16px;
    margin: 0 0 8px;
    color: #1a1a2e;
}

.bo-faq-item p {
    margin: 0;
    color: #444;
    line-height: 1.6;
}

/* === Responsive Table Wrapper === */
.bo-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.bo-table-wrapper:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* === Box Office Tables === */
.bo-collection-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 600px;
}

.bo-collection-table th,
.bo-collection-table td {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    text-align: right;
}

.bo-collection-table th {
    background: #1a1a2e;
    color: #fff;
    font-weight: 600;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bo-collection-table th[scope="col"] {
    white-space: nowrap;
}

.bo-collection-table tr:nth-child(even) {
    background: #f8f9fa;
}

.bo-collection-table tr:hover {
    background: #e8f4f8;
}

.bo-collection-table td:first-child {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.bo-collection-table .total-row {
    background: #e8f5e9 !important;
    font-weight: bold;
}

.bo-collection-table .bo-week-row {
    background: #e3f2fd !important;
}

.bo-occupancy-cell {
    font-size: 12px;
    white-space: nowrap;
}

/* === Positive / Negative Values === */
.bo-positive {
    color: #2e7d32;
    font-weight: 600;
}

.bo-negative {
    color: #d32f2f;
    font-weight: 600;
}

/* === Movie Profile === */
.bo-movie-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.bo-movie-poster {
    flex: 0 0 200px;
}

.bo-movie-poster img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.bo-movie-info {
    flex: 1;
}

.bo-movie-info h1 {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.3;
}

.bo-movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.bo-movie-meta span {
    background: #f0f0f1;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.bo-verdict-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
}

.bo-verdict-alltimeblockbuster { background: #1b5e20; }
.bo-verdict-blockbuster        { background: #2e7d32; }
.bo-verdict-superhit           { background: #388e3c; }
.bo-verdict-hit                { background: #43a047; }
.bo-verdict-average            { background: #f57c00; }
.bo-verdict-flop               { background: #d32f2f; }
.bo-verdict-disaster           { background: #b71c1c; }

.bo-last-updated {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

/* === Stat Cards === */
.bo-stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.bo-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.bo-stat-card .label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bo-stat-card .value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-top: 4px;
}

/* === Ratings Row === */
.bo-ratings-row {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.bo-rating-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.bo-rating-imdb {
    background: #f5c518;
    color: #000;
}

.bo-rating-bms {
    background: #e23744;
    color: #fff;
}

/* === Verdict Analysis === */
.bo-verdict-analysis {
    margin: 15px 0;
}

.bo-verdict-text {
    margin-top: 15px;
    line-height: 1.7;
    color: #333;
}

/* === OTT Info === */
.bo-ott-info p {
    margin-top: 15px;
    line-height: 1.7;
    color: #333;
}

/* === Article Meta === */
.bo-article-meta {
    color: #888;
    font-size: 13px;
    margin-bottom: 20px;
}

.bo-article-meta a {
    color: #0073aa;
}

.bo-meta-sep {
    margin: 0 8px;
}

/* === Editorial Content === */
.bo-editorial-content {
    margin: 20px 0;
    line-height: 1.8;
}

/* === Cast Grid === */
.bo-cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.bo-cast-card {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
}

.bo-cast-card small {
    color: #666;
}

/* === Related Movies === */
.bo-related {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.bo-related h2 {
    margin-top: 0;
}

.bo-related ul {
    padding-left: 20px;
}

.bo-related li {
    margin: 8px 0;
}

.bo-related a {
    color: #0073aa;
    text-decoration: none;
}

.bo-related a:hover {
    text-decoration: underline;
}

/* === Hub Pages === */
.bo-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.bo-hub-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.bo-hub-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bo-hub-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.bo-hub-card-body {
    padding: 15px;
}

.bo-hub-card-body h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.bo-hub-card-body .bo-collection-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2e7d32;
}

/* === Person Profile === */
.bo-person-header {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

.bo-person-photo {
    flex: 0 0 180px;
}

.bo-person-photo img {
    width: 100%;
    border-radius: 50%;
}

/* === Sections spacing === */
.bo-single-movie section,
.bo-single-report section,
.bo-single-quicknews section {
    margin: 30px 0;
}

.bo-single-movie h2,
.bo-single-report h2,
.bo-single-quicknews h2 {
    font-size: 22px;
    margin-top: 0;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* === Responsive === */
@media (max-width: 768px) {
    .bo-movie-header,
    .bo-person-header {
        flex-direction: column;
    }

    .bo-movie-poster,
    .bo-person-photo {
        flex: none;
        max-width: 200px;
        margin: 0 auto;
    }

    .bo-movie-info h1 {
        font-size: 20px;
        text-align: center;
    }

    .bo-movie-meta {
        justify-content: center;
    }

    .bo-stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .bo-stat-card .value {
        font-size: 18px;
    }

    .bo-collection-table {
        font-size: 12px;
    }

    .bo-collection-table th,
    .bo-collection-table td {
        padding: 6px 8px;
    }

    .bo-cast-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bo-toc {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .bo-stat-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .bo-stat-card {
        padding: 10px;
    }

    .bo-stat-card .value {
        font-size: 16px;
    }

    .bo-cast-grid {
        grid-template-columns: 1fr;
    }
}

/* === Milestone Tracker === */
.bo-milestone-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 15px 0;
}

.bo-milestone-table th,
.bo-milestone-table td {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    text-align: right;
}

.bo-milestone-table th {
    background: #1a1a2e;
    color: #fff;
    font-weight: 600;
    text-align: center;
}

.bo-milestone-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.bo-milestone-table tr:nth-child(even) {
    background: #f8f9fa;
}

.bo-milestone-table tr:hover {
    background: #e8f4f8;
}

/* === Budget vs Profit Box === */
.bo-profit-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.bo-profit-formula {
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 15px;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.bo-profit-formula code {
    background: #e8f4f8;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* === Key Highlights === */
.bo-highlights-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.bo-highlights-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    border-bottom: 1px solid #f0f0f1;
    line-height: 1.6;
    font-size: 14px;
}

.bo-highlights-list li:last-child {
    border-bottom: none;
}

.bo-highlights-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 8px;
    color: #2e7d32;
    font-weight: 700;
    font-size: 16px;
}

/* === Comparison Table === */
.bo-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 15px 0;
}

.bo-comparison-table th,
.bo-comparison-table td {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    text-align: right;
}

.bo-comparison-table th {
    background: #1a1a2e;
    color: #fff;
    font-weight: 600;
    text-align: center;
}

.bo-comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.bo-comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

.bo-comparison-table tr:hover {
    background: #e8f4f8;
}

.bo-current-movie-row {
    background: #e3f2fd !important;
    font-weight: 700;
}

.bo-current-movie-row td {
    font-weight: 700;
}

/* === Overseas Summary Cards === */
.bo-overseas-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

/* === Weekend Table reuses bo-collection-table styles === */

/* === Responsive additions for new sections === */
@media (max-width: 768px) {
    .bo-milestone-table,
    .bo-comparison-table {
        font-size: 12px;
    }

    .bo-milestone-table th,
    .bo-milestone-table td,
    .bo-comparison-table th,
    .bo-comparison-table td {
        padding: 6px 8px;
    }

    .bo-overseas-breakdown {
        grid-template-columns: repeat(2, 1fr);
    }

    .bo-profit-box {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .bo-overseas-breakdown {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

/* === Print styles === */
@media print {
    .bo-toc,
    .bo-breadcrumbs,
    .bo-related,
    .bo-faq,
    .bo-profit-formula {
        display: none;
    }

    .bo-collection-table {
        font-size: 10px;
    }
}
