/* Vendor portal additions on top of the VatPay web design (web-v2.css + dash.css, copied from
   VatPayWeb). Only what the vendor pages need that the web dashboard doesn't have. */

/* ---------- Flash messages ---------- */
.vp-flash {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--wv2-radius-sm);
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 600;
}

.vp-flash.is-success { background: var(--wv2-accent-soft); color: var(--wv2-accent-dark); }
.vp-flash.is-error { background: #FEF3F2; color: #B42318; }
.vp-flash.is-warning { background: #FFFAEB; color: #93370D; }
.vp-flash.is-info { background: #EFF8FF; color: #175CD3; }

/* ---------- Sidebar / account menu: Logout is a POST form, styled like the links ---------- */
.vp-nav-button,
.vp-menu-button {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.dash-profile-card .dash-profile-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-profile-card .dash-profile-badge.vp-status-pending { background: #FFFAEB; color: #B54708; }
.dash-profile-card .dash-profile-badge.vp-status-suspended,
.dash-profile-card .dash-profile-badge.vp-status-rejected { background: #FEF3F2; color: #B42318; }

/* ---------- Forms ---------- */
.dash-field input[type="date"],
.dash-field input[type="search"],
.dash-field input[type="url"] {
    width: 100%;
    border: 1px solid var(--wv2-border);
    border-radius: var(--wv2-radius-sm);
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--wv2-text);
    background: #fff;
    font-family: inherit;
}

.vp-hint {
    font-size: 11.5px;
    color: var(--wv2-text-muted);
    margin-top: 6px;
    line-height: 1.45;
}

.vp-field-error {
    display: block;
    font-size: 12px;
    color: #B42318;
    margin-top: 5px;
}

.vp-validation-summary ul {
    margin: 0 0 14px;
    padding: 12px 14px 12px 30px;
    background: #FEF3F2;
    color: #B42318;
    border-radius: var(--wv2-radius-sm);
    font-size: 13px;
}

.vp-validation-summary.validation-summary-valid { display: none; }

/* ---------- Tables / text ---------- */
.vp-mono {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12.5px;
}

.vp-num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.vp-muted { color: var(--wv2-text-muted); }

.dash-table td a { color: var(--wv2-accent-dark); font-weight: 600; text-decoration: none; }
.dash-table td a:hover { text-decoration: underline; }

.vp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    font-size: 12.5px;
    color: var(--wv2-text-muted);
}

.vp-pagination .dash-btn-row { margin: 0; }

.vp-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.vp-detail-grid .vp-detail-label { font-size: 11.5px; color: var(--wv2-text-muted); font-weight: 600; margin-bottom: 3px; }
.vp-detail-grid .vp-detail-value { font-size: 13.5px; font-weight: 700; color: var(--wv2-text); }

@media (max-width: 900px) {
    .vp-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Code samples (API guide, new key) ---------- */
.vp-code {
    background: #0B2E1C;
    color: #D7F5E3;
    border-radius: var(--wv2-radius-sm);
    padding: 14px 16px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre;
    margin: 8px 0 18px;
}

.vp-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--wv2-text);
    margin: 0 0 6px;
}

.vp-steps {
    margin: 0 0 18px;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--wv2-text);
}

code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    background: var(--wv2-bg);
    border: 1px solid var(--wv2-border);
    border-radius: 6px;
    padding: 1px 6px;
}

.vp-code code { background: none; border: none; padding: 0; color: inherit; }

/* ---------- Sign-in pages (web-v2 auth shell, single column) ---------- */
.vp-auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: var(--wv2-bg);
}

.vp-auth-page .wv2-auth-shell { margin: 0 auto; min-height: 520px; }
.vp-auth-page .wv2-auth-visual-side { flex: 0 1 360px; padding: 38px 40px; }
.vp-auth-page .wv2-auth-form-side { flex: 1 1 auto; padding: 38px 46px; }
.vp-auth-page .wv2-auth-form-inner { max-width: 420px; }
.vp-auth-page .wv2-auth-title { font-size: 24px; margin-bottom: 5px; }
.vp-auth-page .wv2-auth-sub { font-size: 13px; margin-bottom: 22px; }
.vp-auth-page .wv2-input { height: 42px; font-size: 13px; padding: 0 14px; }
.vp-auth-page .wv2-input-icon-wrap .wv2-input { padding-left: 40px; }
.vp-auth-page .wv2-btn-block { padding: 11px 22px; font-size: 14px; }
.vp-auth-page .wv2-visual-graphic-img { max-width: 280px; }

@media (max-width: 900px) {
    .vp-auth-page .wv2-auth-visual-side { display: none; }
    .vp-auth-page .wv2-auth-form-side { padding: 28px 20px; }
}

.dash-btn-outline.vp-danger-btn { color: #B42318; border-color: #FDA29B; }
.dash-btn-outline.vp-danger-btn:hover { background: #FEF3F2; }

/* ---------- Layout fixes for vendor pages ---------- */
/* dash.css makes outline buttons stretch (flex: 1 1 0) for its button rows; in a page head or the
   pagination row they should stay their natural size. */
.dash-page-head > .dash-btn-outline,
.dash-page-head > .dash-btn,
.vp-pagination .dash-btn-outline { flex: 0 0 auto; }

/* Let grid columns shrink so wide tables scroll inside their panel instead of overflowing it. */
.dash-row > * { min-width: 0; }
.dash-report-table-wrap { overflow-x: auto; }

/* Sidebar company name: wrap to two lines rather than cutting off. */
.dash-profile-card .dash-profile-name {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
}

/* Tables in narrow panels (API guide): scroll if needed, no report-page minimum width. */
.vp-table-scroll { overflow-x: auto; }
.vp-table-scroll .dash-table { min-width: 0; }
.vp-table-scroll .dash-table td { white-space: normal; }

/* ---- Public pages (API guide and application form, no sign-in) ---- */
.vp-public { background: #f6f8fa; min-height: 100vh; }
.vp-public-top {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 14px 32px; background: #fff; border-bottom: 1px solid #e8ecf0; position: sticky; top: 0; z-index: 10;
}
.vp-public-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #1a2b3c; font-weight: 600; }
.vp-public-brand img { height: 28px; }
.vp-public-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.vp-public-nav > a:not(.dash-btn) { color: #44546a; text-decoration: none; font-weight: 500; }
.vp-public-nav > a:not(.dash-btn):hover { color: #1f9d55; }
.vp-public-main { max-width: 1080px; margin: 0 auto; padding: 32px 24px 48px; }
.vp-public-foot { text-align: center; color: #8a96a3; font-size: 13px; padding: 24px 16px 32px; }
@media (max-width: 640px) {
    .vp-public-top { padding: 12px 16px; }
    .vp-public-main { padding: 20px 16px 40px; }
}

/* ---- Application form and status ---- */
.vp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.vp-form-grid .vp-span-2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .vp-form-grid { grid-template-columns: 1fr; } }
.vp-form-section { font-weight: 700; color: #1a2b3c; margin: 22px 0 12px; font-size: 15px; }
.vp-form-section:first-of-type { margin-top: 0; }
.vp-file-note { font-size: 12.5px; color: #6b7a8a; margin-top: 4px; }
.vp-app-status { display: flex; gap: 16px; align-items: flex-start; }
.vp-app-status-icon { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.vp-app-status-icon.is-pending { background: #fff4dd; color: #b7791f; }
.vp-app-status-icon.is-rejected { background: #fde8e8; color: #c53030; }
.vp-app-status h2 { margin: 0 0 6px; font-size: 20px; color: #1a2b3c; }
.vp-app-status p { margin: 0 0 10px; color: #44546a; }
.vp-reason { background: #fff7f7; border: 1px solid #f5c2c2; border-radius: 8px; padding: 12px 14px; color: #8a1f1f; margin: 10px 0 14px; }
.vp-checklist { list-style: none; padding: 0; margin: 0; }
.vp-checklist li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eef1f4; color: #44546a; }
.vp-checklist li:last-child { border-bottom: 0; }
.vp-checklist .is-done { color: #1f9d55; }
.vp-checklist .is-todo { color: #b7791f; }

/* ---- Landing page (Home/Index, _LandingLayout) - builds on web-v2.css ---- */
.vp-landing-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.vp-landing-logo img { height: 30px; }
.vp-landing-logo span { color: var(--wv2-text); font-weight: 700; font-size: 15px; white-space: nowrap; }
@media (max-width: 992px) {
    .wv2-nav.is-open {
        display: flex; position: absolute; top: 64px; left: 0; right: 0; z-index: 30;
        flex-direction: column; gap: 14px; padding: 16px 24px;
        background: #fff; box-shadow: 0 8px 20px rgba(16, 24, 40, 0.08);
    }
    .wv2-header-inner { position: relative; }
}
@media (max-width: 480px) { .vp-landing .wv2-header-actions .wv2-link-muted { display: none; } }

.vp-landing-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 26px 0 0; }
.vp-landing-facts li { color: var(--wv2-text-muted); font-size: 14px; }
.vp-landing-facts strong { display: block; font-size: 24px; line-height: 1.1; color: var(--wv2-text); }

/* Code sample card in the hero */
.vp-code-card {
    background: #0E1B14; border-radius: 16px; overflow: hidden; min-width: 0;
    box-shadow: 0 24px 48px rgba(11, 46, 28, 0.18); border: 1px solid #1d3326;
}
@media (max-width: 992px) {
    /* Hero stacks and centres here; keep the card to the column width (its code scrolls). */
    .vp-code-card { align-self: stretch; width: 100%; margin-top: 30px; text-align: left; }
    .vp-landing-facts { justify-content: center; }
}
.vp-code-card-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #13251B; border-bottom: 1px solid #1d3326; }
.vp-code-card-bar span { width: 10px; height: 10px; border-radius: 50%; background: #2d4a39; }
.vp-code-card-bar em { margin-left: 10px; color: #8fb39d; font-style: normal; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.vp-code-card-body {
    margin: 0; padding: 18px 20px; color: #d6e6dc; font-size: 12.5px; line-height: 1.65;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; overflow-x: auto;
}
.vp-code-card-body .c-k { color: #7ee2a8; }
.vp-code-card-body .c-s { color: #f2c97d; }
.vp-code-card-body .c-p { color: #9cc9ff; }
.vp-code-card-body .c-n { color: #f29e7d; }
.vp-code-card-body .c-m { color: #6f8f7c; }
.vp-code-card-body .c-ok { color: #49d47f; font-weight: 700; }

.vp-landing-services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .vp-landing-services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .vp-landing-services { grid-template-columns: 1fr; } }

.vp-landing-alt { background: var(--wv2-bg); }

.vp-landing-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: none; }
.vp-landing-steps li { background: var(--wv2-surface); border: 1px solid var(--wv2-border); border-radius: 16px; padding: 22px; }
.vp-landing-steps h6 { margin: 14px 0 6px; font-size: 16px; font-weight: 700; color: var(--wv2-text); }
.vp-landing-steps p { margin: 0; color: var(--wv2-text-muted); font-size: 14px; line-height: 1.55; }
.vp-landing-step-no {
    display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--wv2-accent-soft); color: var(--wv2-accent-dark); font-weight: 800;
}
@media (max-width: 900px) { .vp-landing-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .vp-landing-steps { grid-template-columns: 1fr; } }

.vp-landing-dev { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .vp-landing-dev { grid-template-columns: 1fr; } }
.vp-landing-lead { color: var(--wv2-text-muted); font-size: 16px; margin: 8px 0 18px; }
.vp-landing-checks { list-style: none; padding: 0; margin: 0 0 22px; }
.vp-landing-checks li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; color: var(--wv2-text); font-size: 15px; }
.vp-landing-checks i { color: var(--wv2-accent); flex: none; width: 16px; text-align: center; }
.vp-landing-checks code { background: var(--wv2-accent-soft); color: var(--wv2-accent-dark); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.vp-landing-panel { background: var(--wv2-surface); border: 1px solid var(--wv2-border); border-radius: 16px; padding: 24px; }
.vp-landing-panel h6 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--wv2-text); }
.vp-landing-panel .vp-landing-checks { margin: 0; }

.vp-landing-faq { max-width: 820px; }
.vp-landing-faq .wv2-section-title { margin-bottom: 18px; }
.vp-landing-faq details { background: var(--wv2-surface); border: 1px solid var(--wv2-border); border-radius: 12px; padding: 16px 20px; margin-bottom: 10px; }
.vp-landing-faq summary { cursor: pointer; font-weight: 600; color: var(--wv2-text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.vp-landing-faq summary::-webkit-details-marker { display: none; }
.vp-landing-faq summary::after { content: "+"; color: var(--wv2-accent); font-weight: 700; font-size: 18px; line-height: 1; }
.vp-landing-faq details[open] summary::after { content: "\2212"; }
.vp-landing-faq details p { margin: 10px 0 0; color: var(--wv2-text-muted); line-height: 1.6; }

/* ---- API guide (Docs/Index): contents rail + one panel per topic ---- */
.vp-docs { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.vp-docs-toc { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; max-height: calc(100vh - 110px); overflow-y: auto; }
.vp-docs-toc p, .vp-docs-toc span { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wv2-text-muted); }
.vp-docs-toc span { margin-top: 10px; }
.vp-docs-toc a { color: var(--wv2-text); text-decoration: none; padding: 5px 10px; border-left: 2px solid transparent; border-radius: 0 6px 6px 0; }
.vp-docs-toc a.is-sub { padding-left: 18px; color: var(--wv2-text-muted); }
.vp-docs-toc a:hover, .vp-docs-toc a.is-current { color: var(--wv2-accent-dark); background: var(--wv2-accent-soft); border-left-color: var(--wv2-accent); }
.vp-docs-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.vp-doc { scroll-margin-top: 90px; }
.vp-doc h2 { margin: 0 0 12px; font-size: 19px; font-weight: 700; color: var(--wv2-text); }
.vp-doc p { color: #44546a; font-size: 14px; line-height: 1.65; margin: 0 0 12px; }
.vp-doc .vp-steps, .vp-doc .vp-bullets { font-size: 14px; color: #44546a; line-height: 1.7; }
.vp-bullets { margin: 0 0 14px; padding-left: 20px; }
.vp-bullets li { margin-bottom: 4px; }
.vp-docs-group { margin: 8px 0 -4px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--wv2-text-muted); }
.vp-doc-sub { margin-top: 18px !important; font-weight: 600; color: var(--wv2-text) !important; }
.vp-doc-table td, .vp-doc-table th { font-size: 13px; vertical-align: top; }
.vp-doc-fields { margin-bottom: 16px; }
.vp-doc-fields td:first-child { white-space: nowrap; }
.vp-kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.vp-kv th { text-align: left; white-space: nowrap; width: 150px; padding: 9px 12px 9px 0; color: var(--wv2-text); font-weight: 600; vertical-align: top; border-top: 1px solid #eef1f4; }
.vp-kv td { padding: 9px 0; color: #44546a; border-top: 1px solid #eef1f4; }
.vp-endpoint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.vp-endpoint code { font-size: 15px; font-weight: 600; background: none; border: 0; padding: 0; color: var(--wv2-text); }
.vp-verb { font-size: 11px; font-weight: 800; letter-spacing: .05em; padding: 4px 9px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.vp-verb.is-get { background: #e6f0ff; color: #1d4ed8; }
.vp-verb.is-post { background: var(--wv2-accent-soft); color: var(--wv2-accent-dark); }
.vp-code-out { background: #F6F8F7; color: #1f2d27; border: 1px solid var(--wv2-border); }
.vp-pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.vp-pill.is-ok { background: #e3f6ea; color: #1f7a45; }
.vp-pill.is-wait { background: #fff4dc; color: #8a5a00; }
.vp-pill.is-bad { background: #fde8e8; color: #b42318; }
.vp-callout { display: flex; gap: 12px; align-items: flex-start; background: var(--wv2-accent-soft); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; color: #24443a; line-height: 1.6; margin-top: 6px; }
.vp-callout i { color: var(--wv2-accent); margin-top: 3px; }
@media (max-width: 992px) {
    .vp-docs { grid-template-columns: 1fr; }
    .vp-docs-toc { display: none; }
}
