
@font-face {
    font-family: "okra";
    src: url("../assets/fonts/okra.ttf") format("truetype");
}
:root {
    --md-text-font: "okra";
    --md-code-font: "roboto";
}
:root  > * {
    --md-primary-fg-color:        #E23744;
    --md-primary-fg-color--light: #ECB7B7;
    --md-primary-fg-color--dark:  #90030C;
    --md-default-fg-color--light: #272727;
}
.component-preview {
    background-color: #F2F4F7;
}
.grid-option {
    border: 0.5px solid rgb(172, 178, 190);
    border-radius: 20px;
    background-color: #F2F4F7;
}
.md-header__title {
    margin-left: 0px !important;
    font-family: "okra", sans-serif !important;
    font-weight: bold !important;
}

/* Force white text/icons in header on red background */
.md-header,
.md-header__title,
.md-header__topic,
.md-header__title .md-ellipsis,
.md-header nav.md-header__inner {
    color: #ffffff !important;
}
.md-header .md-header__button,
.md-header .md-source,
.md-header .md-source__repository,
.md-header .md-source__fact,
.md-header .md-icon,
.md-header a {
    color: #ffffff !important;
}
.md-header .md-source {
    background-color: transparent !important;
    font-family: "okra", sans-serif !important;
    font-weight: bold !important;
}
.md-header .md-source:hover {
    background-color: transparent !important;
}
.md-header .md-source__repository {
    font-family: "okra", sans-serif !important;
    font-weight: bold !important;
}
:root  > * {
    --md-primary-fg-color: #E23744;
    --md-accent-fg-color: #E23744;
}

/* Additional custom styles for Pulse MQTT */

/* Hero section */
.hero-section {
    text-align: center;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    background-color: #F2F4F7;
    border-radius: 20px;
    border: 1px solid rgb(172, 178, 190);
}

.hero-section h1 {
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #272727;
}

.hero-section p {
    font-size: 1.15rem;
    color: #5A6270;
    margin-bottom: 2rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Grid cards */
.grid.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 2rem 0;
}

.grid.cards > div {
    padding: 1.75rem;
    border-radius: 20px;
    background-color: #F2F4F7;
    border: 0.5px solid rgb(172, 178, 190);
    transition: all 0.2s ease;
}

.grid.cards > div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: #ECB7B7;
}

.grid.cards svg.lg {
    width: 3rem;
    height: 3rem;
    color: #E23744;
    margin-bottom: 1rem;
}

.grid.cards h3 {
    color: #272727;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.grid.cards p {
    color: #5A6270;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Comparison tables */
.comparison table {
    margin: 2rem 0;
}

.comparison td:nth-child(3) {
    color: #E23744;
    font-weight: 500;
}

/* Code blocks - single container only, no outer wrapper border */
.highlight {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: visible;
    border: none;
    background: transparent;
    padding: 0;
}

.highlight pre {
    border-radius: 12px !important;
    margin: 0;
    overflow: hidden;
}

.highlight code {
    border-radius: 12px !important;
    border: none !important;
}

/* Tabbed code blocks - remove double container */
.tabbed-content .highlight {
    margin: 0;
    border: none;
    border-radius: 0;
}

.tabbed-set {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

/* Admonitions */
.admonition {
    margin: 1.5rem 0;
    border-left-width: 3px;
    border-radius: 12px;
}

.admonition.note {
    border-left-color: #E23744;
    background-color: rgba(213, 46, 63, 0.05);
}

.admonition.tip {
    border-left-color: #2DCE89;
    background-color: rgba(45, 206, 137, 0.05);
}

.admonition.warning {
    border-left-color: #FB6340;
    background-color: rgba(251, 99, 64, 0.05);
}

/* Next steps section */
.next-steps {
    background-color: #F2F4F7;
    padding: 2.5rem;
    border-radius: 20px;
    margin: 2rem 0;
    border: 0.5px solid rgb(172, 178, 190);
}

.next-steps h2 {
    color: #272727;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.next-steps ol {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.next-steps ol li {
    counter-increment: step-counter;
    margin-bottom: 1.25rem;
    padding-left: 3rem;
    position: relative;
    color: #5A6270;
}

.next-steps ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: #E23744;
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Acknowledgments section */
.acknowledgments {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 0.5px solid rgb(172, 178, 190);
    color: #5A6270;
}

/* Buttons */
.md-button {
    margin: 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.md-button--primary {
    background-color: #E23744;
    border-color: #E23744;
}

.md-button--primary:hover {
    background-color: #90030C;
    border-color: #90030C;
    transform: translateY(-1px);
}

/* Tables */
table {
    font-size: 0.9rem;
    border-radius: 12px;
    overflow: hidden;
    border: 0.5px solid rgb(172, 178, 190);
}

table th {
    background-color: #E23744;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
}

table td {
    padding: 0.75rem 1rem;
    border-bottom: 0.5px solid rgb(172, 178, 190);
}

table tr {
    transition: background-color 0.15s ease;
}

table tr:hover {
    background-color: #F2F4F7;
}

table tr:last-child td {
    border-bottom: none;
}

/* Tabs */
.tabbed-set {
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: none;
}

.tabbed-labels > label {
    transition: all 0.2s ease;
}

.tabbed-labels > label:hover {
    background: #F2F4F7;
}

/* Mermaid diagrams */
.mermaid {
    text-align: center;
    margin: 2rem 0;
    padding: 2rem;
    background-color: #F2F4F7;
    border-radius: 20px;
    border: 0.5px solid rgb(172, 178, 190);
}

/* Links */
a {
    transition: opacity 0.2s ease;
    color: #E23744;
}

a:hover {
    opacity: 0.8;
}

/* Inline code */
code {
    background-color: #F2F4F7;
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-size: 0.9em;
    border: 0.5px solid rgb(172, 178, 190);
    color: #272727;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F2F4F7;
}

::-webkit-scrollbar-thumb {
    background: rgb(172, 178, 190);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ECB7B7;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .grid.cards {
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .next-steps {
        padding: 1.5rem;
    }
    
    .next-steps ol li {
        padding-left: 2.75rem;
    }
    
    .next-steps ol li::before {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.9rem;
    }
}

/* Dark mode */
[data-md-color-scheme="slate"] {
    --md-primary-fg-color: #ECB7B7;
    --md-primary-fg-color--light: #F5D6D9;
    --md-primary-fg-color--dark: #E23744;
}

[data-md-color-scheme="slate"] .hero-section,
[data-md-color-scheme="slate"] .grid.cards > div,
[data-md-color-scheme="slate"] .next-steps,
[data-md-color-scheme="slate"] code,
[data-md-color-scheme="slate"] .component-preview,
[data-md-color-scheme="slate"] .grid-option {
    background-color: #1E1E1E;
    border-color: #3D3D3D;
}

[data-md-color-scheme="slate"] .grid.cards > div:hover {
    border-color: #ECB7B7;
}

[data-md-color-scheme="slate"] table tr:hover {
    background-color: #1E1E1E;
}

[data-md-color-scheme="slate"] table td {
    border-bottom-color: #3D3D3D;
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.md-content {
    animation: fadeIn 0.3s ease-out;
}

/* Enhanced navigation */
.md-nav__link--active {
    background: rgba(213, 46, 63, 0.08);
    border-left: 3px solid #E23744;
    font-weight: 500;
}

.md-nav__link:hover {
    background: rgba(213, 46, 63, 0.05);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #272727;
}

p {
    line-height: 1.7;
    color: #5A6270;
}

/* Spacing consistency */
.md-typeset h2 {
    margin-top: 2.5rem;
}

.md-typeset h3 {
    margin-top: 2rem;
}

/* Search box */
.md-search__input {
    border-radius: 12px;
}

/* Content backgrounds */
.md-typeset .admonition,
.md-typeset details {
    border-radius: 12px;
}


/* Increase header logo size */
.md-header__button.md-logo img {
    height: 2.5rem !important;
    width: auto !important;
    max-height: none !important;
}
.md-header__button.md-logo {
    padding: 0.2rem;
}

/* Component grid - compose-sushi style */
.component-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    margin: 2rem 0 !important;
}

.component-card {
    border: 1px solid rgb(210, 214, 222) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease !important;
    padding: 0 !important;
}

.component-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-2px) !important;
}

.component-card .component-preview {
    background-color: #F2F4F7 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 1.5rem !important;
    border-radius: 16px 16px 0 0 !important;
}

.component-card .component-preview .highlight {
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.component-card .component-preview pre {
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
    border: none !important;
    box-shadow: none !important;
}

.component-card .component-preview code {
    background: transparent !important;
    border: none !important;
    color: #272727 !important;
    font-size: 0.8rem !important;
    padding: 0 !important;
}

.component-card .component-preview img {
    width: 100%;
    max-width: 280px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.component-card > p,
.component-card .component-label {
    text-align: center !important;
    padding: 1rem !important;
    margin: 0 !important;
    font-weight: 600 !important;
    color: #272727 !important;
    font-size: 1rem !important;
    border-top: 1px solid rgb(210, 214, 222) !important;
    background: #ffffff !important;
}

.component-card > p strong,
.component-card .component-label strong {
    font-weight: 600 !important;
    color: #272727 !important;
}

@media screen and (max-width: 768px) {
    .component-grid {
        grid-template-columns: 1fr !important;
    }
}
