/*
 * GANITSUTRAM
 * A Living Knowledge Ecosystem for Mathematical Discovery
 *
 * "यथा शिखा मयूराणां नागानां मणयो यथा
 *  तद्वद् वेदाङ्गशास्त्राणां गणितं मूर्ध्नि वर्तते"
 *
 * As the crest of a peacock, as the gem on the hood
 * of a cobra — so stands mathematics at the crown
 * of all knowledge.
 *                                       — Brahmagupta
 *                                         628 CE · Brahmasphutasiddhanta
 *
 * Creator:   Jawahar R. Mallah
 * Email:     jawahar@aitdl.com
 * GitHub:    https://github.com/jawahar-mallah
 * Websites:  https://ganitsutram.com
 *            https://aitdl.com
 *
 * Then:  628 CE · Brahmasphutasiddhanta
 * Now:   8 March MMXXVI · Vikram Samvat 2082
 *
 * Copyright © 2026 Jawahar R. Mallah · AITDL | GANITSUTRAM
 *
 * Developer Note:
 * If you intend to reuse this code, please respect
 * the creator and the work behind it.
 */
/*
Project: GanitSūtram
Author: Jawahar R Mallah
Company: AITDL | aitdl.com

Date:
Vikram Samvat: VS 2082
Gregorian: 2026-03-07

Purpose: Research Lab specific styles.
         Tools grid, experimental badges, and Beejank Mapper visualization.
*/

/* ─── HERO SECTION ─────────────────────────────────────────── */
.gs-lab-hero {
    padding: 8rem 0 4rem;
    text-align: center;
}

.gs-sanskrit-line {
    font-family: var(--font-ancient);
    color: var(--accent-secondary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
}

.gs-lab-badge {
    display: inline-block;
    background: rgba(124, 58, 237, 0.2);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-family: var(--font-main);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

/* ─── TOOLS GRID ───────────────────────────────────────────── */
.gs-lab-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 4rem 0;
}

.gs-lab-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.5rem;
    border-radius: 8px;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gs-lab-card:not(.disabled):hover {
    transform: translateY(-5px);
    border-color: var(--accent-soft);
}

.gs-lab-card.disabled {
    opacity: 0.4;
}

.gs-lab-icon {
    font-size: 2.5rem;
}

.gs-lab-card h3 {
    font-family: var(--font-logo);
    font-size: 1.1rem;
    color: var(--fg-main);
}

.gs-status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    align-self: flex-start;
}

.status-live {
    background: #22c55e;
    color: #fff;
}

.status-beta {
    background: #ffb300;
    color: #000;
}

.status-soon {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* ─── TOOL PANELS ─────────────────────────────────────────── */
.gs-tool-panel {
    display: none;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    margin-top: 1rem;
    border-radius: 0 0 8px 8px;
    animation: slideDown 0.3s ease-out;
}

.gs-lab-card.active {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.gs-lab-card.active .gs-tool-panel {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── DATA VISUALIZATION ───────────────────────────────────── */
/* Frequency Chart */
.gs-freq-chart {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.gs-freq-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gs-freq-label {
    width: 20px;
    font-family: var(--font-logo);
    font-size: 0.8rem;
    color: var(--accent-secondary);
}

.gs-freq-bar-wrap {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.gs-freq-bar {
    height: 100%;
    background: var(--accent-soft);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gs-freq-bar.max {
    background: var(--accent-primary);
}

.gs-freq-val {
    font-size: 0.7rem;
    color: var(--text-dim);
    min-width: 40px;
    text-align: right;
}

/* Results Display */
.gs-lab-results {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.gs-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.gs-pattern-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-main);
    background: rgba(255, 255, 255, 0.05);
}

.gs-pattern-badge.active {
    background: var(--accent-primary);
    color: #fff;
}

/* Fibonacci Pills */
.gs-fib-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.gs-fib-pill {
    padding: 0.2rem 0.5rem;
    background: rgba(255, 179, 0, 0.1);
    border: 1px solid var(--accent-soft);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--accent-secondary);
}

.gs-fib-pill.cycle-point {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-soft);
}

/* ─── BEEJANK MAPPER ───────────────────────────────────────── */
.gs-lab-experiment {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4rem;
    border-radius: 12px;
    margin: 6rem 0;
}

.gs-mapper-form {
    display: flex;
    gap: 1.5rem;
    align-items: end;
    margin-bottom: 3rem;
}

.gs-mapper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
}

.gs-mapper-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-family: var(--font-main);
    transition: transform 0.2s;
}

.gs-mapper-cell:hover {
    transform: scale(1.1);
    z-index: 2;
}

.gs-cell-num {
    font-size: 0.6rem;
    opacity: 0.6;
}

.gs-cell-root {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Cell Colors by Digital Root (1-9) */
.root-1 {
    background: rgba(255, 85, 0, 0.9);
}

.root-2 {
    background: rgba(255, 179, 0, 0.9);
}

.root-3 {
    background: rgba(124, 58, 237, 0.9);
}

.root-4 {
    background: rgba(14, 165, 233, 0.9);
}

.root-5 {
    background: rgba(236, 72, 153, 0.9);
}

.root-6 {
    background: rgba(20, 184, 166, 0.9);
}

.root-7 {
    background: rgba(34, 197, 94, 0.9);
}

.root-8 {
    background: rgba(249, 115, 22, 0.9);
}

.root-9 {
    background: rgba(99, 102, 241, 0.9);
}

/* ─── INSTITUTIONAL BANNER ─────────────────────────────────── */
.gs-lab-institutional {
    text-align: center;
    padding: 6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.gs-inst-title {
    font-family: var(--font-logo);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* ─── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1024px) {
    .gs-lab-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .gs-lab-grid {
        grid-template-columns: 1fr;
    }

    .gs-mapper-form {
        flex-direction: column;
        align-items: stretch;
    }

    .gs-mapper-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }

    .gs-tool-panel {
        padding: 1.5rem 1rem;
    }

    .gs-lab-experiment {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .gs-lab-hero {
        padding: 4rem 0 2rem;
    }

    .gs-hero-title {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .gs-lab-card {
        padding: 1.5rem;
    }

    .gs-lab-institutional {
        padding: 4rem 0;
    }
}