/* ==========================================================================
   Виджеты героя сервисов (service/widget_*.twig) и калькулятор ИМТ в стиле карточки анализов.
   Карточка-обёртка (.svc-widget-card) даёт рамку и тень, здесь — содержимое.
   ========================================================================== */

.sw { font-family: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #08163b; text-align: left; }
.sw * { box-sizing: border-box; }
.sw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sw-head__ico { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #0874f9, #7c5cff); box-shadow: 0 14px 26px -12px rgba(8, 116, 249, .75); }
.sw-head__ico svg { width: 24px; height: 24px; }
.sw-head b { display: block; font-size: 20px; line-height: 1.2; letter-spacing: -.03em; }
.sw-head small { display: block; margin-top: 3px; color: #7482ad; font-size: 14px; line-height: 1.4; }

.sw-go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 28px; border: 0; border-radius: 14px; color: #fff; font: 700 16px Inter, sans-serif; letter-spacing: -.01em; text-decoration: none; cursor: pointer; background: linear-gradient(135deg, #0874f9, #3d6bff); box-shadow: 0 16px 28px -14px rgba(8, 116, 249, .85); transition: transform .2s ease, box-shadow .2s ease; }
.sw-go:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 20px 32px -14px rgba(8, 116, 249, .95); }
.sw-go svg { transition: transform .25s ease; } .sw-go:hover svg { transform: translateX(3px); }
.sw-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; }
.sw-alt { color: #7482ad; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; } .sw-alt:hover { color: #0874f9; }
.sw-note { margin: 14px 0 0; color: #8793b8; font-size: 13px; line-height: 1.5; }

.sw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sw-field > span, .sw-chan > span, .sw-rules__t { color: #7482ad; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.sw input[type="text"], .sw select, .sw textarea { width: 100%; padding: 13px 15px; border: 1px solid #dbe5f7; border-radius: 13px; color: #08163b; font: 500 16px Inter, sans-serif; background: #f8fbff; outline: 0; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.sw input:focus, .sw select:focus, .sw textarea:focus { border-color: #0874f9; background: #fff; box-shadow: 0 0 0 4px rgba(8, 116, 249, .12); }
.sw textarea { resize: none; }
.sw-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.sw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-chip { padding: 8px 15px; border: 1px solid #dbe5f7; border-radius: 99px; color: #4a5a8c; font: 600 14px Inter, sans-serif; background: #fff; cursor: pointer; transition: all .15s ease; }
.sw-chip:hover { border-color: #0874f9; color: #0874f9; }
.sw-chip.is-on { color: #fff; border-color: transparent; background: linear-gradient(135deg, #0874f9, #6a5cff); }

/* Психолог */
.sw-chat { display: grid; gap: 10px; margin-bottom: 14px; padding: 16px; border-radius: 18px; background: #f3f7ff; }
.sw-bubble { max-width: 88%; padding: 11px 15px; border-radius: 17px; font-size: 15px; line-height: 1.45; }
.sw-bubble--in { background: #fff; border-bottom-left-radius: 5px; box-shadow: 0 6px 14px rgba(42, 79, 142, .06); }
.sw-bubble--out { margin-left: auto; color: #fff; background: linear-gradient(135deg, #0874f9, #6a5cff); border-bottom-right-radius: 5px; }
.sw-typing { display: flex; gap: 5px; padding: 6px 8px; } .sw-typing[hidden] { display: none; }
.sw-typing i { width: 8px; height: 8px; border-radius: 50%; background: #b7c6ee; animation: swDot 1.2s infinite ease-in-out; }
.sw-typing i:nth-child(2) { animation-delay: .15s; } .sw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes swDot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.sw-psy .sw-chips { margin-bottom: 12px; }
.sw-compose { display: flex; gap: 10px; align-items: stretch; }
.sw-compose textarea { flex: 1; min-width: 0; }
.sw-compose .sw-go { padding: 0 22px; white-space: nowrap; }

/* Документы */
.sw-doc__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sw-doc__form { display: grid; gap: 12px; }
.sw-sheet { padding: 18px 18px 16px; border: 1px solid #e3ebf8; border-radius: 16px; background: #fff; box-shadow: 0 14px 28px -16px rgba(42, 79, 142, .35); font-size: 13px; }
.sw-sheet__title { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid #08163b; font-weight: 800; font-size: 14px; }
.sw-sheet__line { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #7482ad; } .sw-sheet__line b { color: #08163b; text-align: right; overflow-wrap: anywhere; }
.sw-sheet__table { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #e3ebf8; border-radius: 9px; background: #f8fbff; } .sw-sheet__table span { overflow-wrap: anywhere; }
.sw-sheet__tot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; color: #7482ad; border-top: 1px solid #e3ebf8; } .sw-sheet__tot b { color: #08163b; font-size: 15px; white-space: nowrap; }

/* Пересылка */
.sw-flow__map { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; }
.sw-chan { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: #eef3ff; } .sw-chan--to { background: #e6f8ee; }
.sw-chan input { background: #fff; }
.sw-flow__arrow { display: flex; align-items: center; gap: 4px; padding-bottom: 14px; color: #0874f9; }
.sw-flow__arrow i { width: 6px; height: 6px; border-radius: 50%; background: #0874f9; animation: swDot 1.2s infinite ease-in-out; } .sw-flow__arrow i:nth-child(2) { animation-delay: .15s; } .sw-flow__arrow i:nth-child(3) { animation-delay: .3s; }
.sw-rules { margin-top: 18px; display: grid; gap: 10px; }
.sw-flow__sum { margin: 2px 0 0; padding: 12px 14px; border-radius: 12px; color: #34416b; font-size: 14px; line-height: 1.45; background: #f3f7ff; overflow-wrap: anywhere; }

/* Удаление сообщений */
.sw-clean__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.sw-switches { display: grid; gap: 9px; }
.sw-switch { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid #e3ebf8; border-radius: 13px; background: #f8fbff; cursor: pointer; font-size: 15px; font-weight: 500; }
.sw-switch input { position: absolute; opacity: 0; pointer-events: none; }
.sw-switch i { position: relative; flex: none; width: 40px; height: 24px; border-radius: 99px; background: #cfd9ef; transition: background .2s ease; }
.sw-switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .2); transition: transform .2s ease; }
.sw-switch input:checked + i { background: linear-gradient(135deg, #0874f9, #6a5cff); } .sw-switch input:checked + i::after { transform: translateX(16px); }
.sw-switch input:focus-visible + i { outline: 3px solid rgba(8, 116, 249, .35); outline-offset: 2px; }
.sw-room { display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: #f3f7ff; }
.sw-msg { max-width: 86%; padding: 10px 14px; border-radius: 15px 15px 15px 5px; font-size: 14px; line-height: 1.4; background: #fff; box-shadow: 0 6px 14px rgba(42, 79, 142, .06); } .sw-msg--b { margin-left: auto; color: #fff; border-radius: 15px 15px 5px 15px; background: linear-gradient(135deg, #0874f9, #6a5cff); }
.sw-sys { align-self: center; justify-self: center; padding: 5px 13px; border-radius: 99px; color: #7482ad; font-size: 12.5px; background: #e2eaf9; max-height: 40px; overflow: hidden; transition: opacity .35s ease, max-height .45s ease, padding .45s ease, margin .45s ease, transform .35s ease; }
.sw-sys.is-gone { max-height: 0; padding-top: 0; padding-bottom: 0; margin: -4px 0; opacity: 0; transform: scale(.9); }

@media (prefers-reduced-motion: reduce) { .sw-typing i, .sw-flow__arrow i { animation: none; } .sw-sys { transition: none; } }
@media (max-width: 760px) {
	.sw-doc__grid, .sw-clean__grid { grid-template-columns: 1fr; }
	.sw-flow__map { grid-template-columns: 1fr; } .sw-flow__arrow { justify-content: center; padding: 0; transform: rotate(90deg); }
	.sw-compose { flex-direction: column; } .sw-compose .sw-go { padding: 14px 22px; }
	.sw-go { width: 100%; }
	.sw-head b { font-size: 18px; }
	.sw-field-row { grid-template-columns: 1fr; }
}

/* ---------- Калькулятор ИМТ в карточке героя ---------- */
.analizy-landing .service-widget-imt .row { margin: 0 -8px; display: flex; flex-wrap: wrap; }
.analizy-landing .service-widget-imt .row > div { padding: 0 8px; }
.analizy-landing .service-widget-imt .input-label { display: block; margin: 0 0 6px; color: #7482ad; font-size: 12.5px; font-weight: 600; }
.analizy-landing .service-widget-imt .form-control { width: 100%; height: auto; padding: 14px 16px; border: 1px solid #dbe5f7; border-radius: 13px; color: #08163b; font: 600 20px Inter, sans-serif; background: #f8fbff; box-shadow: none; }
.analizy-landing .service-widget-imt .form-control:focus { border-color: #0874f9; background: #fff; box-shadow: 0 0 0 4px rgba(8, 116, 249, .12); outline: 0; }
.analizy-landing .service-widget-imt .decrypt-button { width: 100%; margin-top: 16px; padding: 16px 24px; border: 0; border-radius: 14px; color: #fff; font: 700 17px Inter, sans-serif; background: linear-gradient(135deg, #0874f9, #3d6bff); box-shadow: 0 16px 28px -14px rgba(8, 116, 249, .85); transition: transform .2s ease; }
.analizy-landing .service-widget-imt .decrypt-button:hover:not(:disabled) { transform: translateY(-2px); }
.analizy-landing .service-widget-imt .decrypt-button:disabled { opacity: .55; }
.analizy-landing .service-widget-imt .service-gate-note { margin-top: 8px; color: #8793b8; font-size: 13px; }
.analizy-landing .service-widget-imt .decryption-result-section { margin-top: 16px; padding: 18px 20px; border-radius: 16px; color: #08163b; font-size: 16px; line-height: 1.5; background: #f3f7ff; }
.analizy-landing .service-widget-imt .input-label { position: static !important; transform: none !important; padding: 0 !important; background: none !important; border: 0 !important; }
.analizy-landing .service-widget-imt .row > div { margin-bottom: 12px; }
