/* Custom styles for Multilingual Features demo */

:root {
    --activation-color: 59, 130, 246; /* RGB for blue gradient */
    --primary-color: #007acc;
    --primary-light: #f0f8ff;
}

div.container.blog.with-title {
    margin-top: 4vh
}

div.container.blog.extra-large.gray {
    padding-top: 2vh;
}

/* Header button layout - center on large screens */
div.container.blog#first-content div.blog-title.no-cover .link {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Fix button sizing - override Clarity's 0.65em with proper size */
div.container.blog#first-content .link p.button {
    margin: 0;
    font-size: 0.7em;
    padding: 0.75em 1em;
}

/* Add vertical space around authors */
div.container.blog#first-content div.blog-title .blog-intro #author-affiliation {
    padding-top: 30px !important;
}

div.container.blog#first-content div.blog-title .blog-intro .info p {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* Left-align buttons on smaller screens */
@media screen and (max-width: 769px) {
    div.container.blog#first-content div.blog-title.no-cover .link {
        justify-content: flex-start;
    }
}

/* Highlight box for key findings */
.highlight-box {
    background-color: #f0f8ff;
    border-left: 4px solid var(--primary-color);
    padding: 20px 24px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
}

/* Demo Cell for Clarity grid */
.demo-cell {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.demo-cell .caption {
    margin-top: 12px;
    margin-bottom: 0;
}

.feature-section {
    margin-bottom: 2rem;
}

.feature-section:last-child {
    margin-bottom: 0;
}

.feature-title {
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    color: #374151;
    margin-bottom: 12px;
}

/* Mobile: 2x2 grid for activation demo */
@media screen and (max-width: 768px) {
    .feature-section .columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tokens-container {
    font-family: "Charter", Georgia, serif;
    font-size: 16px;
    line-height: 1.8;
}

/* Token Highlighting - only visible when highlighted */
.token {
    padding: 2px 0;
}

.token.highlighted {
    background-color: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
}

.token.highlighted-light {
    background-color: rgba(59, 130, 246, 0.4);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Legend */
.legend {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #6b7280;
    margin-top: 16px;
}

.legend-gradient {
    width: 120px;
    height: 14px;
    background: linear-gradient(to right,
        rgba(var(--activation-color), 0.1),
        rgba(var(--activation-color), 1));
    border-radius: 3px;
}

.legend-low, .legend-high {
    font-size: 12px;
}

/* Ablation Demo */
.ablation-box {
    padding: 16px;
    background-color: white;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    font-family: "Charter", Georgia, serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 60px;
}

.ablation-box.baseline {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.ablation-box.ablated {
    border-color: #ef4444;
    background-color: #fef2f2;
}

/* ==================== Steering Demo ==================== */

/* White box container */
.steering-demo-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .steering-demo-container {
        padding: 1rem;
    }
}

/* Navigation buttons */
.steering-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.steering-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    font-family: "Poppins", sans-serif;
    background-color: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.steering-nav-btn .nav-feature {
    font-size: 14px;
    font-weight: 600;
}

.steering-nav-btn .nav-languages {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
}

.steering-nav-btn:hover {
    border-color: #475569;
}

.steering-nav-btn:hover .nav-feature {
    color: #475569;
}

.steering-nav-btn.active {
    background-color: #475569;
    border-color: #475569;
}

.steering-nav-btn.active .nav-feature,
.steering-nav-btn.active .nav-languages {
    color: white;
}

/* Source/Output sections */
.steering-section {
    margin-bottom: 16px;
}

.steering-label {
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    padding: 8px 16px;
    background-color: #e5e7eb;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.steering-box {
    padding: 16px 20px;
    background-color: white;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e5e7eb;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

/* Baseline box styling */
.steering-section:has(.steering-box#steering-baseline) .steering-label,
.steering-label.baseline {
    background-color: rgba(59, 130, 246, 0.25);
    color: #1e40af;
}

.steering-box#steering-baseline {
    border-color: rgba(59, 130, 246, 0.25);
    background-color: rgba(59, 130, 246, 0.05);
}

/* Steered box styling */
.steering-section:has(.steering-box.steered) .steering-label,
.steering-label.steered {
    background-color: rgba(245, 158, 11, 0.25);
    color: #92400e;
}

.steering-box.steered {
    border-color: rgba(245, 158, 11, 0.25);
    background-color: rgba(245, 158, 11, 0.05);
}

/* Highlighting for verbs */
.highlight-baseline {
    background-color: rgba(59, 130, 246, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

.highlight-steered {
    background-color: rgba(245, 158, 11, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* Citation */
.citation-container {
    position: relative;
    margin: 16px 0;
}

.citation-container pre {
    margin: 0;
    overflow-x: auto;
}

.citation-container code {
    font-family: "Fira Code", monospace;
    font-size: 13px;
    line-height: 1.6;
}

.copy-button {
    position: absolute;
    top: 12px;
    right: calc(12px + 0.25em);
    padding: 8px 10px;
    font-size: 14px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-button:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.copy-button.copied {
    background-color: #10b981;
    color: white;
    border-color: #10b981;
}

/* Footer tweaks */
footer {
    
    margin-top: 40px;
    padding: 16px 0;
}

footer p {
    font-style: normal;
    font-size: 0.8em;
}

footer p a {
    font-size: 1em;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .demo-cell {
        padding: 12px;
    }

    .token {
        font-size: 14px;
        padding: 3px 8px;
    }

    .ablation-box {
        padding: 12px;
        font-size: 14px;
    }
}

@media screen and (min-width: 769px) {
    div.container.blog#first-content div.blog-title.no-cover .link {
        padding-top: 4vh;
    }
}

@media screen and (min-width: 1200px) {
    div.container.blog#first-content div.blog-title .blog-intro p {
      padding: 0.75em 1em;
    }
}