/* ==========================================================================
   YouTube Boost — Resources / Templates
   "Template Shelf" visual identity: design-studio chrome, swatches, and
   CSS-drawn cover art. Primary accent stays site red-600 (#dc2626); this
   page layers in a violet/pink secondary pairing for a design-tool feel.
   ========================================================================== */

.tpl-main {
    --tpl-red: #dc2626;
    --tpl-violet: #8b5cf6;
    --tpl-pink: #ec4899;
    position: relative;
}

/* ---------- Type & shared bits ---------- */

.tpl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.14), rgba(139, 92, 246, 0.14));
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e9d5ff;
}

.tpl-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tpl-red), var(--tpl-violet));
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
}

.tpl-title-underline {
    background: linear-gradient(90deg, var(--tpl-red), var(--tpl-violet), var(--tpl-pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tpl-section-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--tpl-violet);
}

/* ---------- Hero info chips ---------- */

.tpl-fact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tpl-fact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.82rem;
    color: #d4d4d8;
}

.tpl-fact i {
    color: var(--tpl-violet);
}

/* ---------- Palette / swatch dots ---------- */

.tpl-palette-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tpl-swatch {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 2px solid rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

/* ---------- CTA buttons ---------- */

.tpl-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tpl-red), var(--tpl-violet));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 18px 40px -18px rgba(139, 92, 246, 0.6);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.tpl-btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 22px 46px -16px rgba(139, 92, 246, 0.75);
}

.tpl-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: #e4e4e7;
    font-weight: 600;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.tpl-btn-secondary:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.08);
}

/* ---------- Divider strip ---------- */

.tpl-strip {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--tpl-red), var(--tpl-violet), var(--tpl-pink), transparent);
    opacity: 0.7;
}

/* ---------- Workspace mockup (hero visual) ---------- */

.tpl-workspace {
    border-radius: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.25);
    background: linear-gradient(180deg, #100a16 0%, #0a0710 100%);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.tpl-workspace-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.tpl-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.tpl-dot--r { background: #f87171; }
.tpl-dot--y { background: #fbbf24; }
.tpl-dot--g { background: #34d399; }

.tpl-workspace-title {
    margin-left: 0.5rem;
    font-size: 0.72rem;
    color: #71717a;
    font-family: 'Courier New', monospace;
}

.tpl-workspace-body {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0;
}

.tpl-tool-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 0.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    color: #a1a1aa;
    font-size: 0.85rem;
}

.tpl-tool-rail i:first-child {
    color: var(--tpl-violet);
}

.tpl-canvas {
    position: relative;
    margin: 1rem;
    border-radius: 0.85rem;
    overflow: hidden;
    min-height: 180px;
    background:
        radial-gradient(circle at 25% 20%, rgba(220, 38, 38, 0.55), transparent 45%),
        radial-gradient(circle at 75% 80%, rgba(236, 72, 153, 0.5), transparent 45%),
        linear-gradient(135deg, #1a1024, #0d0812);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.tpl-canvas-frame {
    position: absolute;
    inset: 14%;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    border-radius: 0.6rem;
}

.tpl-canvas-label {
    position: absolute;
    bottom: 0.6rem;
    right: 0.75rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Courier New', monospace;
}

.tpl-layers {
    padding: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    width: 148px;
}

.tpl-layers-title {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #71717a;
    margin-bottom: 0.6rem;
}

.tpl-layer-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    color: #d4d4d8;
    padding: 0.4rem 0.5rem;
    border-radius: 0.5rem;
    margin-bottom: 0.3rem;
    background: rgba(255, 255, 255, 0.03);
}

.tpl-layer-row i {
    color: var(--tpl-pink);
    font-size: 0.7rem;
}

.tpl-workspace-swatch-row {
    display: flex;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tpl-workspace-swatch-row .tpl-swatch {
    width: 18px;
    height: 18px;
}

/* ---------- Product grid ---------- */

.tpl-card {
    display: flex;
    flex-direction: column;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0a0a;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tpl-card:hover {
    transform: translateY(-4px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 24px 50px -24px rgba(139, 92, 246, 0.35);
}

.tpl-cover {
    position: relative;
    height: 168px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tpl-cover-tag {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Cover art 1: thumbnail pack — bold burst + play triangle */
.tpl-cover--1 {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 40%),
        conic-gradient(from 200deg at 70% 60%, #dc2626, #ec4899, #8b5cf6, #dc2626);
}
.tpl-cover--1::before {
    content: "";
    position: absolute;
    left: 22px;
    bottom: 26px;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 26px solid rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
}
.tpl-cover--1::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), transparent 55%);
}

/* Cover art 2: banner kit — wide bands + avatar circle + text bars */
.tpl-cover--2 {
    background: linear-gradient(120deg, #7c3aed 0%, #dc2626 55%, #f97316 100%);
}
.tpl-cover--2::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.25);
}
.tpl-cover--2::after {
    content: "";
    position: absolute;
    left: 78px;
    top: calc(50% - 14px);
    width: 120px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 20px 0 -2px rgba(255, 255, 255, 0.35);
}

/* Cover art 3: intro/outro pack — motion lines + center ring */
.tpl-cover--3 {
    background: radial-gradient(circle at 50% 50%, #1f1030, #0a0710 70%);
}
.tpl-cover--3::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        100deg,
        transparent 0 18px,
        rgba(139, 92, 246, 0.22) 18px 20px
    );
}
.tpl-cover--3::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.55);
}

/* Cover art 4: lower-third kit — caption bars stacked at base */
.tpl-cover--4 {
    background: linear-gradient(160deg, #0f172a 0%, #1e1030 100%);
}
.tpl-cover--4::before,
.tpl-cover--4::after {
    content: "";
    position: absolute;
    left: 20px;
    height: 14px;
    border-radius: 4px;
}
.tpl-cover--4::before {
    bottom: 44px;
    width: 130px;
    background: linear-gradient(90deg, #dc2626, #ec4899);
}
.tpl-cover--4::after {
    bottom: 24px;
    width: 90px;
    background: rgba(255, 255, 255, 0.55);
}

/* Cover art 5: end screen kit — subscribe ring + two slots */
.tpl-cover--5 {
    background: linear-gradient(135deg, #1a0b12 0%, #240f28 60%, #150a20 100%);
}
.tpl-cover--5::before {
    content: "";
    position: absolute;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 4px solid #dc2626;
    box-shadow: 0 0 18px rgba(220, 38, 38, 0.6);
}
.tpl-cover--5::after {
    content: "";
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 40px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 76px 0 0 -2px rgba(255, 255, 255, 0.08), 76px 0 0 0 rgba(255, 255, 255, 0.3);
}

.tpl-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.1rem 1.15rem 1.25rem;
    gap: 0.65rem;
}

.tpl-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tpl-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(139, 92, 246, 0.35);
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.08);
}

.tpl-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f4f4f5;
    line-height: 1.3;
}

.tpl-card-pitch {
    font-size: 0.85rem;
    color: #a1a1aa;
    line-height: 1.5;
    flex: 1;
}

.tpl-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.4rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tpl-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
}

.tpl-price-note {
    font-size: 0.65rem;
    color: #71717a;
    display: block;
    font-weight: 500;
}

.tpl-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tpl-red), var(--tpl-violet));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    transition: transform 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.tpl-buy-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ---------- Trust / what-you-get panels ---------- */

.tpl-panel {
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
}

.tpl-panel-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.25), rgba(139, 92, 246, 0.25));
    color: #fff;
    margin-bottom: 0.9rem;
}

/* ---------- FAQ ---------- */

.tpl-faq {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.tpl-faq[open] {
    border-color: rgba(139, 92, 246, 0.35);
}

.tpl-faq summary::-webkit-details-marker {
    display: none;
}

/* ---------- Waitlist ---------- */

.tpl-waitlist-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: linear-gradient(160deg, rgba(220, 38, 38, 0.1), rgba(139, 92, 246, 0.08));
    padding: 2.5rem 1.5rem;
}

.tpl-input {
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.85rem;
    padding: 0.85rem 1.1rem;
    color: #fff;
    font-size: 0.9rem;
}

.tpl-input:focus {
    outline: none;
    border-color: var(--tpl-violet);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* ---------- Cross-links ---------- */

.tpl-cross-card {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    padding: 1.1rem;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tpl-cross-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.06);
    transform: translateY(-2px);
}

/* ---------- Toast ---------- */

.tpl-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    background: linear-gradient(90deg, var(--tpl-red), var(--tpl-violet));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.8rem 1.3rem;
    border-radius: 999px;
    box-shadow: 0 20px 45px -18px rgba(139, 92, 246, 0.6);
    animation: tpl-toast-in 0.25s ease both;
    max-width: calc(100vw - 3rem);
}

@keyframes tpl-toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .tpl-card:hover,
    .tpl-btn-primary:hover,
    .tpl-buy-btn:hover,
    .tpl-cross-card:hover {
        transform: none;
    }
    .tpl-toast {
        animation: none;
    }
}

@media (max-width: 767px) {
    .tpl-workspace-body {
        grid-template-columns: auto 1fr;
    }
    .tpl-layers {
        display: none;
    }
}
