/*
 * Hand-written fixes for the marketing site.
 *
 * app.css is a pruned Tailwind/DaisyUI build whose source is not in this repo,
 * so utility classes that were never used before (mb-4, mockup-code, chat, ...)
 * do not exist in it. Anything new lives here with a `zf-` prefix, so it keeps
 * working even if app.css is regenerated.
 */

/* ---- Dark code / terminal block (home snippet + features CLI) ---- */
.zf-code {
    position: relative;
    text-align: left;
    border-radius: 1rem;
    background: #1a1b26;
    color: #c0caf5;
    box-shadow: 0 20px 40px -12px rgb(0 0 0 / 0.35);
    max-width: 100%;
    min-width: 0;
}
.zf-code pre {
    margin: 0;
    padding: 1.25rem 5rem 1.25rem 1.25rem;
    overflow-x: auto;
    font-family: var(--font-mono, "DM Mono", monospace);
    font-size: 0.875rem;
    line-height: 1.7;
    white-space: pre;
    background: transparent;
    color: inherit;
}
.zf-code pre code { background: transparent; padding: 0; color: inherit; }
.zf-code-copy {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
    color: rgb(192 202 245 / 0.8);
}
.zf-code-copy:hover { color: #fff; }
.zf-code-tabs { margin: 0 auto 1rem; }
.zf-code-line-out { opacity: 0.6; }
/* Grid/flex children holding scrollable code must be allowed to shrink. */
.zf-minw0 { min-width: 0; }

/* ---- Features: MCP chat mock ---- */
.zf-chat { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.zf-chat-row { display: flex; align-items: flex-end; gap: 0.75rem; max-width: 100%; }
.zf-chat-row--api { flex-direction: row-reverse; }
.zf-chat-avatar {
    flex: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgb(37 99 235 / 0.15);
    color: #1d4ed8;
}
.zf-chat-row--api .zf-chat-avatar { background: rgb(124 58 237 / 0.15); color: #6d28d9; }
.zf-chat-bubble {
    padding: 0.875rem 1.125rem;
    border-radius: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #fff;
    background: #2563eb;
    border-bottom-left-radius: 0.25rem;
    box-shadow: 0 10px 24px -10px rgb(37 99 235 / 0.6);
}
.zf-chat-row--api .zf-chat-bubble {
    background: #7c3aed;
    border-bottom-left-radius: 1.25rem;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 10px 24px -10px rgb(124 58 237 / 0.6);
}

/* ---- Footer legal line ---- */
.zf-footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.75rem;
}
.zf-footer-legal strong { font-weight: 600; }
@media (min-width: 768px) {
    .zf-footer-legal { justify-content: flex-start; }
}

/* ---- Native Contact Page ---- */
.zf-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
}
@media (min-width: 1024px) {
    .zf-contact-grid {
        grid-template-columns: 5fr 7fr;
        gap: 3rem;
    }
}
.zf-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (min-width: 640px) {
    .zf-form-row {
        grid-template-columns: 1fr 1fr;
    }
}
.zf-form-group {
    margin-bottom: 0;
}
.zf-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    opacity: 0.85;
}
.zf-input,
.zf-select,
.zf-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--color-base-300, #cbd5e1);
    background-color: var(--color-base-100, #ffffff);
    color: inherit;
    font-size: 0.9375rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.zf-input:focus,
.zf-select:focus,
.zf-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.zf-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
}
.zf-checkbox-row input[type="checkbox"] {
    margin-top: 0.125rem;
    accent-color: #2563eb;
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}
.zf-contact-card {
    background: var(--color-base-100, #ffffff);
    border: 1px solid var(--color-base-200, #e2e8f0);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}
.zf-info-card {
    background: var(--color-base-200, #f8fafc);
    border: 1px solid var(--color-base-300, #e2e8f0);
    border-radius: 1.5rem;
    padding: 2rem;
}

/* ---- What is ZplFlow Feature Cards ---- */
.zf-what-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}
@media (min-width: 1024px) {
    .zf-what-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.zf-what-card {
    background: var(--color-base-100, #ffffff);
    border: 1px solid var(--color-base-200, #e2e8f0);
    border-radius: 1.25rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.zf-what-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}
@media (max-width: 767px) {
    .zf-hide-mobile {
        display: none !important;
    }
}

/* ---- Documentation Layout ---- */
.zf-docs-container {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 2.5rem 1rem;
    width: 100%;
}
@media (min-width: 640px) {
    .zf-docs-container {
        padding: 2.5rem 1.5rem;
    }
}
@media (min-width: 1024px) {
    .zf-docs-container {
        padding: 2.5rem 2rem;
    }
}
.zf-docs-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    min-width: 0;
}
@media (min-width: 1024px) {
    .zf-docs-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 2.5rem;
    }
}
.zf-docs-sidebar {
    width: 100%;
    flex: 0 0 auto;
}
@media (min-width: 1024px) {
    .zf-docs-sidebar {
        width: 16rem;
        position: sticky;
        top: 5rem;
    }
}
.zf-docs-content {
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}
.zf-docs-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}
.zf-docs-content pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.zf-docs-toc {
    display: none;
    flex: 0 0 auto;
    width: 14rem;
}
@media (min-width: 1280px) {
    .zf-docs-toc {
        display: block;
        position: sticky;
        top: 5rem;
    }
}

/* ---- Badge Modifiers (missing in pruned app.css) ---- */
.badge-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #d97706 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}
html[data-theme="dark"] .badge-warning {
    background-color: rgba(245, 158, 11, 0.22) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}
html[data-theme="dark"] .badge-success {
    background-color: rgba(16, 185, 129, 0.22) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.5) !important;
}

