/* ========================================
   Winzos Docs
   Tokens mirror apps/www (tailwind config + css/style.css).
   ======================================== */

:root {
    --primary: #8e44ad;
    --secondary: #667eea;
    --accent: #764ba2;
    --header-offset: 6.5rem;
}

html {
    scroll-padding-top: var(--header-offset);
}

[x-cloak] {
    display: none !important;
}

/* Hero - same gradient as www .hero-section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* Better focus styles for accessibility (www style.css) */
button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ----------------------------------------
   Sidebar nav
   ---------------------------------------- */
.nav-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 1.5rem 0 0.5rem;
    padding: 0 0.75rem;
}

.nav-group-title:first-child {
    margin-top: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: #f9fafb;
    color: var(--primary);
}

.nav-link.is-active {
    background: rgba(142, 68, 173, 0.08);
    color: var(--primary);
    font-weight: 600;
}

/* On-page table of contents */
.toc-link {
    display: block;
    padding: 0.25rem 0 0.25rem 0.75rem;
    border-left: 2px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.toc-link:hover {
    color: var(--primary);
}

.toc-link.is-active {
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.toc-link.toc-sub {
    padding-left: 1.5rem;
}

/* ----------------------------------------
   Article prose (Tailwind Typography isn't loaded, same as www)
   ---------------------------------------- */
.doc-content {
    color: #4b5563;
    font-size: 1.0625rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.doc-content > * + * {
    margin-top: 1.1rem;
}

.doc-content h2 {
    font-size: 1.6rem;
    line-height: 1.25;
    font-weight: 700;
    color: #111827;
    margin-top: 3rem;
    padding-top: 0.25rem;
}

.doc-content > h2:first-child {
    margin-top: 0;
    padding-top: 0;
}

.doc-content h3 {
    font-size: 1.2rem;
    line-height: 1.35;
    font-weight: 600;
    color: #111827;
    margin-top: 2rem;
}

/* Participant pages: h2 with a bespoke icon (img/illustrations/icons) */
.doc-content h2.spot-heading {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.doc-content h2.spot-heading img {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
}

/* Inline icon in front of a list item */
.icon-list {
    list-style: none !important;
    padding-left: 0 !important;
}

.icon-list > li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.icon-list > li > img {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Illustrated step cards (participant guide) */
.step-card {
    background: #fff;
    border: 1px solid #ede9fe;
    border-radius: 1rem;
    padding: 1rem 1rem 1.25rem;
    text-align: center;
    box-shadow: 0 10px 25px -18px rgba(107, 47, 134, 0.45);
}

.step-card img {
    display: block;
    width: 100%;
    max-width: 13rem;
    height: auto;
    margin: 0 auto 0.5rem;
}

.step-card .step-card-title {
    font-weight: 700;
    color: #111827;
    font-size: 1.05rem;
}

.step-card .step-card-text {
    margin-top: 0.25rem;
    font-size: 0.925rem;
    line-height: 1.5;
    color: #6b7280;
}

@media (max-width: 639px) {
    .step-card {
        display: grid;
        grid-template-columns: 6.5rem minmax(0, 1fr);
        grid-template-rows: auto auto;
        column-gap: 0.85rem;
        align-items: center;
        text-align: left;
        padding: 0.6rem 1rem 0.6rem 0.6rem;
    }

    .step-card img {
        grid-row: 1 / span 2;
        max-width: 6.5rem;
        margin: 0;
    }

    .step-card .step-card-title {
        align-self: end;
    }

    .step-card .step-card-text {
        align-self: start;
    }
}

.doc-content h2 + *,
.doc-content h3 + * {
    margin-top: 0.75rem;
}

.doc-content strong {
    color: #1f2937;
    font-weight: 600;
}

.doc-content a:not(.btn):not(.card-link):not(.badge-link) {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(142, 68, 173, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}

.doc-content a:not(.btn):not(.card-link):not(.badge-link):hover {
    text-decoration-color: var(--primary);
}

.doc-content ul,
.doc-content ol:not(.steps) {
    padding-left: 1.4rem;
}

.doc-content ul {
    list-style: disc;
}

.doc-content ol:not(.steps) {
    list-style: decimal;
}

.doc-content li + li {
    margin-top: 0.4rem;
}

.doc-content li::marker {
    color: #a78bfa;
}

.doc-content :not(pre) > code {
    background: #f3f4f6;
    color: #6b21a8;
    border-radius: 0.375rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.875em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    word-break: break-word;
}

/* UI label - how we mark button/field names from the dashboard */
.ui {
    display: inline-block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-bottom-width: 2px;
    border-radius: 0.375rem;
    padding: 0 0.4rem;
    font-size: 0.9em;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.6;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: #4b5563;
}

/* ----------------------------------------
   Numbered steps
   ---------------------------------------- */
.steps {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 3rem;
    min-height: 2.25rem;
}

.steps > li + li {
    margin-top: 1.25rem;
}

.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px -2px rgba(142, 68, 173, 0.4);
}

.steps > li > strong:first-child {
    display: block;
    color: #111827;
}

/* ----------------------------------------
   Callouts (based on www .about-winzos-definition)
   ---------------------------------------- */
.callout {
    display: flex;
    gap: 0.85rem;
    border-left: 4px solid var(--secondary);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    font-size: 0.98rem;
    line-height: 1.65;
    color: #334155;
}

.callout > i {
    margin-top: 0.3rem;
    color: var(--secondary);
    flex-shrink: 0;
}

/* Bespoke callout icon (img/illustrations/icons/callout-*.svg) */
.callout > img.callout-icon {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    margin-top: -0.05rem;
    box-shadow: 0 4px 10px -6px rgba(107, 47, 134, 0.35);
    border-radius: 0.65rem;
}

.callout {
    align-items: flex-start;
}

.callout strong {
    color: #1e293b;
}

.callout > div > * + * {
    margin-top: 0.5rem;
}

.callout-tip {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.callout-tip > i {
    color: #10b981;
}

.callout-warn {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.callout-warn > i {
    color: #d97706;
}

.callout-shopify {
    border-left-color: #5a863e;
    background: linear-gradient(135deg, #f7fbf2 0%, #eef6e6 100%);
}

.callout-shopify > i {
    color: #5a863e;
}

/* Audience badges */
.aud-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.5;
    vertical-align: middle;
    white-space: nowrap;
}

.aud-shopify {
    background: #eef6e6;
    color: #3f6212;
}

.aud-creator {
    background: rgba(102, 126, 234, 0.12);
    color: #4338ca;
}

/* ----------------------------------------
   Code blocks
   ---------------------------------------- */
.code-block {
    border-radius: 0.75rem;
    overflow: hidden;
    background: #111827;
    box-shadow: 0 10px 25px -10px rgba(17, 24, 39, 0.5);
}

.code-block .code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0.75rem 0.5rem 1rem;
    background: #1f2937;
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 600;
}

.code-block pre {
    margin: 0;
    padding: 1rem;
    overflow-x: auto;
    color: #e5e7eb;
    font-size: 0.85rem;
    line-height: 1.6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-block .tok-tag {
    color: #f9a8d4;
}

.code-block .tok-attr {
    color: #c4b5fd;
}

.code-block .tok-val {
    color: #86efac;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.25rem 0.7rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.copy-btn.is-copied {
    background: #10b981;
    color: #fff;
}

/* ----------------------------------------
   Tables
   ---------------------------------------- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.55;
}

.table-wrap th {
    background: #f9fafb;
    color: #111827;
    font-weight: 600;
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.table-wrap td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: top;
    min-width: 9rem;
}

.table-wrap tr:last-child td {
    border-bottom: 0;
}

/* ----------------------------------------
   Screenshot frames
   Drop a PNG at the <img> src and it replaces the placeholder automatically.
   ---------------------------------------- */
.shot {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
}

.shot .shot-placeholder {
    display: none;
}

.shot.is-missing img {
    display: none;
}

.shot.is-missing .shot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    border: 2px dashed #d8b4fe;
    background:
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.08), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(142, 68, 173, 0.08), transparent 45%),
        #faf5ff;
    color: #7e22ce;
    text-align: center;
    padding: 1rem;
}

.shot.is-missing .shot-placeholder i {
    font-size: 2rem;
    opacity: 0.6;
}

.shot.is-missing .shot-placeholder span {
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 28rem;
}

.shot figcaption {
    margin-top: 0.6rem;
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
}

/* ----------------------------------------
   Cards / tabs / FAQ
   ---------------------------------------- */
.card-link {
    display: block;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-link:hover {
    transform: translateY(-4px);
    border-color: #d8b4fe;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
}

.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 0.6rem;
}

.tab-bar button {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #4b5563;
    transition: all 0.15s ease;
}

.tab-bar button[aria-selected="true"] {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tab-panel {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-top: 0.75rem;
}

.tab-panel > * + * {
    margin-top: 1rem;
}

/* FAQ accordion (www style.css) */
.faq-accordion {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s ease;
}

.faq-accordion + .faq-accordion {
    margin-top: 0.75rem;
}

.faq-accordion:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.faq-accordion button {
    width: 100%;
    min-height: 3.25rem;
    padding: 1rem 1.25rem;
    gap: 1rem;
    text-align: left;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #111827;
    transition: background-color 0.15s ease;
}

.faq-accordion button:hover {
    background: #f9fafb;
}

.faq-accordion button i {
    color: #9ca3af;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-accordion.is-open button i {
    transform: rotate(180deg);
}

.faq-accordion .faq-answer {
    padding: 1rem 1.25rem;
    color: #4b5563;
    line-height: 1.65;
    font-size: 0.98rem;
}

.faq-accordion .faq-answer > * + * {
    margin-top: 0.6rem;
}

.faq-accordion.is-open button {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

/* ----------------------------------------
   Mobile drawer
   ---------------------------------------- */
.drawer-panel {
    width: min(20rem, 86vw);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
