/* ==========================================================================
   FlyCrawl Benchmark Studio & ROI Calculator Stylesheet
   Modern, Glassmorphic, Responsive, RTL/LTR Compatible
   ========================================================================== */

.benchmark-studio-container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.22);
    border-radius: 24px;
    box-shadow: 0 20px 50px -12px rgba(124, 58, 237, 0.12), 0 4px 16px rgba(15, 23, 42, 0.04);
    padding: 2.25rem;
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
}

.benchmark-studio-header {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 2.25rem;
}

.benchmark-studio-title {
    font-family: var(--font-heading, inherit);
    font-size: clamp(1.75rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: #1E1B4B;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.benchmark-studio-subtitle {
    font-size: 1.02rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* Studio Nav Tabs */
.benchmark-nav-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 2rem;
    background: rgba(241, 245, 249, 0.8);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.benchmark-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #64748B;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.benchmark-tab-btn:hover {
    color: #1E1B4B;
    background: rgba(255, 255, 255, 0.6);
}

.benchmark-tab-btn.active {
    color: #4C1D95;
    background: #FFFFFF;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

/* Tab Panels */
.benchmark-tab-panel {
    display: none;
    animation: studioFadeIn 0.3s ease;
}

.benchmark-tab-panel.active {
    display: block;
}

@keyframes studioFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Tab 1: Competitor Matrix Table
   ========================================================================== */
.matrix-table-wrapper {
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: center;
}

.matrix-table th {
    background: #F8FAFC;
    padding: 1.15rem 1rem;
    font-weight: 800;
    color: #1E293B;
    border-bottom: 2px solid #E2E8F0;
    white-space: nowrap;
}

.matrix-table th.col-flycrawl {
    background: linear-gradient(180deg, #FAF5FF 0%, #EDE9FE 100%);
    color: #4C1D95;
    border-left: 2px solid rgba(139, 92, 246, 0.3);
    border-right: 2px solid rgba(139, 92, 246, 0.3);
    font-size: 1.05rem;
    position: relative;
}

.matrix-table td {
    padding: 1.1rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
    vertical-align: middle;
}

.matrix-table tr:hover td {
    background: #F8FAFC;
}

.matrix-table td.col-flycrawl {
    background: rgba(250, 245, 255, 0.5);
    border-left: 2px solid rgba(139, 92, 246, 0.3);
    border-right: 2px solid rgba(139, 92, 246, 0.3);
    font-weight: 700;
    color: #4C1D95;
}

.matrix-metric-name {
    text-align: left;
    font-weight: 700;
    color: #0F172A;
    min-width: 200px;
}

[dir="rtl"] .matrix-metric-name {
    text-align: right;
}

.metric-badge-win {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.84rem;
}

.metric-badge-neutral {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.84rem;
}

.metric-badge-lose {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.84rem;
}

/* ==========================================================================
   Tab 2: Interactive ROI & Token Savings Calculator
   ========================================================================== */
.roi-calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.roi-inputs-card {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.roi-results-card {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    border-radius: 20px;
    padding: 2.25rem;
    color: #FFFFFF;
    box-shadow: 0 16px 35px -8px rgba(49, 46, 129, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.roi-input-group {
    margin-bottom: 1.75rem;
}

.roi-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1E293B;
}

.roi-slider-value {
    font-family: monospace;
    font-size: 1.15rem;
    font-weight: 800;
    color: #7C3AED;
    background: #FAF5FF;
    border: 1px solid #DDD6FE;
    padding: 0.2rem 0.75rem;
    border-radius: 8px;
}

.roi-range-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #E2E8F0;
    outline: none;
    accent-color: #7C3AED;
    cursor: pointer;
}

.roi-pills-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.roi-pill-btn {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.roi-pill-btn.active {
    background: #FAF5FF;
    border-color: #7C3AED;
    color: #6D28D9;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.roi-savings-badge {
    background: rgba(16, 185, 129, 0.18);
    border: 1.5px solid #10B981;
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.roi-savings-amount {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    color: #34D399;
    line-height: 1.1;
    font-family: var(--font-heading, inherit);
}

.roi-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
}

[dir="rtl"] .roi-results-card,
[dir="rtl"] .roi-inputs-card {
    direction: rtl;
}

[dir="rtl"] .roi-slider-value,
[dir="rtl"] .roi-savings-amount,
[dir="rtl"] .roi-metric-row strong {
    direction: ltr;
    display: inline-block;
}

/* ==========================================================================
   Tab 3: Side-by-Side Visual Diff Inspector
   ========================================================================== */
.diff-sample-selector {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.diff-sample-btn {
    padding: 0.45rem 1.1rem;
    border-radius: 10px;
    border: 1px solid #CBD5E1;
    background: #FFFFFF;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.diff-sample-btn.active {
    background: #7C3AED;
    border-color: #7C3AED;
    color: #FFFFFF;
}

.diff-panes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.diff-pane {
    background: #0F172A;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
    border: 1px solid #334155;
}

.diff-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: #1E293B;
    border-bottom: 1px solid #334155;
}

.diff-pane-title {
    font-weight: 800;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diff-code-body {
    padding: 1.25rem;
    max-height: 420px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #E2E8F0;
    white-space: pre-wrap;
}

.diff-noise-highlight {
    background: rgba(239, 68, 68, 0.25);
    color: #FCA5A5;
    border-left: 3px solid #EF4444;
    padding: 0.1rem 0.4rem;
    display: block;
    margin: 0.2rem 0;
}

.diff-clean-highlight {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
    border-left: 3px solid #10B981;
    padding: 0.1rem 0.4rem;
    display: block;
    margin: 0.2rem 0;
}

/* ==========================================================================
   Tab 4: 1-Line Drop-in Migration Code Switcher
   ========================================================================== */
.dropin-wrapper {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
}

.dropin-tabs-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.dropin-lang-btn {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    border: 1px solid #CBD5E1;
    background: #F8FAFC;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.dropin-lang-btn.active {
    background: #1E1B4B;
    border-color: #1E1B4B;
    color: #FFFFFF;
}

.dropin-code-box {
    position: relative;
    background: #0F172A;
    border-radius: 12px;
    padding: 1.25rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.88rem;
    color: #E2E8F0;
    line-height: 1.6;
    overflow-x: auto;
}

.dropin-copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

[dir="rtl"] .dropin-copy-btn {
    right: auto;
    left: 0.75rem;
}

.dropin-copy-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.dropin-diff-add {
    color: #34D399;
    font-weight: bold;
    background: rgba(16, 185, 129, 0.15);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
}

.dropin-diff-del {
    color: #F87171;
    text-decoration: line-through;
    opacity: 0.75;
}

/* ==========================================================================
   Tab 5: Schematic & Visual Scientific Benchmarks
   ========================================================================== */
.schematic-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2rem;
}

.schematic-card {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.schematic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px -8px rgba(124, 58, 237, 0.1);
    border-color: #CBD5E1;
}

.schematic-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
}

.schematic-card-title {
    font-family: var(--font-heading, inherit);
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schematic-card-desc {
    font-size: 0.82rem;
    color: #64748B;
    margin: 0;
    line-height: 1.5;
}

.schematic-winner-badge {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.75rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Schematic Bar Items */
.schematic-bar-list {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    margin: 1.25rem 0;
}

.schematic-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.schematic-bar-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.84rem;
    direction: ltr;
}

.schematic-bar-name {
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.schematic-bar-val {
    font-family: monospace;
    font-weight: 800;
    font-size: 0.88rem;
    color: #0F172A;
}

.schematic-track {
    width: 100%;
    height: 10px;
    background: #F1F5F9;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.schematic-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-flycrawl {
    background: linear-gradient(90deg, #7C3AED 0%, #10B981 100%);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.fill-firecrawl {
    background: #EA580C;
}

.fill-crawl4ai {
    background: #0284C7;
}

.fill-jina {
    background: #6D28D9;
}

.fill-apify {
    background: #64748B;
}

.fill-raw {
    background: #EF4444;
}

/* Scientific Methodology Disclosure Card */
.schematic-methodology-card {
    background: linear-gradient(135deg, #FAF5FF 0%, #EFF6FF 100%);
    border: 1.5px solid #DDD6FE;
    border-radius: 20px;
    padding: 1.75rem 2rem;
    margin-top: 2rem;
}

.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.methodology-item {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 12px;
    padding: 1rem;
}

.methodology-item strong {
    display: block;
    font-size: 0.88rem;
    color: #1E1B4B;
    margin-bottom: 0.25rem;
}

.methodology-item p {
    font-size: 0.78rem;
    color: #64748B;
    margin: 0;
    line-height: 1.5;
}
