/* ==========================================================================
   Shared tool header — used by TikTok Views/Likes, Temp Mail, View Temp Mail,
   Instagram Comment Liker (via <x-tool-header />).
   Theme via data-theme="tiktok" | "teal" | "purple".
   ========================================================================== */

.tool-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ---- Themes ---- */
.tool-header[data-theme="tiktok"] {
    --th-bg: rgba(1, 1, 1, .94);
    --th-fg: #fff;
    --th-sub: #aaa;
    --th-border: #333;
    --th-accent: #25f4ee;
    --th-accent-2: #fe2c55;
    --th-btn-bg: transparent;
    background: var(--th-bg);
    border-bottom: 3px solid var(--th-accent-2);
}

.tool-header[data-theme="teal"] {
    --th-bg: rgba(255, 255, 255, .94);
    --th-fg: #1c1e21;
    --th-sub: #65676b;
    --th-border: #e4e6eb;
    --th-accent: #0d9488;
    --th-accent-2: #10b981;
    --th-btn-bg: #fff;
    background: var(--th-bg);
    border-bottom: 1px solid var(--th-border);
}

.tool-header[data-theme="purple"] {
    --th-bg: rgba(255, 255, 255, .94);
    --th-fg: #0f0f1a;
    --th-sub: #6b7280;
    --th-border: #e9e4f5;
    --th-accent: #6d28d9;
    --th-accent-2: #ee2a7b;
    --th-btn-bg: #fff;
    background: var(--th-bg);
    border-bottom: 1px solid var(--th-border);
}

/* ---- Layout ---- */
.tool-header-inner {
    max-width: 1220px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tool-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--th-fg);
    font-weight: 800;
    font-size: 18px;
    line-height: 1.2;
}

.tool-brand:hover {
    text-decoration: none;
    color: var(--th-fg);
}

.tool-brand-logo,
.tool-brand-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    color: #fff;
}

.tool-brand-logo {
    background: linear-gradient(135deg, var(--th-accent-2), var(--th-accent));
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    font-size: 20px;
}

/* Teal / purple themes keep the colourful gradient shadow */
.tool-header[data-theme="teal"] .tool-brand-logo {
    background: linear-gradient(120deg, #14b8a6, #10b981);
    box-shadow: 0 6px 16px rgba(13, 148, 136, .35);
}

.tool-header[data-theme="tiktok"] .tool-brand-logo {
    box-shadow: 0 6px 16px rgba(254, 44, 85, .35);
}

.tool-header[data-theme="purple"] .tool-brand-logo {
    box-shadow: 0 6px 16px rgba(124, 58, 237, .35);
}

.tool-brand-logo svg {
    width: 22px;
    height: 22px;
}

.tool-brand-img {
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(124, 58, 237, .35);
}

.tool-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.tool-brand-name {
    font-weight: 800;
}

.tool-brand-sub {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--th-sub);
    line-height: 1.1;
}

/* ---- Header links ---- */
.tool-header-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-ghost {
    border: 1px solid var(--th-border);
    background: var(--th-btn-bg);
    color: var(--th-fg);
    font-weight: 600;
    font-size: 14px;
    padding: 9px 16px;
    border-radius: 10px;
    transition: border-color .2s, color .2s, filter .2s;
    cursor: pointer;
    white-space: nowrap;
}

.tool-ghost:hover {
    border-color: var(--th-accent);
    color: var(--th-accent);
    text-decoration: none;
}

.tool-header[data-theme="tiktok"] .tool-ghost:hover {
    border-color: var(--th-accent);
    color: var(--th-accent);
}

/* Download CTA (Instagram Comment Liker) */
.tool-ghost.tool-dl {
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 28%, #d6248c 62%, #f97316 100%);
    box-shadow: 0 6px 16px rgba(214, 36, 140, .35);
}

.tool-ghost.tool-dl:hover {
    color: #fff;
    filter: brightness(1.05);
    border: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .tool-header-links .tool-hide-sm {
        display: none;
    }
}
