/*
Theme Name: The Pidgin Blog
Theme URI: https://thepidginblog.com
Author: The Pidgin Blog
Author URI: https://thepidginblog.com
Description: Football Vibes. No Long Yarns. A sleek, dark sports blog theme for The Pidgin Blog featuring live match scores, video streams, category sections, and a glassmorphic navigation — built with Tailwind CSS and Google Material Symbols.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pidgin-blog
Tags: dark, sports, blog, news, football, tailwind, custom-header, custom-menu, featured-images, post-formats, sticky-post, threaded-comments, responsive-layout
*/

/* =============================================================
   THEME COLOURS (Tailwind Zinc/Emerald palette)
   ============================================================= */
:root {
    --color-background:    #09090b; /* Zinc 950  */
    --color-surface:       #18181b; /* Zinc 900  */
    --color-surface-hover: #27272a; /* Zinc 800  */
    --color-accent:        #10b981; /* Emerald 500 */
    --color-accent-hover:  #059669; /* Emerald 600 */
    --color-error:         #ef4444; /* Red 500    */
    --color-text:          #f4f4f5; /* Zinc 100   */
    --color-muted:         #a1a1aa; /* Zinc 400   */
    --font-primary:        "Plus Jakarta Sans", sans-serif;
}

/* =============================================================
   BASE RESETS (Tailwind handles most; these cover WP specifics)
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Text selection */
::selection {
    background: var(--color-accent);
    color: #fff;
}

/* =============================================================
   MATERIAL SYMBOLS ICON SETTINGS
   ============================================================= */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* =============================================================
   SCROLLBAR HIDE UTILITY
   ============================================================= */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* =============================================================
   WORDPRESS ALIGNMENT CLASSES
   ============================================================= */
.alignleft  { float: left;  margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em;  }
.aligncenter { display: block; margin: 0 auto 1em; }
.alignwide  { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull  { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }

/* =============================================================
   WORDPRESS CORE BLOCK / CONTENT STYLES (single posts)
   ============================================================= */
.entry-content {
    color: var(--color-muted);
    line-height: 1.8;
    font-size: 1.0625rem;
}
.entry-content h1, .entry-content h2,
.entry-content h3, .entry-content h4,
.entry-content h5, .entry-content h6 {
    color: var(--color-text);
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2em;
    margin-bottom: 0.6em;
}
.entry-content p  { margin-bottom: 1.25em; }
.entry-content a  { color: var(--color-accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--color-accent-hover); }
.entry-content ul, .entry-content ol { padding-left: 1.5em; margin-bottom: 1.25em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 1em 1.5em;
    margin: 2em 0;
    background: var(--color-surface);
    border-radius: 0 12px 12px 0;
    color: var(--color-text);
    font-style: italic;
}
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.entry-content table th,
.entry-content table td {
    border: 1px solid rgba(255,255,255,0.08);
    padding: 0.6em 0.9em;
    text-align: left;
}
.entry-content table th { background: var(--color-surface); color: var(--color-text); font-weight: 600; }

/* =============================================================
   WIDGET AREA STYLES
   ============================================================= */
.widget { margin-bottom: 2em; }
.widget-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-bottom: 0.75em;
    margin-bottom: 1em;
}
.widget a { color: var(--color-muted); }
.widget a:hover { color: var(--color-accent); }
.widget ul { list-style: none; padding: 0; }
.widget ul li { padding: 0.35em 0; border-bottom: 1px solid rgba(255,255,255,0.04); }

/* =============================================================
   COMMENT STYLES
   ============================================================= */
#comments { margin-top: 3em; }
.comments-title, .comment-reply-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.5em;
}
.comment-list { list-style: none; padding: 0; }
.comment { padding: 1em 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.comment-meta { font-size: 0.8rem; color: var(--color-muted); margin-bottom: 0.5em; }
.comment-content { color: var(--color-muted); }
.comment-form input, .comment-form textarea {
    width: 100%;
    background: var(--color-surface);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.75em 1em;
    color: var(--color-text);
    font-family: var(--font-primary);
    margin-bottom: 1em;
    outline: none;
    transition: border-color 0.2s;
}
.comment-form input:focus, .comment-form textarea:focus {
    border-color: var(--color-accent);
}
.comment-form .submit {
    background: var(--color-accent);
    color: #000;
    font-weight: 700;
    border: none;
    padding: 0.75em 2em;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.comment-form .submit:hover  { background: var(--color-accent-hover); }
.comment-form .submit:active { transform: scale(0.97); }

/* =============================================================
   PAGINATION
   ============================================================= */
.pagination .nav-links { display: flex; gap: 0.5em; flex-wrap: wrap; }
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-muted);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--color-accent);
    color: #000;
}

/* =============================================================
   SEARCH FORM
   ============================================================= */
.search-form { display: flex; gap: 0.5em; }
.search-form .search-field {
    flex: 1;
    background: var(--color-surface);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.6em 1em;
    color: var(--color-text);
    font-family: var(--font-primary);
    outline: none;
}
.search-form .search-submit {
    background: var(--color-accent);
    color: #000;
    border: none;
    padding: 0.6em 1.25em;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* =============================================================
   LIVE MATCH SCORE CARDS (custom post meta)
   ============================================================= */
.tpb-score-card {
    flex: none;
    width: 260px;
    background: var(--color-surface);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 1rem;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.2s;
}
.tpb-score-card:hover { border-color: rgba(255,255,255,0.10); }
.tpb-score-card .team-badge {
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 700; color: #fff;
}

/* =============================================================
   CATEGORY BADGE COLOURS
   ============================================================= */
.cat-badge { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.cat-badge-accent  { background: var(--color-accent);  color: #000; }
.cat-badge-emerald { color: #34d399; }
.cat-badge-blue    { color: #60a5fa; }

/* =============================================================
   IFRAME EMBED PLAYER
   Inserted by tpbLaunchEmbed() when user clicks a video card.
   ============================================================= */
iframe.tpb-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    border-radius: inherit;
}

/* =============================================================
   BULLETPROOF BACKGROUNDS — no Tailwind custom tokens needed.
   Every surface that was transparent gets a guaranteed raw CSS
   colour. These use !important so they win over any Tailwind
   utility that failed to resolve its custom token.
   ============================================================= */

/* ── Main glassmorphic nav ───────────────────────────────────── */
nav.fixed {
    background-color: rgba(9, 9, 11, 0.88) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ── Category scroller bar ───────────────────────────────────── */
div.fixed.top-20 {
    background-color: rgba(9, 9, 11, 0.97) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* ── Mobile hamburger menu panel ─────────────────────────────── */
/* Covers hidden→visible toggle, absolute positioning, all states */
#mobile-menu {
    background-color: #18181b !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
}
#mobile-menu:not(.hidden) {
    background-color: #18181b !important;
}
/* Belt and braces: target the inner padding div too */
#mobile-menu > div {
    background-color: #18181b !important;
}

/* ── Search panel dropdown ───────────────────────────────────── */
#tpb-search-panel {
    background-color: rgba(24, 24, 27, 0.98) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* ── Surface-coloured cards (bg-surface token fallback) ──────── */
/* Score cards, article cards, replay sidebar, transfer cards */
.bg-surface,
.hover\:bg-surface:hover,
.bg-surface\/40,
.bg-surface\/30 {
    background-color: #18181b;
}

/* ── Transfer Shakara card hover animations ─────────────────────
   group-hover:bg-surface and group-hover:text-accent both depend
   on the Tailwind custom token resolving. These CSS rules
   guarantee the animations fire regardless. */
.group:hover .group-hover\:text-accent {
    color: #10b981 !important;
}
.group:hover .group-hover\:text-white {
    color: #ffffff !important;
}
/* Card background darkens on hover */
article.group:hover,
div.group:hover {
    background-color: #18181b;
}
/* Transfer Shakara specific — the full card hover */
section article.group {
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
section article.group:hover {
    background-color: #18181b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
section article.group:hover h4 {
    color: #10b981 !important;
}

/* ── Animate-pulse on status dots (accent + error) ───────────── */
/* Tailwind animate-pulse works fine natively — these are backups */
.bg-accent { background-color: #10b981; }
.bg-error  { background-color: #ef4444; }
.text-accent { color: #10b981; }
.text-error  { color: #ef4444; }

/* ── Background colour tokens ───────────────────────────────────*/
.bg-background { background-color: #09090b; }
.bg-surface     { background-color: #18181b; }
.bg-surface-hover { background-color: #27272a; }

/* =============================================================
   SKIP LINK (ACCESSIBILITY)
   ============================================================= */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent);
    color: #000;
    padding: 8px 16px;
    z-index: 9999;
    font-weight: 700;
    border-radius: 0 0 8px 0;
    transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* =============================================================
   PRINT STYLES
   ============================================================= */
@media print {
    nav, footer, .tpb-live-scores, .tpb-stream-section { display: none; }
    body { background: #fff; color: #000; }
    .entry-content a { color: #000; text-decoration: underline; }
}
