/* iFlow Documentation - Custom Styles
 * Matches flow-web-components design system
 * Primary: #00285B (dark navy), Secondary: cyan, Font: Manrope
 */

/* ============================================
 * Custom Primary Color (Material Theme)
 * Using flow-web-components color palette
 * ============================================ */
:root,
[data-md-color-scheme="default"] {
    /* Primary - dark navy (from --primary) */
    --md-primary-fg-color: #00285B;
    --md-primary-fg-color--light: #1E3E6E;
    --md-primary-fg-color--dark: #001a3d;

    /* Accent - cyan (from --cyan) */
    --md-accent-fg-color: #2ab9d0;
    --md-typeset-a-color: #07669a;

    /* Background matches body-bg */
    --md-default-bg-color: #ffffff;
}

[data-md-color-scheme="slate"] {
    /* Dark mode - lighter variants */
    --md-primary-fg-color: #1E3E6E;
    --md-primary-fg-color--light: #0D4F8B;
    --md-primary-fg-color--dark: #00285B;
    --md-accent-fg-color: #2ab9d0;
    --md-typeset-a-color: #2ab9d0;
}

/* ============================================
 * Typography Refinements
 * ============================================ */
.md-typeset {
    font-size: 0.85rem;
    line-height: 1.6;
}

.md-typeset h1 {
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--md-primary-fg-color);
}

.md-typeset h2 {
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--md-primary-fg-color);
}

.md-typeset h3 {
    font-weight: 500;
}

/* ============================================
 * Header Styling
 * ============================================ */
.md-header {
    background-color: var(--md-primary-fg-color);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

.md-header__title {
    font-weight: 600;
}

/* Navigation tabs - slightly darker */
.md-tabs {
    background-color: #001a3d;
}

/* ============================================
 * Navigation Sidebar
 * ============================================ */
.md-nav__link {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 5px;
    transition: background-color 0.15s ease;
}

.md-nav__link:hover {
    background-color: #ebeae8;
}

.md-nav__link--active {
    font-weight: 600;
    color: var(--md-primary-fg-color);
}

/* ============================================
 * Content Area
 * ============================================ */
.md-content {
    max-width: 900px;
}

/* Links - using blue from design system */
.md-typeset a {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}

.md-typeset a:hover {
    border-bottom-color: var(--md-typeset-a-color);
}

/* ============================================
 * Code Blocks
 * ============================================ */
.md-typeset code {
    font-size: 0.85em;
    padding: 0.15em 0.4em;
    border-radius: 5px;
    background-color: var(--md-code-bg-color);
}

.md-typeset pre {
    border-radius: 5px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

.md-typeset pre > code {
    font-size: 0.8em;
    line-height: 1.6;
}

/* Code copy button */
.md-clipboard {
    color: var(--md-default-fg-color--light);
    transition: color 0.15s ease;
}

.md-clipboard:hover {
    color: var(--md-primary-fg-color);
}

/* ============================================
 * Admonitions (Info boxes)
 * ============================================ */
.md-typeset .admonition {
    border-radius: 5px;
    border-width: 0;
    border-left-width: 4px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

.md-typeset .admonition-title {
    font-weight: 600;
}

/* ============================================
 * Tables
 * ============================================ */
.md-typeset table:not([class]) {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

.md-typeset table:not([class]) th {
    background-color: #f9f8f7;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
    padding: 0.75rem 1rem;
}

/* ============================================
 * Screenshot Images
 * ============================================ */
.screenshot {
    border: 1px solid #ebeae8;
    border-radius: 5px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

/* ============================================
 * Service Cards (Landing Page)
 * ============================================ */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-card {
    padding: 1.5rem;
    border: 1px solid #ebeae8;
    border-radius: 5px;
    background: #fefefd;
    transition: all 0.2s ease;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

.service-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.service-card h3 {
    margin-top: 0;
    color: var(--md-primary-fg-color);
}

.service-card p {
    color: #6f6e6c;
    margin-bottom: 0;
}

/* ============================================
 * Buttons & CTAs
 * ============================================ */
.md-typeset .md-button {
    border-radius: 5px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.md-typeset .md-button--primary {
    background-color: var(--md-primary-fg-color);
    border-color: var(--md-primary-fg-color);
}

.md-typeset .md-button--primary:hover {
    background-color: #1E3E6E;
    border-color: #1E3E6E;
    box-shadow: 0 2px 12px rgba(0, 40, 91, 0.3);
}

/* Secondary button - cyan */
.md-typeset .md-button--secondary {
    background-color: #e8f5f6;
    border-color: #e8f5f6;
    color: #1f8aa2;
}

.md-typeset .md-button--secondary:hover {
    background-color: #1f8aa2;
    border-color: #1f8aa2;
    color: #ffffff;
}

/* ============================================
 * Footer
 * ============================================ */
.md-footer {
    background-color: #ebeae8;
}

.md-footer-meta {
    background-color: transparent;
}

/* ============================================
 * Search
 * ============================================ */
.md-search__input {
    border-radius: 5px;
}

.md-search__form {
    border-radius: 5px;
}

/* ============================================
 * Tabs (Content)
 * ============================================ */
.md-typeset .tabbed-labels > label {
    font-weight: 500;
    border-radius: 5px 5px 0 0;
}

/* ============================================
 * Back to Top Button
 * ============================================ */
.md-top {
    border-radius: 5px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
 * Tags (matching design system)
 * ============================================ */
.md-typeset .tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
}

.tag-blue { background: #deeef4; color: #074068; }
.tag-cyan { background: #e8f5f6; color: #1f8aa2; }
.tag-green { background: #e8f8f0; color: #3aa870; }
.tag-orange { background: #ffefe5; color: #de7d26; }
.tag-red { background: #fde8e5; color: #c43d2b; }

/* ============================================
 * Mobile Responsive
 * ============================================ */
@media screen and (max-width: 76.25em) {
    .md-nav__link {
        padding: 0.75rem 1rem;
    }
}

/* ============================================
 * Feature Highlights (Home Page)
 * ============================================ */
.feature-highlight {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1E3E6E 0%, #00285B 100%);
    border-radius: 5px;
    color: white;
    margin: 2rem 0;
}

.feature-highlight h3 {
    color: white;
    margin: 0;
}

.feature-highlight p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0.5rem 0 0;
}

/* ============================================
 * Status badges (matching design system tags)
 * ============================================ */
.status-success { background: #e8f8f0; color: #3aa870; padding: 4px 12px; border-radius: 5px; font-size: 12px; font-weight: 500; }
.status-warning { background: #ffefe5; color: #de7d26; padding: 4px 12px; border-radius: 5px; font-size: 12px; font-weight: 500; }
.status-error { background: #fde8e5; color: #c43d2b; padding: 4px 12px; border-radius: 5px; font-size: 12px; font-weight: 500; }
.status-info { background: #e8f5f6; color: #1f8aa2; padding: 4px 12px; border-radius: 5px; font-size: 12px; font-weight: 500; }
