/* Import Instrument Sans font */
@import url(https://fonts.bunny.net/css?family=instrument-sans:400);

/* MLCommons R2 bucket index pages - Official Brand Colors */
:root {
    --primary-color: #343C52;
    --secondary-color: #535869;
    --accent-color: #CCEBD4;
    --bg-color: #ffffff;
    --text-color: #0F1321;
    --text-color-light: #FBFBFC;
    --border-color: #EBEEF4;
    --dataset-bg: #355B65;
    --code-bg: #1F363C;
    --arrow-color: #355B65;
    --warning-color: #F7CB84;
    --info-color: #BED3FB;
    --light-gray: #F7F8FA;
    --light-gray-dark: #EBEEF4;
    --hover-color: #B3CEBA;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    padding: 0;
    margin: 0;
    font-size: 16px;
    padding-top: 4rem; /* Space for fixed header */
}

/* Header strip with logo */
.header-strip {
    background-color: var(--primary-color);
    width: 100%;
    padding: 0.65rem 2rem; /* equal vertical padding */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center; /* vertically center logo */
}

.header-strip a {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header-strip a:hover {
    opacity: 0.9;
}

.mlc-logo {
    height: 40px;
    width: auto;
    display: block;
}

/* Main content container with proper spacing */
.page-content {
    padding: 0 2rem 2rem 2rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 600;
    text-align: left;
    letter-spacing: -0.025em;
}

h2 {
    color: var(--primary-color);
    margin: 1.5rem 0 1.5rem 0;
    font-size: 1.875rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

h3 {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

h4 {
    color: var(--secondary-color);
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.dataset-title {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    line-height: 1.7;
}

ul, ol {
    margin: 1rem 0 1.5rem 0;
    padding-left: 1.5rem;
    color: var(--secondary-color);
}

ul li, ol li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Nested lists with less margin */
ul ul, ol ul, ul ol, ol ol {
    margin: 0.5rem 0;
}

code {
    background-color: var(--light-gray-dark);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875em;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    word-break: break-all;
    overflow-wrap: break-word;
}

.dataset-description {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    line-height: 1.6;
}

.code-block {
    background-color: var(--code-bg);
    border: 1px solid var(--code-bg);
    border-radius: 6px;
    padding: 1.5rem;
    padding-right: 5rem; /* Make room for copy button */
    margin: 1rem 0 0.75rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    position: relative;
    line-height: 1.5;
}

.code-block code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text-color-light);
    font-weight: 500;
}

.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: var(--text-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.copy-btn:hover {
    background: var(--hover-color);
}

.dataset-section {
    background: var(--dataset-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem 0;
    color: var(--text-color-light);
}

.command-section {
    margin: 0.75rem 0;
}

.alert {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0 0.5rem 0;
    border-radius: 6px;
    border: 1px solid;
    font-weight: 500;
}

.alert-info {
    background-color: var(--info-color);
    border-color: var(--info-color);
    color: var(--text-color);
}

.alert-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: var(--text-color);
}

/* Collapsible details styling */
details {
    margin: 1.5rem 0;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    background-color: var(--light-gray);
}

summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    background-color: transparent;
    border: none;
    outline: none;
    user-select: none;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    white-space: pre-wrap;
    -webkit-tap-highlight-color: transparent;
}

summary:hover {
    background-color: var(--light-gray-dark);
}

/* Hide default browser markers for all browsers */
summary::-webkit-details-marker {
    display: none;
}

summary::-moz-list-bullet {
    list-style-type: none;
}

summary::marker {
    display: none;
}

summary {
    list-style: none;
}

summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s ease;
    color: var(--arrow-color);
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

details[open] summary::before {
    transform: rotate(90deg);
}

details[open] summary {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

/* Make h3 & strong elements inside summary display inline */
summary h3, summary strong {
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
}

details > *:not(summary) {
    padding: 0.5rem 2rem 0.75rem 2rem;
    margin: 0;
}

/* Ensure proper spacing for content inside details */
details p {
    margin: 0 0 0.125rem 0; /* Much tighter spacing between p and ol */
    padding-left: 0.80rem; /* Reduced padding to align with list item text */
}

/* Override padding for dataset descriptions to align with titles */
details .dataset-description {
    padding-left: 0;
}

details ol, details ul {
    margin: 0; /* Remove all margins for minimal spacing */
    padding-left: 2rem; /* Match the container padding for alignment */
}

/* Specific rule for lists that immediately follow paragraphs in details */
details li {
    margin-bottom: 0.5rem;
}

/* Nested lists inside details need extra spacing */
details ul ul, details ol ul, details ul ol, details ol ol {
    margin: 0.25rem 0 0.5rem 0;
    padding-left: 1.5rem;
}

@media (max-width: 768px) {
    body {
        padding-top: 3rem; /* Reduced space for smaller mobile header */
    }
    
    .header-strip {
        padding: 0.5rem 1rem;
    }
    
    .mlc-logo {
        height: 32px;
    }
    
    .page-content {
        padding: 0 1rem 1rem 1rem;
    }
    
    .container {
        padding: 1.5rem;
        border: none;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .dataset-section {
        padding: 1rem;
    }
    
    .code-block {
        padding: 1rem;
        padding-right: 5rem; /* Make room for copy button on mobile */
    }
    
    .copy-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Mobile adjustments for collapsible sections */
    details > *:not(summary) {
        padding: 0.75rem 1.25rem 1rem 1.25rem;
    }
    
    details ol, details ul {
        padding-left: 1.25rem; /* Match mobile container padding for alignment */
    }
    
    details p {
        padding-left: 0.25rem; /* Reduced mobile padding to align with list text */
    }
    
    summary {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

/* Reserve vertical space for the quick-start skeleton so that loading the full
   shared Quick-Start block does not push content (avoids CLS) */
#quick-start-placeholder {
    visibility: hidden;
    min-height: 399px;           
}

/* Use light text inside dataset cards */
.dataset-section,
.dataset-section .dataset-title,
.dataset-section .dataset-description {
    color: var(--text-color-light);
} 