/* Public site — Public/embroidery-calculator.php. Shared styles: assets/css/site.css */

.pc { --c-fabric:#8a3ffc; --c-labor:var(--color-primary); --c-thread:#009d9a; --c-finishing:#ee538b; --c-overhead:#b28600; --c-profit:var(--color-success); }
.pc [hidden] { display: none !important; }
.pc-hero { text-align: center; max-width: 720px; margin: 8px auto 26px; }
.pc-hero .page-title { margin-inline: auto; line-height: 1.25; }
.pc-hero .page-subtitle { margin-inline: auto; }

.pc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.pc-main { display: grid; gap: 18px; min-width: 0; }
.pc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: 0 8px 24px rgba(23, 23, 23, 0.04); }
.pc-card h2 { font-size: 1.05rem; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }
.step-no { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-grid; place-items: center; font-size: .8rem; font-weight: 700; flex: none; }
.pc-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; }

.pc-field { display: grid; gap: 6px; align-content: start; }
.pc-field label { font-size: .86rem; font-weight: 600; }
.pc-field small { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.pc-input { position: relative; }
.pc-input input {
    width: 100%; border: 1px solid var(--input-line); border-radius: 12px; background: #fff;
    padding: 11px 14px; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.pc-input input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pc-input input:disabled { background: var(--paper); color: var(--muted); }
.pc-unit { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 12px; color: var(--muted); font-size: .78rem; pointer-events: none; white-space: nowrap; }

.pc-switch { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; padding: 10px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.pc-switch input { position: absolute; opacity: 0; pointer-events: none; }
.pc-switch .track { width: 36px; height: 20px; border-radius: 999px; background: #c6ccd5; position: relative; transition: background .15s; flex: none; }
.pc-switch .track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.pc-switch input:checked + .track { background: var(--accent); }
.pc-switch input:checked + .track::after { inset-inline-start: 18px; }
.pc-switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.pc-switch b { display: block; font-size: .88rem; }
.pc-switch small { color: var(--muted); font-size: .76rem; }

.pc-settings { padding: 0; }
.pc-settings > summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.pc-settings > summary::-webkit-details-marker { display: none; }
.pc-settings > summary .mini { font-weight: 500; color: var(--muted); font-size: .82rem; }
.pc-settings > summary > .fa-gear { color: var(--muted); }
.pc-settings > summary .chev { margin-inline-start: auto; color: var(--muted); transition: transform .2s; }
.pc-settings[open] > summary .chev { transform: rotate(180deg); }
.pc-settings-body { padding: 16px 22px 20px; border-top: 1px solid var(--line); }
.pc-settings-body > p { margin: 0 0 14px; color: var(--muted); font-size: .86rem; }
.pc-tiers { grid-column: 1 / -1; display: grid; gap: 8px; }
.pc-tiers > b { font-size: .86rem; }
.pc-tier { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .9rem; }
.pc-tier .pc-input { width: 130px; }
.pc-link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; margin-top: 14px; }

.pc-summary { position: sticky; top: 90px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 14px; box-shadow: 0 12px 32px rgba(23, 23, 23, 0.07); }
.pc-empty { text-align: center; color: var(--muted); padding: 22px 6px; font-size: .92rem; }
.pc-empty i { display: block; font-size: 1.9rem; margin-bottom: 10px; color: #c6ccd5; }
.pc-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.pc-price { text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pc-price strong { display: block; font-size: 2.2rem; line-height: 1.2; color: var(--accent); margin: 2px 0; }
.pc-note { font-size: .8rem; color: var(--muted); }
.num { unicode-bidi: isolate; direction: ltr; display: inline-block; }
.pc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.pc-stats > div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.pc-stats dt { font-size: .76rem; color: var(--muted); }
.pc-stats dd { margin: 2px 0 0; font-weight: 700; }
.pc-stats dd small { font-weight: 500; color: var(--muted); font-size: .76rem; }
.pos { color: var(--color-success); } .neg { color: var(--color-danger); }
.pc-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: #eef1f5; margin-top: 6px; }
.pc-bar span { height: 100%; transition: width .25s; }
.pc-legend { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; font-size: .82rem; }
.pc-legend li { display: flex; align-items: center; gap: 8px; }
.pc-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.pc-legend b { margin-inline-start: auto; font-weight: 600; }
.pc-alert { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: .84rem; line-height: 1.45; background: var(--error-bg); color: var(--error-ink); border: 1px solid var(--error-line); }
/* blocks under the price */
.pc-result > .pc-alert, .pc-result > .pc-stats, .pc-result > .pc-details { margin-top: 12px; }
.pc-result > .pc-breakdown { margin-top: 14px; }
.pc-details summary { cursor: pointer; font-size: .84rem; color: var(--accent); font-weight: 600; }
.pc-details table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .82rem; }
.pc-details td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pc-details td:last-child { text-align: end; }
.pc-details tr.total td { font-weight: 700; border-bottom: 0; }
.pc-actions { display: grid; gap: 8px; }
.pc-privacy { font-size: .76rem; color: var(--muted); text-align: center; margin: 0; }
.pc-privacy i { color: var(--color-success); }

.btn-solid, .btn-ghost { padding: 11px 18px; font-size: .92rem; } /* base: site.css */
.btn-solid:hover:not(:disabled) { background: var(--color-primary-hover); }
.btn-ghost:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-solid:disabled, .btn-ghost:disabled { opacity: .45; cursor: not-allowed; }

.pc-cta { margin-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)); color: #fff; border-radius: var(--radius-xl); padding: 26px 28px; }
.pc-cta h2 { margin: 0 0 4px; font-size: 1.25rem; }
.pc-cta p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.pc-cta .btn-solid { background: #fff; color: var(--color-primary-hover); }
.pc-cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.pc-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.quote-print { display: none; }
@media (max-width: 1060px) { .pc-grid { grid-template-columns: 1fr; } .pc-summary { position: static; } }
@media print {
    body * { visibility: hidden !important; }
    #quotePrint, #quotePrint * { visibility: visible !important; }
    #quotePrint { display: block !important; position: absolute; top: 0; left: 0; right: 0; padding: 32px; font-size: 14px; color: #000; }
    .q-head { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--color-primary); padding-bottom: 12px; margin-bottom: 24px; }
    .q-company { font-size: 22px; font-weight: 700; }
    .q-title { font-size: 16px; color: #444; }
    .q-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
    .q-table td { padding: 10px 8px; border-bottom: 1px solid #ddd; }
    .q-table td:last-child { text-align: end; font-weight: 600; }
    .q-table tr.q-total td { font-size: 18px; font-weight: 700; border-top: 2px solid #000; border-bottom: 0; }
    .q-note { color: #555; font-size: 12px; }
}
