/* ==========================================================
 *  GlosTV Channel Header — Estilos
 *  Versão: 1.3.0
 *
 *  Alterações em 1.3.0:
 *  - Isolamento reforçado: todo seletor prefixado com
 *    .glostv-header para não vazar no tema.
 *  - SVGs com dimensões explícitas via CSS para impedir
 *    que regras do tema causem "explosão" de tamanho.
 *  - Área de toque expandida para 48 px (pseudo-elemento
 *    invisível) mantendo visual de 30 px / 26 px.
 *  - Tooltip de "Link copiado!" devidamente isolado.
 *  - Botões sociais e label "Compartilhar" forçados para
 *    #333/#555 (seletores de alta especificidade) para
 *    sobrescrever o tema Newspaper.
 *  - Todo #1877f2 removido dos botões sociais; hover usa
 *    #333 unificado. Tags de categoria mantêm hover azul.
 * ========================================================== */

/* ----------------------------------------------------------
 *  @font-face — Fontes self-hosted
 *  (escopo global por especificação CSS — inevitável)
 * ---------------------------------------------------------- */
@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/lato-black.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/open-sans-medium.woff2') format('woff2');
}

/* ----------------------------------------------------------
 *  Base
 * ---------------------------------------------------------- */
.glostv-header {
    font-family: Arial, sans-serif;
    background: #f9f9f9;
}

.glostv-header *,
.glostv-header *::before,
.glostv-header *::after {
    box-sizing: border-box;
}

.glostv-header .glostv-header-content {
    background: #fff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.glostv-header .glostv-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* ----------------------------------------------------------
 *  Info: Logo + Texto + Tags
 * ---------------------------------------------------------- */
.glostv-header .glostv-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.glostv-header .glostv-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    flex-shrink: 0;
    border-radius: 8px;
}

.glostv-header .glostv-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: -10px;
    max-width: 400px;
}

.glostv-header .glostv-nome {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 31px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    font-family: 'Lato', Arial, sans-serif !important;
    white-space: nowrap;
    letter-spacing: 0.11px;
    border: none !important;
    background: none !important;
}

.glostv-header .glostv-slogan {
    margin: 8px 0 0 !important;
    padding: 0 !important;
    color: #666 !important;
    font-size: 15px !important;
    font-family: 'Inter', Arial, sans-serif !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.09px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----------------------------------------------------------
 *  Tags de categoria
 * ---------------------------------------------------------- */
.glostv-header .glostv-tags {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.glostv-header .glostv-tag {
    background: #f1f3f4 !important;
    color: #5f6368 !important;
    padding: 4px 8px;
    font-size: 14px;
    font-family: 'Open Sans', Arial, sans-serif;
    font-weight: 500;
    text-decoration: none !important;
    border-radius: 6px;
    border: none !important;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}

.glostv-header .glostv-tag:link,
.glostv-header .glostv-tag:visited {
    color: #5f6368 !important;
    text-decoration: none !important;
}

.glostv-header .glostv-tag:empty {
    display: none !important;
}

.glostv-header .glostv-tag:hover {
    background: #1877f2 !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none !important;
}

.glostv-header .glostv-tag:active {
    opacity: 0.9;
}

/* ----------------------------------------------------------
 *  Compartilhamento — Container e Label
 * ---------------------------------------------------------- */
.glostv-header .glostv-social-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: -10px;
    flex-shrink: 0;
}

.glostv-header .glostv-social-container .glostv-social-label {
    font-size: 12px;
    color: #333 !important;
    margin: 0;
    font-weight: normal;
}

.glostv-header .glostv-social {
    display: flex;
    gap: 10px;
}

/* ----------------------------------------------------------
 *  Compartilhamento — Botões (estado padrão)
 *
 *  Ícone: #555 (cinza médio)  |  Fundo: #f1f1f1 (cinza claro)
 *  Tamanho visual: 30 px (desktop) / 26 px (mobile)
 *  Touch target: 48 px via ::before invisível
 * ---------------------------------------------------------- */
.glostv-header .glostv-social .glostv-share-btn,
.glostv-header .glostv-social a.glostv-share-btn,
.glostv-header .glostv-social a.glostv-share-btn:link,
.glostv-header .glostv-social a.glostv-share-btn:visited,
.glostv-header .glostv-social button.glostv-share-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555 !important;
    background: #f1f1f1 !important;
    border-radius: 50%;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, color 0.3s ease,
                box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    border: none !important;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

/* SVG ícones — dimensões explícitas contra override do tema */
.glostv-header .glostv-social .glostv-share-btn svg {
    display: block !important;
    flex-shrink: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: 15px !important;
    max-height: 15px !important;
    fill: #555 !important;
    color: #555 !important;
    pointer-events: none;
}

/* Touch target — área clicável mínima 48 px (invisível) */
.glostv-header .glostv-social .glostv-share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
}

/* ----------------------------------------------------------
 *  Compartilhamento — Botões (hover)
 *
 *  Fundo hover: #333 (cinza escuro, NÃO azul)
 *  Ícone hover: #fff (branco)
 * ---------------------------------------------------------- */
.glostv-header .glostv-social .glostv-share-btn:hover,
.glostv-header .glostv-social a.glostv-share-btn:hover,
.glostv-header .glostv-social button.glostv-share-btn:hover {
    transform: scale(1.15);
    color: #fff !important;
    background-color: #333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-decoration: none !important;
}

.glostv-header .glostv-social .glostv-share-btn:hover svg {
    fill: #fff !important;
    color: #fff !important;
}

/* ----------------------------------------------------------
 *  Compartilhamento — Botões (active e focus)
 * ---------------------------------------------------------- */
.glostv-header .glostv-social .glostv-share-btn:active {
    transform: scale(0.95);
}

.glostv-header .glostv-social .glostv-share-btn:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* ----------------------------------------------------------
 *  Tooltip "Link copiado!"
 * ---------------------------------------------------------- */
.glostv-header .glostv-copy-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    font-family: Arial, sans-serif;
    font-weight: normal;
    line-height: 1.4;
    z-index: 10;
}

.glostv-header .glostv-copy-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.glostv-header .glostv-copy-tooltip.glostv-show {
    opacity: 1;
    visibility: visible;
}

/* ----------------------------------------------------------
 *  Desktop (≥ 769px)
 * ---------------------------------------------------------- */
@media (min-width: 769px) {
    .glostv-header .glostv-header-content {
        margin-bottom: -5px;
        margin-top: 0;
    }

    .glostv-header .glostv-social-container .glostv-social-label {
        font-weight: bold;
        color: #333 !important;
    }

    .glostv-header .glostv-social {
        gap: 6px;
    }

    .glostv-header .glostv-text {
        margin-top: -20px;
    }

    .glostv-header .glostv-slogan {
        margin: 0 !important;
    }

    .glostv-header .glostv-social-container {
        margin-top: -20px;
    }
}

/* ----------------------------------------------------------
 *  Mobile (≤ 768px)
 * ---------------------------------------------------------- */
@media (max-width: 768px) {
    .glostv-header .glostv-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .glostv-header .glostv-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 5px;
    }

    .glostv-header .glostv-text {
        max-width: 100%;
        margin-top: 0;
    }

    .glostv-header .glostv-nome {
        font-size: 24px !important;
        text-align: center;
        white-space: normal;
        letter-spacing: normal;
    }

    .glostv-header .glostv-slogan {
        font-size: 13px !important;
        text-align: center;
        white-space: normal;
        overflow: visible;
        text-overflow: initial;
        letter-spacing: normal;
    }

    .glostv-header .glostv-tags {
        justify-content: center;
        margin-top: 8px;
    }

    .glostv-header .glostv-tag {
        font-size: 13px;
        padding: 3px 6px;
        border-radius: 4px;
    }

    .glostv-header .glostv-social-container {
        flex-direction: column;
        align-items: center;
        margin-top: -5px;
        gap: 4px;
    }

    .glostv-header .glostv-social {
        gap: 4px;
    }

    /* Botões 26 px no mobile — mesma paleta cinza */
    .glostv-header .glostv-social .glostv-share-btn,
    .glostv-header .glostv-social a.glostv-share-btn,
    .glostv-header .glostv-social a.glostv-share-btn:link,
    .glostv-header .glostv-social a.glostv-share-btn:visited,
    .glostv-header .glostv-social button.glostv-share-btn {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        color: #555 !important;
        background: #f5f5f5 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        opacity: 0.85;
    }

    /* SVGs proporcionalmente menores no mobile */
    .glostv-header .glostv-social .glostv-share-btn svg {
        max-width: 13px !important;
        max-height: 13px !important;
        fill: #555 !important;
    }

    .glostv-header .glostv-social .glostv-share-btn:hover,
    .glostv-header .glostv-social a.glostv-share-btn:hover,
    .glostv-header .glostv-social button.glostv-share-btn:hover {
        color: #fff !important;
        background-color: #333 !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
        opacity: 1;
    }

    .glostv-header .glostv-social .glostv-share-btn:hover svg {
        fill: #fff !important;
    }

    .glostv-header .glostv-social-container .glostv-social-label {
        color: #333 !important;
    }

    .glostv-header .glostv-header-content {
        margin-bottom: 15px;
        margin-top: 0;
    }
}