/**
 * Payeer.online brand logo — shared tech effects (moderate intensity)
 * Works with existing class names across marketing, admin, API docs, and blog.
 */

:root {
    --brand-logo-gradient: linear-gradient(135deg, #00c8ff, #00e5a0);
    --brand-logo-icon-bg: #020b18;
    --brand-logo-glow: rgba(0, 200, 255, 0.4);
    --brand-logo-glow-strong: rgba(0, 200, 255, 0.6);
}

/* ── Link / wrapper layout ── */
.logo-wrap,
.site-logo-link,
.admin-header-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.site-logo-link {
    gap: 10px;
}

.admin-header-brand-link:hover {
    opacity: 0.95;
}

.admin-header-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* ── P icon (nav / header) ── */
.logo-icon,
.site-logo-icon,
.admin-header-logo-icon {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--brand-logo-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--brand-logo-icon-bg);
    font-family: 'Space Grotesk', sans-serif;
    flex-shrink: 0;
    box-shadow: 0 0 20px var(--brand-logo-glow);
    animation: brandLogoPulse 3s ease-in-out infinite;
}

.logo-icon,
.site-logo-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.admin-header-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1rem;
}

/* Light sweep across icon */
.logo-icon::after,
.site-logo-icon::after,
.admin-header-logo-icon::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    animation: brandLogoSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes brandLogoPulse {
    0%,
    100% {
        box-shadow: 0 0 20px var(--brand-logo-glow);
    }
    50% {
        box-shadow: 0 0 36px var(--brand-logo-glow-strong), 0 0 48px rgba(0, 229, 160, 0.15);
    }
}

@keyframes brandLogoSweep {
    0%,
    70%,
    100% {
        left: -100%;
    }
    85% {
        left: 100%;
    }
}

/* ── Brand text ── */
.logo-text,
.site-logo-text,
.admin-header-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1;
    transition: filter 0.2s ease;
}

.admin-header-logo-text {
    line-height: 1;
}

.logo-text span,
.site-logo-dot,
.admin-header-logo-text > span {
    background: var(--brand-logo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 200, 255, 0.35));
}

/* ── Hover enhancement ── */
.logo-wrap:hover .logo-icon,
.site-logo-link:hover .site-logo-icon,
.admin-header-brand-link:hover .admin-header-logo-icon {
    transform: scale(1.04);
    box-shadow: 0 0 32px var(--brand-logo-glow-strong), 0 0 40px rgba(0, 200, 255, 0.25);
}

.logo-wrap:hover .logo-text,
.site-logo-link:hover .site-logo-text,
.admin-header-brand-link:hover .admin-header-logo-text {
    filter: drop-shadow(0 0 6px rgba(0, 200, 255, 0.25));
}

.logo-wrap:hover .logo-text span,
.site-logo-link:hover .site-logo-dot,
.admin-header-brand-link:hover .admin-header-logo-text > span {
    filter: drop-shadow(0 0 12px rgba(0, 200, 255, 0.5));
}

.logo-icon,
.site-logo-icon,
.admin-header-logo-icon {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ── Footer: static logo (no pulse / sweep) ── */
.f-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.f-logo .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    animation: none;
    box-shadow: 0 0 16px rgba(0, 200, 255, 0.35);
}

.f-logo .logo-icon::after {
    display: none;
}

.f-logo .logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.f-logo .logo-text span {
    background: var(--brand-logo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 6px rgba(0, 200, 255, 0.3));
}

.f-logo:hover .logo-icon {
    transform: none;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .logo-icon,
    .site-logo-icon,
    .admin-header-logo-icon {
        animation: none;
    }

    .logo-icon::after,
    .site-logo-icon::after,
    .admin-header-logo-icon::after {
        animation: none;
        display: none;
    }

    .logo-wrap:hover .logo-icon,
    .site-logo-link:hover .site-logo-icon,
    .admin-header-brand-link:hover .admin-header-logo-icon {
        transform: none;
    }
}

/* ── Light theme: readable brand text on pale backgrounds ── */
html[data-theme="light"] {
    --brand-logo-icon-bg: #ffffff;
    --brand-logo-glow: rgba(0, 200, 255, 0.35);
    --brand-logo-glow-strong: rgba(0, 229, 160, 0.45);
    /* Brighter cyan→green for P icon & dot (dark-mode uses same hues, higher chroma) */
    --brand-logo-gradient: linear-gradient(135deg, #00c8ff, #00e5a0);
}

html[data-theme="light"] .logo-text,
html[data-theme="light"] .site-logo-text,
html[data-theme="light"] .admin-header-logo-text,
html[data-theme="light"] .f-logo .logo-text {
    color: #0f172a;
    filter: none;
}

html[data-theme="light"] .logo-text span,
html[data-theme="light"] .site-logo-dot,
html[data-theme="light"] .admin-header-logo-text > span,
html[data-theme="light"] .f-logo .logo-text span {
    background: var(--brand-logo-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
}

html[data-theme="light"] .logo-wrap:hover .logo-text,
html[data-theme="light"] .site-logo-link:hover .site-logo-text,
html[data-theme="light"] .admin-header-brand-link:hover .admin-header-logo-text {
    filter: none;
}

html[data-theme="light"] .logo-icon,
html[data-theme="light"] .site-logo-icon,
html[data-theme="light"] .admin-header-logo-icon {
    animation: none;
    color: #ffffff;
    box-shadow:
        0 2px 10px rgba(0, 200, 255, 0.4),
        0 0 20px rgba(0, 229, 160, 0.2);
}

html[data-theme="light"] .f-logo .logo-icon {
    box-shadow:
        0 2px 10px rgba(0, 200, 255, 0.35),
        0 0 16px rgba(0, 229, 160, 0.18);
}
