/* style.css */

/* General Body Styling */
/* Set a consistent font and some basic padding */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5; /* Light grey background */
}

/* Header Styling - Bulma's hero component handles most of this, but adding custom touches */
.hero.is-primary {
    background-color: #00d1b2; /* Bulma's primary color */
    color: white;
    padding: 3rem 1.5rem; /* More padding for a softer look */
}

/* Main content sections */
.section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Markdown Cheatsheet Section Styling */
#learn-markdown .box {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    height: 100%; /* Ensure all boxes in a row have the same height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#learn-markdown h3 {
    color: #363636; /* Dark grey for headings */
    margin-bottom: 0.75rem;
}

/* Pre and Code Block Styling */
pre {
    background-color: #282c34; /* Dark background for code */
    color: #abb2bf; /* Light text for code */
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto; /* Allow horizontal scrolling for long lines */
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace; /* Monospaced font */
    font-size: 0.9em;
    margin-bottom: 1em; /* Space below code blocks */
}

code {
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9em;
}

/* For inline code, give it a subtle background */
:not(pre)>code {
    background-color: #e6e6e6; /* Light grey background for inline code */
    padding: 0.2em 0.4em;
    border-radius: 3px;
    color: #c43232; /* A distinct color for inline code */
}

/* Rendered HTML content within articles */
#learn-markdown .content {
    background-color: #fefefe;
    border: 1px solid #dbdbdb;
    padding: 1em;
    border-radius: 5px;
    margin-top: 1em;
}

#learn-markdown .content h1,
#learn-markdown .content h2,
#learn-markdown .content h3 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    color: #363636;
}

/* Live Playground Styling */
#live-playground .textarea {
    min-height: 300px; /* Make the textarea taller by default */
    resize: vertical; /* Allow vertical resizing only */
    font-family: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 1rem;
    padding: 1em;
    border: 1px solid #dbdbdb;
    box-shadow: none; /* Remove default Bulma shadow */
}

#live-playground .preview-panel {
    min-height: 300px; /* Match the height of the textarea */
    background-color: white;
    border: 1px solid #dbdbdb;
    overflow-y: auto; /* Add scrollbar if content overflows vertically */
    padding: 1em;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1); /* Subtle inner shadow */
}

/* Styling for content within the preview panel to make it look rendered */
#live-playground .preview-panel p {
    margin-bottom: 1em;
}

#live-playground .preview-panel h1 { font-size: 2em; margin-bottom: 0.5em; }
#live-playground .preview-panel h2 { font-size: 1.5em; margin-bottom: 0.5em; }
#live-playground .preview-panel h3 { font-size: 1.17em; margin-bottom: 0.5em; }

#live-playground .preview-panel blockquote {
    border-left: 4px solid #dbdbdb;
    padding-left: 1em;
    color: #666;
    margin-left: 0;
}

#live-playground .preview-panel ul,
#live-playground .preview-panel ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

#live-playground .preview-panel ul {
    list-style-type: disc;
    padding-left: 1em;
}

#live-playground .preview-panel ol {
    list-style-type: decimal;
    padding-left: 1em;
}

#live-playground .preview-panel li {
    margin-bottom: 0.25em;
}

#live-playground .preview-panel pre {
    background-color: #f5f5f5; /* Lighter background for code in preview */
    color: #363636;
}

#live-playground .preview-panel :not(pre)>code {
    background-color: #eee;
}

/* Footer Styling */
.footer {
    background-color: #f5f5f5;
    padding: 2rem 1.5rem;
    border-top: 1px solid #dbdbdb;
    margin-top: 2rem;
}