/* =============================================================================
   Daily Zoomie — Global Styles
   Applies uniform Nunito font and site-wide design tokens across all pages.
   ============================================================================= */

/* --- Design Tokens --------------------------------------------------------- */
:root {
    --font-primary:  'Nunito', sans-serif;
    --color-navy:    #003366;
    --color-gold:    #c4b83b;
    --color-cream:   #EDE5C5;
    --color-orange:  #ff7a00;
    --color-text:    #222;      /* bumped from #333 — stronger contrast */
    --color-muted:   #444;      /* bumped from #555 */
    --radius-card:   12px;
}

/* --- Uniform Font ---------------------------------------------------------- */
/*
 * Astra ships Poppins on many elements via high-specificity selectors.
 * The wildcard below overrides everything; icon fonts are restored below it.
 */
*,
*::before,
*::after {
    font-family: var(--font-primary) !important;
}

/* Restore icon / symbol fonts so dashicons and FA don't render as boxes */
.dashicons,
.dashicons-before::before,
[class^="dashicons-"],
[class*=" dashicons-"],
.fa, .fas, .far, .fab, .fal,
[class^="fa-"],
[class*=" fa-"] {
    font-family: dashicons, "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

/* --- Base Typography ------------------------------------------------------- */
/*
 * Astra sets its own body font-size via the customizer. Override it here.
 * !important is needed only on body; component-level rules beat h1–h4
 * via specificity without it.
 */
body {
    font-size: 16px !important;
    color: var(--color-text) !important;
    line-height: 1.65 !important;
}

h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-navy);
    line-height: 1.2;
    margin: 0 0 16px;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.3;
    margin: 32px 0 12px;
}

h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.3;
    margin: 24px 0 10px;
}

h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-navy);
    margin: 20px 0 8px;
}

p {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 16px;
    color: var(--color-text);
}

@media (max-width: 768px) {
    h1 { font-size: 26px; }
    h2 { font-size: 22px; margin-top: 24px; }
    h3 { font-size: 18px; margin-top: 20px; }
    h4 { font-size: 16px; }
}

/* --- Zoomie Post Template -------------------------------------------------- */
.zoomie-post {
    max-width: 720px;   /* tightened from 800px — ~65 char line length */
    margin: 30px auto;
    line-height: 1.65;
    padding: 28px 32px;
    text-align: left;
    background-color: var(--color-cream);
    color: var(--color-text);
    border-radius: var(--radius-card);
}

@media (max-width: 600px) {
    .zoomie-post { padding: 20px 18px; }
}

/* Overrides the global h2 margin for the article title — intentionally tighter */
.zoomie-post h2.zoomie-post__heading {
    color: var(--color-navy);
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;  /* no top margin — it's the first element */
}

.zoomie-post p {
    font-size: 16px;
    color: var(--color-text);
    line-height: 1.65;
    margin-bottom: 16px;
}

/* --- Section Headings ------------------------------------------------------ */
.zoomie-section {
    margin-top: 40px;
}

.zoomie-section__title {
    color: var(--color-navy);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Breed Image Block ------------------------------------------------------ */
.zoomie-breed-image {
    flex-shrink: 0;
    width: 180px;
    text-align: center;
}

.zoomie-breed-image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 8px;
}

.zoomie-breed-image .photo-credit {
    font-size: 10px;
    color: #666;
    font-style: italic;
    line-height: 1.2;
    margin: 0;
    text-align: center;
}

.zoomie-breed-image .photo-credit a {
    color: #0073aa;
    text-decoration: underline;
}

/* --- Video Block ----------------------------------------------------------- */
.zoomie-video-wrap {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 15px;
    background: var(--color-cream);
    border-radius: 12px;
}

.zoomie-video-wrap iframe {
    border-radius: 8px;
    flex-shrink: 0;
}

/* --- Quiz Block ------------------------------------------------------------ */
.zoomie-quiz {
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #FDF8EE;
    margin-top: 20px;
    background-color: var(--color-cream);
}

.zoomie-quiz__options {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.zoomie-quiz__option {
    margin-bottom: 10px;
    padding: 12px;
    background: #FDF8EE;
    border-radius: 8px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.zoomie-quiz__option .letter {
    color: var(--color-orange);
    font-weight: bold;
}

.zoomie-quiz__answer {
    background: #e6edf3;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

.zoomie-quiz__answer-body {
    margin-top: 10px;
    padding: 12px;
    background: #fff;
    border-left: 4px solid var(--color-orange);
    border-radius: 5px;
}

/* --- AI Prompt Block ------------------------------------------------------- */
.zoomie-ai-prompt {
    font-style: normal;
    color: #444;
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}

.zoomie-chatgpt-btn {
    background: var(--color-orange);
    color: #fff;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background 0.2s;
}

.zoomie-chatgpt-btn:hover {
    background: #e06600;
    color: #fff;
}

/* --- Breed Detail Page (single-zoomie_breed) ------------------------------- */
.zoomie-breed-detail {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

.zoomie-breed-detail .card-inner h2 {
    margin-bottom: 15px;
    color: var(--color-text);
}

.zoomie-breed-detail .breed-image-wrap {
    width: 100%;
    max-width: 450px;
    height: 370px;
    overflow: hidden;
    border-radius: 10px;
    margin: 15px auto;
}

.zoomie-breed-detail .breed-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zoomie-breed-detail .breed-body {
    font-size: 16px;
    color: var(--color-text);
    text-align: left;
    line-height: 1.65;
    margin-top: 15px;
}

/* --- Links ----------------------------------------------------------------- */
.zoomie-read-more {
    color: #0056b3;
    text-decoration: underline;
    font-weight: bold;
    font-size: 15px;
}


/* --- News Snapshot Styling --- */
.news-snapshot__read-more {
    color: var(--color-navy) !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    margin-left: 5px;
}

.news-snapshot__read-more:hover {
color: #ffb347 !important;
    text-decoration: underline !important;
    opacity: 1;
}

.news-snapshot__source {
    font-size: 14px !important;
    color: var(--color-muted) !important; /* Plain gray text, no link style */
    margin-top: 8px !important;
    font-style: normal !important;
}
.zb-breed-caption {
    font-size: 13px;
    font-style: italic;
    color: #4682b4;
    text-align: center;
    padding: 10px 5px 0;
    line-height: 1.2;
}

/* --- Navbar Breed Search --------------------------------------------------- */

/* Remove Astra's built-in search icon (was beside Games) */
.ast-header-search {
    display: none !important;
}

/* Nav list item — zero out any extra padding so it sits flush like other items */
.zoomie-nav-search-item {
    list-style: none !important;
    display: flex !important;
    align-items: stretch !important;
    padding: 0 !important;
    margin: 0 !important;
}

#zoomie-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    /* row-reverse puts the button on the RIGHT so the input expands LEFT */
    flex-direction: row-reverse;
}

/*
 * Toggle button — styled to look identical to Astra's .astra-search-icon <a>.
 * No border-radius, no background on hover; just color + opacity transitions
 * matching the rest of the nav links.
 */
#zoomie-search-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    border-radius: 0;
    line-height: 1;
    transition: color 0.2s ease, opacity 0.2s ease;
    flex-shrink: 0;
    height: 100%;
}

#zoomie-search-toggle:hover,
#zoomie-search-wrapper.active #zoomie-search-toggle {
    background: transparent;
    color: inherit;
    opacity: 0.7;
}

/* Search input — collapsed by default */
#zoomie-search-input {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    border-bottom: 2px solid transparent;
    outline: none;
    background: transparent;
    pointer-events: none;
    transition:
        width   0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.28s ease,
        padding 0.28s ease,
        border-color 0.28s ease;
    font-size: 14px;
    color: inherit;
    line-height: 1.4;
    white-space: nowrap;
}

/* Expanded state */
#zoomie-search-wrapper.active #zoomie-search-input {
    width: 220px;
    opacity: 1;
    padding: 4px 8px;
    pointer-events: all;
    border-bottom-color: var(--color-gold);
}

/* Autocomplete dropdown — body-level, works above Astra's header too */
#zoomie-breed-dropdown {
    display: none;
    position: fixed;
    min-width: 260px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    z-index: 999999;
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
    animation: zsearch-drop 0.18s ease forwards;
}

@keyframes zsearch-drop {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Result items */
.zsearch-item {
    display: block;
    padding: 11px 16px;
    text-decoration: none !important;
    color: var(--color-navy) !important;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #f0ede3;
    transition: background 0.15s ease;
    cursor: pointer;
}

.zsearch-item:last-child {
    border-bottom: none;
}

.zsearch-item:hover,
.zsearch-item:focus {
    background: var(--color-cream) !important;
    color: var(--color-navy) !important;
    outline: none;
}

/* Highlighted match text */
.zsearch-item mark {
    background: rgba(196, 184, 59, 0.35);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.zsearch-empty {
    padding: 14px 16px;
    color: #888;
    font-size: 14px;
}

/* Mobile: narrower input */
@media (max-width: 600px) {
    #zoomie-search-wrapper.active #zoomie-search-input {
        width: 150px;
    }
    #zoomie-search-results {
        min-width: 200px;
        right: -10px;
    }
}

/* --- Mobile header: logo + site title sizing ------------------------------- */
@media (max-width: 921px) {
    .custom-logo-link img,
    .ast-custom-logo img,
    img.custom-logo {
        max-height: 40px !important;
        width: auto !important;
    }

    .site-title,
    .ast-site-title {
        font-size: 16px !important;
        line-height: 1.2 !important;
    }
}
