/* ══════════════════════════════════════════════════
   NTag – Shared Styles (Social Tags + Individual)
   ══════════════════════════════════════════════════ */

/* ── Navbar ─────────────────────────────────────── */
#navbar {
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
}
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.03);
}

/* ── Hero shine effect ──────────────────────────── */
.hero-shine {
    animation: hero-shine 4s ease-in-out infinite;
}
@keyframes hero-shine {
    0%, 100% { transform: translateX(-100%) rotate(15deg); }
    50% { transform: translateX(100%) rotate(15deg); }
}

/* ── Scroll reveal ──────────────────────────────── */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Config labels ──────────────────────────────── */
.config-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

/* ── Platform Buttons ───────────────────────────── */
.platform-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.25s;
    color: #6b7280;
}
.platform-btn:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}
.platform-btn.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #4c1d95;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
}

/* ── Shape Buttons ──────────────────────────────── */
.shape-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.25s;
    color: #6b7280;
}
.shape-btn:hover {
    border-color: #c4b5fd;
}
.shape-btn.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #4c1d95;
}
.shape-btn.active div[class*="w-"] {
    border-color: #8b5cf6 !important;
    background: #ede9fe !important;
}

/* ── Shape Buttons Large (Individuell) ─────────── */
.shape-btn-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.6rem 0.25rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.25s;
    color: #6b7280;
}
.shape-btn-lg span {
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1;
}
.shape-btn-lg:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}
.shape-btn-lg.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #4c1d95;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
}

/* ── Option Buttons (generic selector) ─────────── */
.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.25rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.25s;
    color: #6b7280;
    text-align: center;
}
.option-btn:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}
.option-btn.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #4c1d95;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
}
.option-price {
    font-size: 0.625rem;
    color: #9ca3af;
    font-weight: 500;
}
.option-btn.active .option-price {
    color: #7c3aed;
}

/* ── Color Picker Popup ────────────────────────── */
.color-picker-wrapper {
    position: relative;
    display: inline-block;
}

.color-picker-trigger {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}
.color-picker-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-color: #a78bfa;
}

.color-popup {
    position: absolute;
    z-index: 9999;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: max-content;
}
.color-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
    pointer-events: none;
}

/* When popup is repositioned to open below, hide the default arrow */
.color-popup[style*="top: calc"]::after {
    display: none;
}

.color-popup-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    outline: none;
}
.color-popup-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.color-popup-swatch.active {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #8b5cf6;
    transform: scale(1.1);
}

/* ── Color Grid ─────────────────────────────────── */
.color-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.color-swatch {
    aspect-ratio: 1;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}
.color-swatch:hover:not(.disabled) {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.color-swatch.active {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 1.5px white, 0 0 0 3px #8b5cf6;
    transform: scale(1.1);
}
.color-swatch.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    transform: none !important;
}
.color-swatch.disabled::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.15) 3px,
        rgba(0,0,0,0.15) 5px
    );
    border-radius: inherit;
}

/* ── Feature Cards hover lift ───────────────────── */
.feature-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Use Case Buttons ───────────────────────────── */
.usecase-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.25s;
    color: #6b7280;
}
.usecase-btn:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}
.usecase-btn.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    color: #4c1d95;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
}
.feature-card:hover {
    transform: translateY(-4px);
}

/* ── FAQ Accordion ──────────────────────────────── */
.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}
.faq-item.open .faq-content {
    max-height: 200px;
}
.faq-trigger {
    cursor: pointer;
    background: none;
    font-family: inherit;
}

/* ── Loading Spinner ────────────────────────────── */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #ede9fe;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── 3D Viewport Grain & Vignette Overlays ──────── */
.viewport-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.18;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px 180px;
}

.viewport-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,0.03) 100%);
}

/* ── Toggle Switch ──────────────────────────────── */

/* ── Carabiner Selector ─────────────────────────── */
.carabiner-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}
.carabiner-btn:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}
.carabiner-btn.active {
    border-color: #8b5cf6;
    background: #f5f3ff;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.12);
}
.carabiner-img {
    width: 100%;
    max-width: 56px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
}
.theme-slate .carabiner-btn:hover {
    border-color: #9bb5e0;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.08);
}
.theme-slate .carabiner-btn.active {
    border-color: #4a6fa5;
    background: #f0f5ff;
    box-shadow: 0 4px 16px rgba(74, 111, 165, 0.12);
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: #d1d5db;
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
    padding: 0;
    flex-shrink: 0;
}
.toggle-switch.active {
    background: #8b5cf6;
}
.toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-switch.active .toggle-knob {
    transform: translateX(22px);
}

/* ── Slate Theme (Custom Tags page) ─────────────── */
.theme-slate .shape-btn-lg:hover {
    border-color: #9bb5e0;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.08);
}
.theme-slate .shape-btn-lg.active {
    border-color: #4a6fa5;
    background: #f0f5ff;
    color: #14253d;
    box-shadow: 0 4px 16px rgba(74, 111, 165, 0.12);
}
.theme-slate .option-btn:hover {
    border-color: #9bb5e0;
    box-shadow: 0 4px 12px rgba(74, 111, 165, 0.08);
}
.theme-slate .option-btn.active {
    border-color: #4a6fa5;
    background: #f0f5ff;
    color: #14253d;
    box-shadow: 0 4px 16px rgba(74, 111, 165, 0.12);
}
.theme-slate .option-btn.active .option-price {
    color: #3a5a8c;
}
.theme-slate .color-popup-swatch.active {
    border-color: #4a6fa5;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #4a6fa5;
}
.theme-slate .loading-spinner {
    border-color: #c2d4f2;
    border-top-color: #4a6fa5;
}
.theme-slate .toggle-switch.active {
    background: #4a6fa5;
}
.theme-slate .faq-item:hover {
    border-color: #9bb5e0;
}

/* ── Canvas sizing ──────────────────────────────── */
#viewport-wrapper {
    overflow: hidden;
}
#three-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ── Custom Scrollbar ───────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd6fe; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c4b5fd; }

/* ── Responsive fixes ───────────────────────────── */
@media (max-width: 1023px) {
    .lg\:col-span-3 {
        max-height: none !important;
    }
}
