/* Style for inline content demonstration */

/* Font definitions using local Selawik fonts */
@font-face {
    font-family: 'Selawik';
    src: url('Selawik-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Selawik';
    src: url('Selawik-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

body {
    font-family: 'Selawik', sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    border-bottom: 3px solid #0066cc;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

header h1 {
    margin: 0;
    color: #0066cc;
    font-size: 2.5rem;
}

main {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

section {
    margin-bottom: 30px;
}

section h2 {
    color: #0066cc;
    margin-bottom: 15px;
}

.inline-example {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 15px 0;
}

.inline-example h3 {
    margin-top: 0;
    color: #666;
}

code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    line-height: 1.5;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Inline content highlighting */
.highlight {
    background: #ffeaa7;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Content blocks */
.content-block {
    background: #fff;
    border-left: 4px solid #0066cc;
    padding: 15px;
    margin: 20px 0;
}

/* Tutorial example boxes */
.example-box,
.practice-box {
    background: #f0f8ff;
    border: 1px solid #d0e0f0;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
}

.example-box h4,
.practice-box h4 {
    margin-top: 0;
    color: #0066cc;
}

.note {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

/* Code display */
pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

code {
    background: #e2e8f0;
    color: #2d3748;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

th,
td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

th {
    background: #f0f0f0;
    font-weight: bold;
}

/* Badge styling */
.badge {
    display: inline-block;
    padding: 4px 8px;
    background: #ff6b6b;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

/* Block demo styling */
.block-demo {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    /* pre-line preserves newlines but collapses leading spaces — this removes
       the indentation that SSI propagates from the token's position in the
       page template, without needing any offset tricks. */
    white-space: pre-line;
}

.block-example {
    background: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    white-space: pre-line;
}

/* Code blocks included via SSI: the first line lands right after <code>
   (col 0) while continuation lines get the 2-space token indentation.
   text-indent shifts the first line to match. */
.code-example pre code {
    display: block;
    text-indent: 2ch;
}

/* Mode comparison boxes */
.mode-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.mode-box {
    background: #f0f8ff;
    border: 1px solid #d0e0f0;
    padding: 20px;
    border-radius: 8px;
}

.mode-box h4 {
    margin-top: 0;
    color: #0066cc;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.feature-card {
    background: #fff;
    border: 2px solid #0066cc;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.feature-card h3 {
    margin-top: 0;
    color: #0066cc;
}

/* Alert boxes */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert h4 {
    margin-top: 0;
}

/* Comparison visual */
.comparison-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.comparison-side {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.comparison-side h4 {
    margin-top: 0;
    color: #495057;
}

/* Code blocks */
.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}

/* CSS Note Section */
.css-note {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #00acc1;
    margin-top: 30px;
}

.css-note h3 {
    color: #006064;
    margin-bottom: 15px;
}

.css-note p {
    margin: 10px 0;
}

.css-note pre {
    margin: 15px 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    color: #666;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    main {
        padding: 20px;
    }

    header h1 {
        font-size: 2rem;
    }

    .mode-comparison,
    .feature-grid,
    .comparison-box {
        grid-template-columns: 1fr;
    }
}

.icon-success { color: green; }
.icon-warning { color: orange; }
.icon-error { color: red; }
.arrow-left { color: blue; }
.highlight { color: purple; }
