/*
Theme Name: GeneratePress Child
Theme URI: https://usnotes.org
Description: Child theme for GeneratePress
Author: US Notes
Template: generatepress
Version: 1.0.0
*/

@import url("../generatepress/style.css");

/* Admin: postbox header indent */
.postbox-header {
    padding-left: 10px;
}

/* Hide site branding (title) from nav bar */
.site-branding {
    display: none;
}

/* Prevent nav bar from overflowing viewport */
body {
    overflow-x: hidden;
}

.main-navigation {
    width: 100%;
    float: none;
}

/* ── Google Fonts ─────────────────────────────────── */
body { font-family: 'Inter', sans-serif; }

/* ── Reading progress bar ─────────────────────────── */
#usn-progress {
    position: fixed;
    top: 0; left: 0;
    width: 0%;
    height: 3px;
    background: #b22234;
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ── Post card hover (archive/home) ───────────────── */
.post {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 8px;
}
.post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* ── Category pill badges ─────────────────────────── */
.cat-links a, .entry-categories a {
    display: inline-block;
    background: #3c3b6e;
    color: #fff !important;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 600;
    text-decoration: none !important;
    margin: 0 3px 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cat-links a:hover, .entry-categories a:hover {
    background: #b22234;
}

/* ── Read time badge ──────────────────────────────── */
.usn-read-time {
    font-size: 0.82em;
    color: #888;
    margin: 0.3em 0 1.2em;
    font-weight: 500;
}

/* ── Read More button ─────────────────────────────── */
.read-more-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 20px;
    background-color: var(--accent, #3c3b6e);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: 600;
    transition: opacity 0.2s;
}
.read-more-btn:hover {
    opacity: 0.82;
    color: #fff !important;
}

/* ── Related posts ────────────────────────────────── */
.eiw-related {
    margin: 3em 0 1em;
    padding-top: 1.5em;
    border-top: 2px solid #eee;
}
.eiw-related h3 {
    font-size: 1em;
    margin-bottom: 1em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
}
.eiw-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1em;
}
.eiw-related-item {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
}
.eiw-related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.eiw-related-item img {
    width: 100%; height: 120px;
    object-fit: cover; display: block;
}
.eiw-related-item a {
    display: block;
    padding: 0.6em 0.8em;
    font-size: 0.83em;
    font-weight: 600;
    color: #222 !important;
    text-decoration: none !important;
    line-height: 1.35;
}

/* ── Navigation styling ───────────────────────────── */
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
    color: #b22234;
}
@media (min-width: 769px) {
    .main-navigation .main-nav ul > li > a {
        display: block;
        text-align: center;
        font-size: 13px;
        font-weight: bold;
        color: #3c3b6e;
        padding-left: 0;
        padding-right: 0;
        line-height: 60px;
    }
    .main-navigation .inside-navigation {
        max-width: 1200px !important;
        padding: 0 !important;
    }
    .main-navigation .main-nav {
        width: 100%;
    }
    .main-navigation .main-nav ul {
        display: flex !important;
        justify-content: space-evenly;
        width: 100%;
        float: none;
        margin: 0;
        padding: 0;
    }
    .main-navigation .main-nav ul > li {
        flex: 1;
        float: none;
        text-align: center;
    }
    .main-navigation .main-nav ul > li > a {
        display: block;
        text-align: center;
    }
}
@media (min-width: 1000px) {
    .main-navigation .main-nav ul > li > a {
        font-size: 16px;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ── Mobile nav ───────────────────────────────────── */
@media (max-width: 768px) {
    .site-header,
    .site-header .inside-header,
    #mobile-menu-control-wrapper { padding: 0 !important; }

    .mobile-menu-control-wrapper .menu-toggle,
    .mobile-menu-control-wrapper .menu-toggle:hover,
    .mobile-menu-control-wrapper .menu-toggle:focus {
        color: #3c3b6e !important;
        padding-top: 0.4em !important;
        padding-bottom: 0.4em !important;
        font-size: 0.85em;
        min-height: 0;
        line-height: 1.4;
        background-color: transparent !important;
    }

    .mobile-menu-control-wrapper button.menu-toggle {
        display: flex !important;
        flex-direction: row-reverse;
        align-items: center;
    }
    .mobile-menu-control-wrapper .menu-toggle .gp-icon + .mobile-menu {
        padding-left: 0;
        padding-right: 9px;
    }

    #page { padding-top: 0 !important; margin-top: 0 !important; }
    .site-content, .content-area, .site-main { padding-top: 0 !important; margin-top: 0 !important; }
    .site.grid-container { padding-top: 0 !important; }
    .separate-containers .inside-article { padding: 16px !important; }
    .separate-containers .post { margin-bottom: 6px !important; }
    .separate-containers article:first-of-type { margin-top: 6px !important; }
}

.mobile-menu-control-wrapper .menu-toggle,
.mobile-menu-control-wrapper .menu-toggle:hover,
.mobile-menu-control-wrapper .menu-toggle:focus,
.has-inline-mobile-toggle #site-navigation.toggled {
    background-color: transparent !important;
}

/* ── Quick Facts Card ─────────────────────────────── */
.usn-quick-facts {
    border: 1px solid #e0e4ea;
    border-radius: 10px;
    overflow: hidden;
    margin: 1.8em 0 2em;
    font-family: 'Inter', sans-serif;
}
.usn-quick-facts-header {
    background: #0a1628;
    color: #fff;
    padding: 0.6em 1.1em;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.usn-quick-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0;
    background: #f8f9fb;
}
.usn-quick-fact {
    padding: 0.85em 1.1em;
    border-right: 1px solid #e0e4ea;
    border-bottom: 1px solid #e0e4ea;
}
.usn-quick-fact:last-child { border-right: none; }
.usn-fact-label {
    font-size: 0.68em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin-bottom: 0.25em;
}
.usn-fact-value {
    font-size: 0.92em;
    font-weight: 600;
    color: #0a1628;
    line-height: 1.3;
}

/* ── Rarity Badges ────────────────────────────────── */
.usn-rarity {
    display: inline-block;
    font-size: 0.68em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
    line-height: 1.6;
}
.usn-rarity-common   { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.usn-rarity-scarce   { background: #e3f0ff; color: #1a4f9c; border: 1px solid #b3d1f7; }
.usn-rarity-rare     { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.usn-rarity-key-date { background: #fdecea; color: #b22234; border: 1px solid #f5b7b1; }

/* ── Collector Tip Callout ────────────────────────── */
.usn-tip {
    background: #f0f4ff;
    border-left: 4px solid #3c3b6e;
    border-radius: 0 8px 8px 0;
    padding: 1em 1.2em;
    margin: 1.4em 0;
    font-family: 'Inter', sans-serif;
}
.usn-tip-label {
    font-size: 0.72em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #3c3b6e;
    margin-bottom: 0.4em;
}
.usn-tip p, .usn-tip-body {
    font-size: 0.9em;
    color: #333;
    line-height: 1.6;
    margin: 0;
}
.usn-tip strong { color: #0a1628; }

@media (max-width: 600px) {
    .usn-quick-facts-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Rarity Chart ─────────────────────────────────── */
.usn-rarity-chart {
    border: 1px solid #e0e4ea;
    border-radius: 10px;
    overflow: hidden;
    margin: 2em 0;
    font-family: 'Inter', sans-serif;
}
.usn-rarity-chart-header {
    background: #0a1628;
    color: #fff;
    padding: 0.6em 1.1em;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.usn-rarity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875em;
    background: #fff;
}
.usn-rarity-table thead tr {
    background: #f0f2f6;
}
.usn-rarity-table th {
    text-align: left;
    padding: 0.65em 1em;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #555;
    border-bottom: 2px solid #e0e4ea;
}
.usn-rarity-table td {
    padding: 0.7em 1em;
    border-bottom: 1px solid #eef0f4;
    color: #222;
    vertical-align: middle;
    line-height: 1.4;
}
.usn-rarity-table tbody tr:last-child td {
    border-bottom: none;
}
.usn-rarity-table tbody tr:hover {
    background: #f8f9fb;
}
.usn-rarity-badge {
    display: inline-block;
    font-size: 0.72em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 3px 9px;
    border-radius: 4px;
    line-height: 1.5;
    white-space: nowrap;
}
.usn-rb-common   { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.usn-rb-scarce   { background: #e3f0ff; color: #1a4f9c; border: 1px solid #b3d1f7; }
.usn-rb-rare     { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.usn-rb-key-date { background: #fdecea; color: #b22234; border: 1px solid #f5b7b1; }

/* ── Audio Player ─────────────────────────────────── */
.usn-listen-wrap {
    margin: 0 0 2em;
    padding: 1em 1.25em;
    background: #0a1628;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
}
.usn-listen-label {
    margin: 0 0 0.6em;
    font-size: 0.82em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.usn-listen-wrap audio {
    width: 100%;
    display: block;
    height: 36px;
    border-radius: 4px;
}
.usn-listen-credit {
    margin: 0.5em 0 0;
    font-size: 0.72em;
    color: rgba(255,255,255,0.5);
}

@media (max-width: 600px) {
    .usn-rarity-table th:nth-child(3),
    .usn-rarity-table td:nth-child(3) { display: none; }
}
