/* ── Aviso de mudança de marca (KINK -> CloudPath) ── */

.rebrand-notice {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.4rem;
    max-width: 900px;
    margin: 0 auto 2.5rem;
    padding: 1.4rem 1.6rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.10), rgba(78, 205, 196, 0.10));
    border: 1px solid rgba(78, 205, 196, 0.35);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    animation: rebrand-in 0.6s ease both;
}

@keyframes rebrand-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rebrand-logo {
    flex-shrink: 0;
    width: 170px;
    height: auto;
    filter: drop-shadow(0 0 14px rgba(78, 205, 196, 0.35));
}

.rebrand-body { flex: 1; min-width: 0; }

.rebrand-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #4ecdc4;
    border: 1px solid rgba(78, 205, 196, 0.45);
    border-radius: 999px;
    padding: 0.18rem 0.7rem;
    margin-bottom: 0.6rem;
}

.rebrand-title {
    margin: 0 0 0.4rem;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
}

.rebrand-title strong { color: #4ecdc4; }

.rebrand-text {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    opacity: 0.88;
}

.rebrand-url {
    display: inline-block;
    margin-top: 0.6rem;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    background: rgba(78, 205, 196, 0.12);
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: #4ecdc4;
    font-weight: 700;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.88rem;
    text-decoration: none;
}

.rebrand-url:hover { background: rgba(78, 205, 196, 0.2); }

.rebrand-countdown {
    flex-shrink: 0;
    text-align: center;
    padding: 0 0.5rem 0 1.2rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.rebrand-countdown-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: #ff6b6b;
    font-variant-numeric: tabular-nums;
}

.rebrand-countdown-label {
    display: block;
    font-size: 0.72rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.rebrand-dismiss {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    background: none;
    border: none;
    color: inherit;
    opacity: 0.45;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
}

.rebrand-dismiss:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }

@media (max-width: 720px) {
    .rebrand-notice { flex-direction: column; text-align: center; gap: 1rem; padding: 1.6rem 1.2rem; }
    .rebrand-logo { width: 200px; }
    .rebrand-countdown { border-left: none; border-top: 1px solid rgba(255,255,255,0.12); padding: 0.9rem 0 0; width: 100%; }
    .rebrand-countdown-num { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .rebrand-notice { animation: none; }
}

/* ══════════════════════════════════════════════════════════════
   Identidade CloudPath — ativada por html.brand-cloudpath
   (o branding.js adiciona essa classe na virada; ?brand=cloudpath força preview)
   ══════════════════════════════════════════════════════════════ */

/* 1) Marca d'água: símbolo da nuvem no lugar do texto gigante */
html.brand-cloudpath body::before {
    content: "";
    background-image: url("../images/branding/cloudpath-logo.png");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: min(62vw, 720px);   /* o navegador encolhe o PNG de 4000px */
    opacity: 0.05;
}

/* 2) Navbar: logo no lugar de "KINK / is not Kahoot" */
.brand-logo-img { display: none; }

html.brand-cloudpath .nav-logo h2,
html.brand-cloudpath .nav-logo span {
    display: none;
}

html.brand-cloudpath .nav-logo .brand-logo-img {
    display: block;
    height: 34px;
    width: auto;
    max-width: 190px;
    object-fit: contain;          /* encolhe sem cortar nem esticar */
    filter: drop-shadow(0 0 10px rgba(78, 205, 196, 0.18));
}

/* 3) Hero da landing: logo grande no lugar do texto glitch */
html.brand-cloudpath .hero-section .glitch,
html.brand-cloudpath .hero-section .tagline {
    display: none;
}

html.brand-cloudpath .hero-section .brand-hero-logo {
    display: block;
    width: min(88%, 480px);
    height: auto;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    filter: drop-shadow(0 0 28px rgba(78, 205, 196, 0.22));
    animation: brand-logo-in 0.7s ease both;
}

html.brand-cloudpath .hero-section .brand-hero-tagline {
    display: block;
    margin: 0 0 1.2rem;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

@keyframes brand-logo-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* 4) Tela do aluno (player.html) */
html.brand-cloudpath .player-logo h1,
html.brand-cloudpath .player-logo p { display: none; }

html.brand-cloudpath .player-logo .brand-logo-img {
    display: block;
    width: min(70%, 260px);
    height: auto;
    margin: 0 auto 1rem;
}

@media (prefers-reduced-motion: reduce) {
    html.brand-cloudpath .hero-section .brand-hero-logo { animation: none; }
}

@media (max-width: 720px) {
    html.brand-cloudpath .nav-logo .brand-logo-img { height: 28px; }
    html.brand-cloudpath body::before { background-size: 72vw; }
}

/* 5) Player de música minimizado: o ÍCONE do CloudPath no lugar do emoji */
html.brand-cloudpath .minimized-icon.brand-icon {
    background-image: url("../images/branding/cloudpath-icon-192.png");
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    font-size: 0 !important;      /* esconde o emoji que estava ali */
    width: 38px;
    height: 38px;
}

/* ── Painel de preview do rebrand (admin) ── */
.rebrand-preview {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(78, 205, 196, 0.28);
    border-radius: 14px;
    padding: 1.2rem 1.3rem 1.4rem;
    margin-bottom: 2rem;
}

.rebrand-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.rebrand-preview-head h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.rebrand-preview-sub { margin: 0; font-size: 0.85rem; opacity: 0.75; }
.rebrand-preview-sub strong { color: #4ecdc4; }

.rebrand-preview-actions { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

.preview-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cdd3de;
    border-radius: 8px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
}
.preview-tab:hover { border-color: #4ecdc4; }
.preview-tab.active { background: rgba(78, 205, 196, 0.15); border-color: #4ecdc4; color: #4ecdc4; font-weight: 700; }

.preview-open { font-size: 0.8rem; color: #4ecdc4; text-decoration: none; margin-left: 0.3rem; }
.preview-open:hover { text-decoration: underline; }

.rebrand-preview-frame {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1a2e;
}

.rebrand-preview-frame iframe {
    width: 100%;
    height: 520px;
    border: 0;
    display: block;
}

.rebrand-preview-checklist { margin-top: 1rem; font-size: 0.88rem; }
.rebrand-preview-checklist summary { cursor: pointer; color: #4ecdc4; font-weight: 600; }
.rebrand-preview-checklist ol { margin: 0.8rem 0 0; padding-left: 1.3rem; line-height: 1.9; }
.rebrand-preview-checklist code {
    background: rgba(255,255,255,0.08);
    padding: 0.1rem 0.4rem;
    border-radius: 5px;
    font-size: 0.85em;
}

/* ── Diagnóstico do acesso negado (admin) ── */
.admin-diag {
    margin-top: 1.2rem;
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 0.88rem;
    line-height: 1.9;
    background: rgba(255, 107, 107, 0.07);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 10px;
}
.admin-diag code {
    background: rgba(255,255,255,0.1);
    padding: 0.1rem 0.45rem;
    border-radius: 5px;
}
.admin-diag-cause {
    margin: 0.9rem 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    line-height: 1.7;
}
