/* =====================================================================
   [v1557] Карточка товара: кнопка-календарь «Запланировать» и окно брони
   (catalog/controller/sp/plan_btn.php, sp/sp-plan-btn.js). Макет p23.
   Цвета — фирменные кабинета: фиолетовый #5B3FA0, лаванда #F5F3FD.
   ===================================================================== */
.sp-cta-group.sp-pb-row { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.sp-cta-group.sp-pb-row > #button-cart { flex: 1 1 0; width: auto; min-width: 0; margin: 0; }
.sp-cta-group.sp-pb-row > .alert { flex: 1 1 100%; margin: 0; }
.sp-pb-cal { flex: 0 0 50px; display: inline-flex; align-items: center; justify-content: center; width: 50px; min-height: 46px; padding: 0; border: 0; border-radius: 16px; background: #F0EBFB; color: #5B3FA0; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.sp-pb-cal:hover { background: #E6DEF8; }
.sp-pb-cal:focus-visible { outline: 2px solid #5B3FA0; outline-offset: 2px; }
.sp-pb-cal.is-on { background: #5B3FA0; color: #fff; box-shadow: 0 6px 16px rgba(91, 63, 160, .3); }
.sp-pb-pop { position: absolute; right: 0; top: calc(100% + 12px); z-index: 60; width: 384px; max-width: calc(100vw - 32px); box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: #fff; box-shadow: 0 2px 6px rgba(27, 23, 48, .08), 0 20px 50px rgba(27, 23, 48, .18); text-align: left; font-size: 14px; line-height: 20px; color: #1B1730; }
.sp-pb-pop[hidden] { display: none; }
.sp-pb-pop::before { content: ""; position: absolute; right: 19px; top: -6px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.sp-pb-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-pb-h b { font-size: 16px; line-height: 22px; font-weight: 700; color: #1B1730; }
.sp-pb-x { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: #F5F3FD; color: #6E6A85; cursor: pointer; }
.sp-pb-x:hover { color: #1B1730; }
.sp-pb-lb { margin-bottom: -6px; font-size: 12px; line-height: 16px; font-weight: 600; color: #6E6A85; }
.sp-pb-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sp-pb-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 52px; padding: 0; border: 0; border-radius: 12px; background: #F5F3FD; color: #1B1730; font-family: inherit; cursor: pointer; }
.sp-pb-day small { font-size: 11px; line-height: 13px; color: #6E6A85; }
.sp-pb-day b { font-size: 15px; line-height: 18px; font-weight: 600; }
.sp-pb-day[aria-pressed="true"] { background: #5B3FA0; color: #fff; }
.sp-pb-day[aria-pressed="true"] small { color: #E9E3FA; }
.sp-pb-times { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.sp-pb-time { height: 36px; padding: 0; border: 0; border-radius: 10px; background: #F5F3FD; color: #1B1730; font-family: inherit; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; }
.sp-pb-time[aria-pressed="true"] { background: #5B3FA0; color: #fff; }
.sp-pb-time:disabled { opacity: .4; cursor: default; }
.sp-pb-day:focus-visible, .sp-pb-time:focus-visible, .sp-pb-sb:focus-visible, .sp-pb-sv:focus-visible { outline: 2px solid #5B3FA0; outline-offset: 2px; }
.sp-pb-spin { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 4px 8px; border-radius: 12px; background: #F5F3FD; }
.sp-pb-spin[hidden] { display: none; }
.sp-pb-seg { display: flex; flex-direction: column; align-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.sp-pb-sb { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 24px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #5B3FA0; cursor: pointer; touch-action: none; }
.sp-pb-sb:hover { background: #fff; }
.sp-pb-sb--dn svg { transform: rotate(180deg); }
.sp-pb-sv { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 36px; border-radius: 10px; background: #fff; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: ns-resize; outline: 0; }
.sp-pb-colon { font-size: 20px; font-weight: 700; color: #6E6A85; }
.sp-pb-rep { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 6px 0 12px; border-radius: 12px; background: #F5F3FD; font-size: 13px; color: #4A4766; }
.sp-pb-rep-l { display: inline-flex; align-items: center; gap: 8px; }
.sp-pb-rep-l svg { color: #5B3FA0; }
.sp-pb-rep-r { display: inline-flex; align-items: center; gap: 6px; }
.sp-pb-mode, .sp-pb-runs { height: 32px; border: 0; border-radius: 9px; background: #fff; padding: 0 8px; font-family: inherit; font-size: 13px; font-weight: 600; color: #1B1730; }
.sp-pb-runs { width: 64px; }
.sp-pb-pts { position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 12px; background: #F5F3FD; font-size: 13px; font-weight: 600; color: #1B1730; cursor: pointer; }
.sp-pb-pts small { font-weight: 400; color: #6E6A85; white-space: nowrap; }
.sp-pb-ptsin { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sp-pb-sw { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: #D9D3EC; transition: background .15s; }
.sp-pb-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(27, 23, 48, .25); transition: transform .15s; }
.sp-pb-ptsin:checked + .sp-pb-sw { background: #5B3FA0; }
.sp-pb-ptsin:checked + .sp-pb-sw::after { transform: translateX(16px); }
.sp-pb-ptsin:focus-visible + .sp-pb-sw { outline: 2px solid #5B3FA0; outline-offset: 2px; }
.sp-pb-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid #EEEBF7; }
.sp-pb-sum { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12px; line-height: 15px; color: #6E6A85; }
.sp-pb-sum b { font-size: 18px; line-height: 22px; font-weight: 800; color: #1B1730; font-variant-numeric: tabular-nums; }
.sp-pb-split:empty { display: none; }
.sp-pb-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 16px; border: 0; border-radius: 14px; background: #5B3FA0; color: #fff !important; font-family: inherit; font-size: 13.5px; line-height: 17px; font-weight: 600; text-align: center; text-decoration: none !important; box-shadow: 0 8px 18px rgba(91, 63, 160, .28); cursor: pointer; }
.sp-pb-go:hover { background: #402C77; }
.sp-pb-go:disabled { opacity: .55; box-shadow: none; cursor: default; }
.sp-pb-go svg { flex: none; }
.sp-pb-msg { padding: 10px 12px; border-radius: 12px; background: #F5F3FD; font-size: 13px; line-height: 18px; }
.sp-pb-msg[hidden] { display: none; }
.sp-pb-msg--ok { background: #EAF7F0; color: #14532D; }
.sp-pb-msg--err { background: #FDEBEC; color: #8A1C22; }
.sp-pb-msg--warn { background: #FFF6DD; color: #6B4A00; }
.sp-pb-msg a { font-weight: 600; color: inherit; text-decoration: underline; }
.sp-pb-note, .sp-pb-txt { margin: 0; font-size: 12px; line-height: 16px; color: #6E6A85; }
.sp-pb-txt { font-size: 14px; line-height: 20px; color: #4A4766; }
@media (max-width: 767px) {
	.sp-pb-pop { left: 0; right: 0; width: auto; max-width: none; }
	.sp-pb-pop::before { right: 19px; }
	.sp-pb-f { flex-wrap: wrap; }
	.sp-pb-go { flex: 1 1 100%; }
}
/* тёмная тема сайта */
html.sp-dark .sp-pb-cal { background: #2E2648; color: #B9A6FF; }
html.sp-dark .sp-pb-cal.is-on { background: #6F52C8; color: #fff; }
html.sp-dark .sp-pb-pop, html.sp-dark .sp-pb-pop::before { background: #1E1A2B; color: #EEEAF8; }
html.sp-dark .sp-pb-pop { box-shadow: 0 20px 50px rgba(0, 0, 0, .55); }
html.sp-dark .sp-pb-h b, html.sp-dark .sp-pb-sum b, html.sp-dark .sp-pb-day, html.sp-dark .sp-pb-time, html.sp-dark .sp-pb-pts { color: #EEEAF8; }
html.sp-dark .sp-pb-x, html.sp-dark .sp-pb-day, html.sp-dark .sp-pb-time, html.sp-dark .sp-pb-rep, html.sp-dark .sp-pb-pts, html.sp-dark .sp-pb-spin, html.sp-dark .sp-pb-msg { background: #26203A; }
html.sp-dark .sp-pb-mode, html.sp-dark .sp-pb-runs, html.sp-dark .sp-pb-sv { background: #1E1A2B; color: #EEEAF8; }
html.sp-dark .sp-pb-lb, html.sp-dark .sp-pb-sum, html.sp-dark .sp-pb-note, html.sp-dark .sp-pb-day small, html.sp-dark .sp-pb-pts small, html.sp-dark .sp-pb-rep { color: #A9A2C2; }
html.sp-dark .sp-pb-txt { color: #C8C2DC; }
html.sp-dark .sp-pb-day[aria-pressed="true"], html.sp-dark .sp-pb-time[aria-pressed="true"], html.sp-dark .sp-pb-go { background: #6F52C8; color: #fff; }
html.sp-dark .sp-pb-f { border-top-color: #3A3254; }
html.sp-dark .sp-pb-sw { background: #4A4166; }
html.sp-dark .sp-pb-ptsin:checked + .sp-pb-sw { background: #6F52C8; }
html.sp-dark .sp-pb-sb, html.sp-dark .sp-pb-rep-l svg { color: #B9A6FF; }
html.sp-dark .sp-pb-msg--ok { background: #17322A; color: #6FDDA6; }
html.sp-dark .sp-pb-msg--err { background: #3D1D22; color: #FF9AA2; }
html.sp-dark .sp-pb-msg--warn { background: #3A3220; color: #F2CF6B; }
@media (prefers-reduced-motion: reduce) { .sp-pb-cal, .sp-pb-sw, .sp-pb-sw::after { transition: none; } }
