/* Chaprika – catalog & brochure order form. Loaded after jozve.css; only what this form adds. */

/* Step 1: brochure or catalog. */
.chpc-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.chpc .chpc-mode { align-items: stretch; text-align: right; gap: 8px; padding: 14px; min-height: 0; }
.chpc-mode-sub { font-size: 12.5px; line-height: 1.7; color: var(--chpj-muted); font-weight: 500; }
.chpc-mode-art { position: relative; display: block; height: 70px; margin-bottom: 4px; }
.chpc-mode-art span { position: absolute; top: 8px; bottom: 8px; width: 30%; border-radius: 4px; background: #fff; border: 1.5px solid #9FD7EE; }
.chpc-mode-art--brochure span:nth-child(1) { right: 20%; background: #E6F6FC; }
.chpc-mode-art--brochure span:nth-child(2) { right: 50%; }
.chpc-mode-art--brochure span:nth-child(3) { display: none; }
.chpc-mode-art--catalog span { width: 34%; right: 33%; }
.chpc-mode-art--catalog span:nth-child(1) { transform: translate(-10px, 4px); background: #F1F7FA; }
.chpc-mode-art--catalog span:nth-child(2) { transform: translate(-5px, 2px); }
.chpc-mode-art--catalog span:nth-child(3) { background: linear-gradient(135deg, #29ABE2, #A8CF45); border-color: #29ABE2; }
.chpc.has-mode .chpc-mode[aria-pressed="false"] { opacity: .75; }

.chpc .chpj-opt[disabled], .chpc .chpj-tile.is-off { opacity: .4; cursor: not-allowed; }
.chpc-sub { margin-right: 12px; padding-right: 12px; border-right: 2px solid #E3EEF3; }
.chpc-sub[hidden] { display: none; }
.chpc-h { margin-top: 14px; }
.chpc .chpc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chpc-tile-limit { font-size: 11.5px; color: var(--chpj-muted); }

.chpc-note { margin: 10px 4px 0; font-size: 12.5px; line-height: 1.8; color: #3E5260; background: #EEF8FC; border-radius: 10px; padding: 7px 12px; }
.chpc-note--plain { background: transparent; padding: 0 4px; color: var(--chpj-muted); }
.chpc-note[hidden], .chpc-tip[hidden] { display: none; }
.chpc-tip { margin: 10px 0 0; padding: 8px 12px; border-radius: 10px; background: #FFF4E0; border: 1px solid #F5C77A; color: #7A4B00; font-size: 12.5px; line-height: 1.8; }
.chpc-pages { margin: 8px 4px 0; font-size: 13px; color: #0B5C7E; font-weight: 600; }
.chpc-pages:empty { display: none; }
.chpc-pages.is-error { color: var(--chpj-warn, #B3261E); }
.chpc-unit { margin: -4px 0 10px; text-align: left; font-size: 12.5px; color: var(--chpj-muted); }
.chpc-unit:empty { display: none; }
.chpc .chpj-bar-sum { white-space: normal; overflow: visible; line-height: 1.5; }

/* Preview. */
.chpc-stage { display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 12px 0; }
.chpc-empty { color: var(--chpj-muted); font-size: 13px; }
.chpc-sheet { display: flex; flex-direction: row-reverse; background: #fff; border-radius: 3px; box-shadow: 0 10px 26px rgba(15, 30, 42, .16), 0 0 0 1px rgba(15, 30, 42, .06); overflow: hidden; }
.chpc-panel { flex: 1 1 0; display: flex; flex-direction: column; gap: 6px; padding: 14px 10px; border-left: 1px dashed #9FB3BF; }
.chpc-panel:last-child { border-left: none; }
.chpc-panel i { display: block; height: 7px; border-radius: 4px; background: #D9E3E9; }
.chpc-panel i:first-child { height: 34%; background: linear-gradient(135deg, #29ABE2, #A8CF45); opacity: .85; }
.chpc-panel:nth-child(2n) i:first-child { background: linear-gradient(135deg, #A8CF45, #29ABE2); }
.chpc-sheet.is-cello { box-shadow: 0 10px 26px rgba(15, 30, 42, .16), 0 0 0 1px rgba(15, 30, 42, .06), inset 0 0 0 999px rgba(255, 255, 255, .08); background-image: linear-gradient(118deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 60%); }

.chpc-book { position: relative; border-radius: 3px 6px 6px 3px; box-shadow: 0 12px 28px rgba(15, 30, 42, .2); background: linear-gradient(135deg, #29ABE2, #0089BF 60%, #A8CF45); }
.chpc-book.is-plain { background: #fff; box-shadow: 0 10px 26px rgba(15, 30, 42, .16), 0 0 0 1px rgba(15, 30, 42, .08); }
.chpc-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; }
.chpc-cover b { font-size: 20px; }
.chpc-cover em { font-style: normal; font-size: 12px; opacity: .85; }
.chpc-book.is-plain .chpc-cover { color: #0B5C7E; }
.chpc-bind { position: absolute; top: 0; bottom: 0; right: 0; width: 8px; }
.chpc-book--glue .chpc-bind { right: -7px; width: 7px; border-radius: 0 3px 3px 0; background: #006E99; }
.chpc-book--saddle .chpc-bind { background: linear-gradient(#0000 28%, #8A99A3 28%, #8A99A3 32%, #0000 32%, #0000 68%, #8A99A3 68%, #8A99A3 72%, #0000 72%); width: 3px; right: 5px; }
.chpc-book--wire .chpc-bind { right: -5px; width: 12px; background: repeating-linear-gradient(#3A4750 0 3px, #0000 3px 10px); border-radius: 2px; }

@media (max-width: 559px) {
	.chpc-modes { grid-template-columns: 1fr 1fr; gap: 8px; }
	.chpc .chpc-tiles { grid-template-columns: 1fr; }
	.chpc .chpj-group[data-group="cSize"] .chpj-seg, .chpc .chpj-group[data-group="fold"] .chpj-seg { flex-wrap: wrap; }
}

/* «تعداد صفحات جلد»: label above, three wide buttons below. */
.chpc .chpj-group[data-group="cover"] .chpj-group-row { flex-direction: column; align-items: stretch; gap: 8px; }
.chpc .chpj-group[data-group="cover"] .chpj-group-label { width: auto; flex-basis: auto; }
.chpc .chpj-group[data-group="cover"] .chpj-hint { margin-right: 0; }
.chpc .chpj-group[data-group="cover"] + .chpj-steppers { margin-top: 12px; }
.chpc .chpj-group[data-group="cover"] .chpj-opt { flex-direction: column !important; align-items: center; justify-content: center; gap: 2px !important; text-align: center; padding: 8px 6px; }
.chpc .chpj-group[data-group="cover"] .chpj-opt-sub { white-space: normal; line-height: 1.5; }
