/* Scoped styles: no changes to other WordPress screens or the public theme. */
.pcof {
    --pcof-ink: #142b36;
    --pcof-muted: #61737e;
    --pcof-line: #dce5e9;
    --pcof-bg: #f3f6f8;
    --pcof-teal: #08786f;
    --pcof-teal-dark: #075b55;
    --pcof-mint: #e9f5f1;
    --pcof-error: #a52b28;
    max-width: 1700px;
    margin: 26px 24px 36px 4px;
    color: var(--pcof-ink);
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.pcof *, .pcof *::before, .pcof *::after { box-sizing: border-box; }
.pcof [hidden] { display: none !important; }
.pcof h1, .pcof h2, .pcof h3, .pcof p { padding: 0; margin: 0; }
.pcof h1 { font-size: 32px; font-weight: 750; line-height: 1.25; letter-spacing: -.9px; color: var(--pcof-ink); }
.pcof h2 { font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--pcof-ink); }
.pcof button, .pcof input, .pcof select, .pcof textarea { font: inherit; }
.pcof button { cursor: pointer; }
.pcof button:disabled { cursor: not-allowed; opacity: .46; }
.pcof button:focus-visible, .pcof summary:focus-visible { outline: 3px solid #60aaa3; outline-offset: 3px; }
.pcof input, .pcof select, .pcof textarea {
    display: block; width: 100%; max-width: none; margin: 0; min-height: 40px;
    border: 1px solid #cbd7dd; border-radius: 7px; background: #fff; color: var(--pcof-ink);
    padding: 8px 10px; box-shadow: none; line-height: 1.4;
}
.pcof input:focus, .pcof select:focus, .pcof textarea:focus { outline: none; border-color: var(--pcof-teal); box-shadow: 0 0 0 3px #08786f16; }
.pcof input::placeholder, .pcof textarea::placeholder { color: #7a8992; opacity: 1; }
.pcof select { padding-right: 26px; }
.pcof input[aria-invalid="true"] { border-color: #bd4d45; }
.pcof-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 0 22px; }
.pcof-header p { margin-top: 7px; color: var(--pcof-muted); font-size: 14px; }
.pcof-eyebrow { display: block; margin-bottom: 6px; color: var(--pcof-teal); font-size: 10px; font-weight: 750; letter-spacing: 1.65px; }
.pcof-header-tools { display: flex; align-items: center; gap: 15px; }
.pcof-private { font-size: 12px; color: var(--pcof-muted); white-space: nowrap; }
.pcof-private span { font-size: 10px; color: var(--pcof-teal); margin-right: 4px; }
.pcof-btn {
    display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 38px;
    border: 1px solid #c9d6dc; border-radius: 7px; padding: 8px 13px; background: #fff;
    color: var(--pcof-ink); text-decoration: none; font-size: 13px !important; font-weight: 600 !important;
    transition: background .14s, border-color .14s;
}
.pcof-btn:hover:not(:disabled) { background: #f2f7f8; border-color: #91a8b2; }
.pcof-btn-primary { border-color: var(--pcof-teal); background: var(--pcof-teal); color: #fff; }
.pcof-btn-primary:hover:not(:disabled) { background: var(--pcof-teal-dark); border-color: var(--pcof-teal-dark); }
.pcof-btn-quiet { background: transparent; border-color: transparent; color: var(--pcof-muted); white-space: nowrap; }
.pcof-full { width: 100%; }
.pcof-tabs { display: flex; gap: 8px; border-bottom: 1px solid #d2dde2; padding: 0; margin-bottom: 23px; }
.pcof-tab { border: 0; border-bottom: 3px solid transparent; color: var(--pcof-muted); background: transparent; font-weight: 650 !important; padding: 13px 18px; margin-bottom: -1px; }
.pcof-tab.is-active { border-color: var(--pcof-teal); color: var(--pcof-teal); }
.pcof-count { display: inline-block; padding: 1px 7px; border-radius: 20px; background: #e5ecef; margin-left: 5px; font-size: 11px; }
.pcof-card { min-width: 0; background: #fff; border: 1px solid var(--pcof-line); border-radius: 12px; box-shadow: 0 3px 12px #172d3c04; }
.pcof-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 22px; }
.pcof-card-heading p { margin-top: 3px; font-size: 12px; color: var(--pcof-muted); }
.pcof-calculator-grid { display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 22px; align-items: start; }
.pcof-summary { display: flex; flex-direction: column; gap: 18px; }
.pcof-row-head, .pcof-row { display: grid; grid-template-columns: minmax(200px, 1fr) 48px 93px 110px 101px 26px; gap: 12px; align-items: center; padding: 15px 18px; }
.pcof-row-head { color: var(--pcof-muted); background: #f6f9fa; font-size: 10px; font-weight: 650; line-height: 1.5; padding-top: 10px; padding-bottom: 10px; border-top: 1px solid var(--pcof-line); }
.pcof-row-head > :nth-child(3), .pcof-row-head > :nth-child(5) { text-align: right; }
.pcof-row { border-top: 1px solid #e8eef1; align-items: center; position: relative; }
.pcof-row:hover { background: #fcfdfd; }
.pcof-row.has-error { background: #fff9f7; }
.pcof-row-category { min-height: 22px !important; width: auto !important; max-width: 100% !important; border: 0 !important; border-radius: 3px !important; padding: 0 24px 0 0 !important; font-size: 11px !important; font-weight: 650 !important; color: #53707d !important; background-color: transparent !important; margin-bottom: 5px !important; }
.pcof-row .pcof-quantity { text-align: center; padding-right: 3px; padding-left: 3px; }
.pcof-base, .pcof-row-total { font-variant-numeric: tabular-nums; white-space: nowrap; display: block; text-align: right; font-size: 12px; }
.pcof-base { color: var(--pcof-muted); }
.pcof-row-total { font-weight: 750; font-size: 13px; }
.pcof-row-source { display: block; min-height: 15px; margin-top: 4px; font-size: 10px; color: var(--pcof-muted); }
.pcof-row.has-override .pcof-row-source { color: #996111; }
.pcof-override-wrap { position: relative; }
.pcof-row .pcof-override { font-size: 12px; padding-right: 21px; }
.pcof-row.has-override .pcof-override { background: #fff9ed; border-color: #deba79; }
.pcof-reset-price { position: absolute; right: 3px; top: 8px; padding: 0; height: 24px; width: 19px; border: 0; color: #966216; background: transparent; font-size: 17px !important; }
.pcof-remove { border: 0; background: transparent; color: #88989f; font-size: 23px !important; height: 34px; width: 26px; padding: 0; }
.pcof-remove:hover { color: var(--pcof-error); background: #fff0ec; border-radius: 5px; }
.pcof-combobox { position: relative; }
.pcof-search-wrap { position: relative; }
.pcof-model { padding-right: 30px !important; font-size: 13px !important; }
.pcof-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 28px; border: 0; background: transparent; color: var(--pcof-muted); border-radius: 5px; padding: 0; }
.pcof-toggle:hover { background: #eef4f5; }
.pcof-suggestions { position: absolute; z-index: 100; left: 0; right: 0; top: calc(100% + 5px); min-width: 260px; max-height: 270px; overflow-y: auto; border: 1px solid #b8cdd1; border-radius: 8px; background: #fff; box-shadow: 0 12px 30px #142b3625; padding: 5px; }
.pcof-search-option { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 8px; cursor: pointer; font-size: 12px; border-radius: 4px; }
.pcof-search-option:hover, .pcof-search-option.is-highlighted { background: var(--pcof-mint); }
.pcof-search-option span { overflow-wrap: anywhere; }
.pcof-search-option strong { font-size: 11px; white-space: nowrap; color: var(--pcof-teal); }
.pcof-search-empty { font-size: 12px; color: var(--pcof-muted); padding: 10px; }
.pcof-row-footer { padding: 18px 20px; border-top: 1px solid var(--pcof-line); }
.pcof-row-footer p { font-size: 11px; color: var(--pcof-muted); margin-top: 10px; max-width: 540px; }
.pcof-totals { padding: 24px; }
.pcof-totals > .pcof-eyebrow { color: #5b707c; font-size: 9px; letter-spacing: 1.15px; }
.pcof-retail { display: block; font-size: 32px; line-height: 1.35; letter-spacing: -.8px; font-weight: 760; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pcof-muted { color: var(--pcof-muted); font-size: 12px; }
.pcof-percent-field { margin-top: 21px; border-top: 1px solid var(--pcof-line); padding-top: 19px; }
.pcof-percent-field label { font-weight: 650; font-size: 13px; }
.pcof-percent-wrap { position: relative; margin-top: 8px; }
.pcof-percent-wrap input { font-size: 24px; font-weight: 700; padding: 9px 36px 9px 13px; }
.pcof-percent-wrap span { position: absolute; top: 14px; right: 14px; color: var(--pcof-muted); font-size: 18px; }
.pcof-percent-field p { margin-top: 6px; font-size: 11px; color: var(--pcof-muted); }
.pcof-offer-box { margin: 20px -4px 15px; background: var(--pcof-ink); color: #fff; border-radius: 10px; padding: 20px 18px; }
.pcof-offer-box span { font-size: 9px; font-weight: 650; letter-spacing: 1px; color: #b9e1da; }
.pcof-offer-box output { display: block; margin-top: 4px; color: #fff; font-size: 36px; font-weight: 750; letter-spacing: -1px; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pcof-difference { display: flex; justify-content: space-between; align-items: start; gap: 10px; font-size: 12px; }
.pcof-difference output { white-space: nowrap; font-weight: 750; color: var(--pcof-teal); }
.pcof-math-note { margin-top: 13px !important; color: var(--pcof-muted); font-size: 10px; line-height: 1.65; }
.pcof-message-card { padding: 20px; }
.pcof-message-card .pcof-card-heading { padding: 0 0 13px; }
.pcof-message-card h2 { font-size: 15px; }
.pcof-message-card textarea { min-height: 174px; background: #f7fafb; font-size: 12px; line-height: 1.7; resize: vertical; margin-bottom: 12px; }
.pcof-message-card p { margin-top: 8px; font-size: 10px; }
.pcof-validation, .pcof-inline-error { color: var(--pcof-error); background: #fff1ee; border: 1px solid #f2d7cf; padding: 10px 12px; border-radius: 7px; font-size: 12px; margin-top: 14px; }
.pcof-validation p + p { margin-top: 7px; }
.pcof-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; border: 1px solid #b7d9d1; border-radius: 10px; background: #edf8f3; padding: 18px 20px; }
.pcof-banner p { font-size: 12px; color: #4d6e65; margin-top: 4px; }
.pcof-banner .pcof-btn { flex-shrink: 0; }
.pcof-toast { position: sticky; top: 42px; z-index: 110; border: 1px solid #bedacc; border-left: 4px solid var(--pcof-teal); border-radius: 6px; padding: 12px 16px; background: #effaf4; color: #175941; margin-bottom: 14px; box-shadow: 0 4px 16px #142b3610; }
.pcof-toast.is-error { background: #fff3ef; border-color: #edbeb2; border-left-color: #b2402d; color: #922a20; }
.pcof-loading { padding: 60px 20px; color: var(--pcof-muted); text-align: center; border: 1px dashed #bccdd5; border-radius: 12px; }
.pcof-footnote { font-size: 11px; color: var(--pcof-muted); margin-top: 18px !important; }
.pcof-database-grid { display: grid; grid-template-columns: 315px minmax(0, 1fr); gap: 22px; align-items: start; }
.pcof-editor-column { min-width: 0; display: grid; gap: 18px; }
.pcof-editor { padding: 23px; }
.pcof-editor > p { margin-top: 7px; }
.pcof-editor form { margin-top: 18px; }
.pcof-editor label, .pcof-categories label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 6px; }
.pcof-editor input, .pcof-editor select { margin-bottom: 16px; }
.pcof-form-help { margin: -7px 0 16px !important; font-size: 11px; color: var(--pcof-muted); }
.pcof-button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pcof-categories { padding: 20px; }
.pcof-categories summary { cursor: pointer; font-weight: 650; font-size: 13px; }
.pcof-categories > p { margin: 12px 0; }
.pcof-category-line { border-top: 1px solid #e7edf0; padding: 10px 0; font-size: 12px; }
.pcof-category-actions { display: flex; gap: 12px; margin-top: 4px; }
.pcof-categories form { border-top: 1px solid var(--pcof-line); margin-top: 8px; padding-top: 13px; }
.pcof-inline-form { display: flex; gap: 7px; }
.pcof-inline-form input { min-width: 0; }
.pcof-filters { padding: 0 22px 18px; display: grid; grid-template-columns: minmax(180px, 1fr) 190px; gap: 12px; }
.pcof-table-scroll { position: relative; overflow-x: auto; max-width: 100%; }
.pcof-table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
.pcof-table thead { background: #f6f9fa; }
.pcof-table th { color: var(--pcof-muted); font-size: 11px; font-weight: 650; border-top: 1px solid var(--pcof-line); }
.pcof-table th, .pcof-table td { padding: 14px 18px; border-bottom: 1px solid #e4ecef; vertical-align: middle; }
.pcof-table tbody tr:hover { background: #fbfdfd; }
.pcof-component-name { font-weight: 650; min-width: 140px; overflow-wrap: anywhere; }
.pcof-category-chip { background: #edf3f5; padding: 4px 7px; font-size: 10px; color: #547080; border-radius: 5px; display: inline-block; }
.pcof-price-cell, .pcof-table th:nth-child(3) { text-align: right; white-space: nowrap; }
.pcof-price-cell { font-weight: 750; font-variant-numeric: tabular-nums; }
.pcof-table-actions { white-space: nowrap; text-align: right; }
.pcof-link { border: 0; background: transparent; padding: 3px 0; font-size: 11px !important; color: var(--pcof-teal); }
.pcof-link:hover { text-decoration: underline; }
.pcof-danger { color: #a54336; }
.pcof-table-actions .pcof-link + .pcof-link { margin-left: 13px; }
.pcof-table-empty { color: var(--pcof-muted); text-align: center; padding: 65px 18px !important; }
.pcof-pagination { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcof-pagination > span { color: var(--pcof-muted); font-size: 11px; }
.pcof-pagination .pcof-btn { min-height: 30px; padding: 5px 9px; font-size: 11px !important; }
.pcof-pagination .pcof-btn + .pcof-btn { margin-left: 5px; }
.pcof-mobile-label { display: none; }
.pcof-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1450px) {
    .pcof-calculator-grid { grid-template-columns: minmax(0, 1fr) 305px; gap: 16px; }
    .pcof-row, .pcof-row-head { grid-template-columns: minmax(140px, 1fr) 42px 78px 95px 88px 22px; padding-left: 14px; padding-right: 14px; gap: 9px; }
    .pcof-row-total { font-size: 12px; }
    .pcof-totals { padding: 21px; }
    .pcof-database-grid { grid-template-columns: 290px minmax(0, 1fr); gap: 16px; }
    .pcof-table td, .pcof-table th { padding-left: 13px; padding-right: 13px; }
}
@media (max-width: 1200px) {
    .pcof-calculator-grid { grid-template-columns: minmax(0, 1fr); }
    .pcof-summary { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
    .pcof-row, .pcof-row-head { grid-template-columns: minmax(200px, 1fr) 50px 110px 120px 110px 25px; }
    .pcof-private { display: none; }
    .pcof-database-grid { grid-template-columns: minmax(0, 1fr); }
    .pcof-editor-column { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 900px) {
    .pcof { margin-right: 12px; }
    .pcof-row, .pcof-row-head { grid-template-columns: minmax(150px, 1fr) 42px 79px 102px 88px 22px; gap: 8px; }
}
@media (max-width: 680px) {
    .pcof { margin: 18px 10px 28px 0; font-size: 13px; }
    .pcof-header { gap: 12px; align-items: start; }
    .pcof-header h1 { font-size: 29px; }
    .pcof-header p { max-width: 185px; font-size: 12px; }
    .pcof-header-tools .pcof-btn { font-size: 11px !important; padding: 7px 9px; }
    .pcof-eyebrow { font-size: 9px; letter-spacing: 1.1px; }
    .pcof-tabs { margin-bottom: 17px; gap: 0; }
    .pcof-tab { padding: 12px 13px; }
    .pcof-row-head { display: none; }
    .pcof-card-heading { padding: 17px 15px; align-items: start; }
    .pcof-card-heading p { max-width: 190px; }
    .pcof-card-heading .pcof-btn { font-size: 11px !important; min-height: 30px; padding: 5px 7px; }
    .pcof-row { grid-template-columns: 45px minmax(62px, 1fr) minmax(95px, 1.1fr) minmax(83px, 1fr); padding: 14px; gap: 10px; }
    .pcof-row-main { grid-column: 1 / -1; padding-right: 30px; }
    .pcof-row-source { min-height: 0; }
    .pcof-mobile-label { display: block; font-size: 9px; color: var(--pcof-muted); margin-bottom: 5px; font-weight: 500; }
    .pcof-base-cell, .pcof-line-total { align-self: stretch; }
    .pcof-base, .pcof-row-total { text-align: left; font-size: 11px; min-height: 40px; display: flex; align-items: center; }
    .pcof-row .pcof-remove { position: absolute; top: 40px; right: 13px; }
    .pcof-suggestions { min-width: 0; }
    .pcof-summary { grid-template-columns: minmax(0, 1fr); }
    .pcof-totals { padding: 22px; }
    .pcof-banner { flex-direction: column; align-items: start; padding: 16px; }
    .pcof-row-footer { padding: 17px 14px; }
    .pcof-editor-column { grid-template-columns: minmax(0, 1fr); }
    .pcof-filters { grid-template-columns: 1fr; padding: 0 15px 15px; }
    .pcof-table { min-width: 550px; }
    .pcof-pagination { padding: 13px; }
    .pcof-toast { top: 50px; }
    /* 16px inputs avoid forced zoom on iPhone without affecting desktop density. */
    .pcof input, .pcof select, .pcof textarea, .pcof-model, .pcof-row .pcof-override { font-size: 16px !important; }
    .pcof .pcof-row-category { font-size: 12px !important; }
}
@media (prefers-reduced-motion: reduce) { .pcof * { scroll-behavior: auto !important; transition: none !important; } }
