/*
Theme Name: Portal Rede Alto Tiete
Theme URI: https://portalredealtotietetv.com.br/
Author: Rede Alto Tiete TV
Description: Tema moderno do Portal Rede Alto Tiete TV, integrado a partir do build React/Vite.
Version: 1.0.7
Requires at least: 6.0
Tested up to: 7.0
Text Domain: portal-rede-alto-tiete
*/

html,
body {
    margin: 0 !important;
    min-height: 100% !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

#root {
    min-height: 100vh !important;
    height: auto !important;
    overflow: visible !important;
}

/* Não exibe imagem genérica ou ícone quebrado quando o post não possui mídia. */
img[src=""], img:not([src]) {
    display: none !important;
}

/* Integração: WP ULike, Post Views Counter e wpDiscuz/comentários */
#prat-post-engagement {
    margin: 2.5rem 0 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-family: inherit;
}
#prat-post-engagement[hidden] { display: none !important; }
.prat-engagement-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.25rem;
    padding: 1rem 1.1rem;
    margin-bottom: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .9rem;
    color: #334155;
}
.prat-engagement-item { display: inline-flex; align-items: center; gap: .45rem; }
.prat-engagement-label { font-weight: 600; color: #0f172a; }
.prat-like-box { margin: 1rem 0 2rem; }
.prat-like-box > h3, .prat-comments-heading, .prat-comments-title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    line-height: 1.35;
    color: #111827;
}
#prat-post-engagement .wpulike { margin: 0; }
#prat-post-engagement #comments,
#prat-post-engagement #wpdcom { max-width: none !important; }
.prat-comments-native .comment-list { list-style: none; padding: 0; margin: 0 0 2rem; }
.prat-comments-native .comment-body { padding: 1rem; margin-bottom: 1rem; border: 1px solid #e5e7eb; border-radius: .75rem; }
.prat-comments-native textarea,
.prat-comments-native input[type="text"],
.prat-comments-native input[type="email"],
.prat-comments-native input[type="url"] {
    width: 100%; padding: .75rem; border: 1px solid #cbd5e1; border-radius: .5rem;
}
.prat-comment-submit { padding: .75rem 1.2rem; border: 0; border-radius: .6rem; background: #2563eb; color: #fff; cursor: pointer; }
@media (max-width: 640px) {
    #prat-post-engagement { margin-top: 2rem; }
    .prat-engagement-summary { align-items: flex-start; flex-direction: column; }
}

/* Visualizações exibidas nos metadados da Home e no topo das matérias. */
.prat-card-views { white-space: nowrap; }


/* Player oficial do YouTube na seção "Transmissão ao Vivo" da Home. */
.prat-youtube-live-host {
    padding: 0 !important;
    overflow: hidden !important;
    background: #101b34 !important;
}

.prat-youtube-live {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 300px;
    overflow: hidden;
    border-radius: inherit;
    background: #101b34;
}

.prat-youtube-live iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 767px) {
    .prat-youtube-live {
        min-height: 0;
    }
}

/* Painel de cotações e clima da página inicial. */
.prat-home-info {
    width: min(100% - 2rem, 1050px);
    margin: 2rem auto 2.5rem;
    font-family: inherit;
    color: #0f172a;
}
.prat-info-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.prat-info-heading h2 { margin: .15rem 0 0; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; }
.prat-info-kicker { color: #2563eb; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.prat-info-updated { color: #64748b; font-size: .8rem; }
.prat-info-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 1rem; }
.prat-info-card {
    min-width: 0;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.prat-card-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.prat-card-heading > div { display: flex; align-items: center; gap: .65rem; }
.prat-card-heading > div > span { font-size: 1.35rem; }
.prat-card-heading h3 { margin: 0; font-size: 1.08rem; }
.prat-card-heading p { margin: .15rem 0 0; color: #64748b; font-size: .78rem; }
.prat-quotes-list { display: grid; gap: .15rem; }
.prat-quote-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid #eef2f7; }
.prat-quote-item:last-child { border-bottom: 0; }
.prat-quote-item > div:first-child { display: flex; flex-direction: column; }
.prat-quote-item strong { font-size: .92rem; }
.prat-quote-item span { color: #64748b; font-size: .7rem; }
.prat-quote-value { display: flex; align-items: flex-end; flex-direction: column; font-weight: 800; white-space: nowrap; }
.prat-quote-value small { margin-top: .1rem; font-size: .68rem; }
.prat-quote-value .is-up { color: #15803d; }
.prat-quote-value .is-down { color: #dc2626; }
.prat-quote-value .is-flat { color: #64748b; }
.prat-city-select { max-width: 190px; padding: .5rem 2rem .5rem .7rem; border: 1px solid #cbd5e1; border-radius: .6rem; background: #fff; color: #0f172a; font: inherit; font-size: .78rem; }
.prat-weather-main { display: flex; align-items: center; gap: .8rem; padding: .25rem 0 .8rem; }
.prat-weather-icon { font-size: 3rem; line-height: 1; }
.prat-weather-main > div { display: flex; flex-direction: column; }
.prat-temperature { font-size: 2rem; line-height: 1; }
.prat-weather-main span:last-child { margin-top: .3rem; color: #475569; font-size: .85rem; }
.prat-weather-details { display: flex; flex-wrap: wrap; gap: .55rem 1rem; padding: .65rem .75rem; margin-bottom: .9rem; border-radius: .65rem; background: #f8fafc; color: #475569; font-size: .76rem; }
.prat-forecast-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.prat-forecast-day { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .6rem .3rem; border: 1px solid #e2e8f0; border-radius: .7rem; text-align: center; }
.prat-forecast-day strong { font-size: .75rem; text-transform: capitalize; }
.prat-forecast-day > span:first-of-type { font-size: 1.25rem; }
.prat-forecast-day > span:last-of-type { font-size: .75rem; font-weight: 700; }
.prat-forecast-day small { color: #64748b; font-size: .62rem; }
.prat-source { display: block; margin-top: .8rem; color: #94a3b8; font-size: .65rem; }
.prat-info-loading, .prat-info-error { padding: 1.5rem; border: 1px solid #dbe4f0; border-radius: 1rem; background: #fff; text-align: center; color: #475569; }
.prat-info-error { display: flex; flex-direction: column; gap: .25rem; }
.prat-info-unavailable { color: #64748b; font-size: .85rem; }
@media (max-width: 820px) {
    .prat-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .prat-home-info { width: min(100% - 1rem, 1050px); margin-top: 1.25rem; }
    .prat-info-heading { align-items: flex-start; }
    .prat-info-updated { display: none; }
    .prat-info-card { padding: 1rem; }
    .prat-card-heading { align-items: flex-start; }
    .prat-card-heading { flex-wrap: wrap; }
    .prat-city-select { width: 100%; max-width: none; }
    .prat-forecast-list { grid-template-columns: repeat(2, 1fr); }
}

/* Categoria de cidade exibida nos cards da Home. */
.prat-city-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 24px);
    padding: 4px 12px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
