/* ============================================================
   СЕКЦИЯ "Конструктор" id="configurator" — чекбоксы услуг (.cfg-*), правая панель "Ваш набор" (.cs-*, .config-*), калькулятор окупаемости (.roi-*).
   ============================================================ */

.roi-calculator {
    background: rgba(255, 184, 48, 0.03);
    border: 1px solid rgba(255, 184, 48, 0.08);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 12px 0 16px;
}

.roi-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.roi-icon {
    font-size: 22px;
    line-height: 1;
}

.roi-title {
    font-family: var(--f-display, "Oswald", sans-serif);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold, #FFB830);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
}

.roi-sub {
    font-size: 11px;
    color: var(--text-dim, rgba(212,200,232,.6));
    display: block;
    line-height: 1.3;
}

.roi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.roi-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.roi-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.35);
}

.roi-hint {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.15);
    margin-top: 2px;
}

.roi-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.roi-input-wrap input[type="number"] {
    width: 100%;
    padding: 7px 10px 7px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: border-color 0.25s;
    -moz-appearance: textfield;
}

.roi-input-wrap input[type="number"]::-webkit-outer-spin-button,
.roi-input-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.roi-input-wrap input[type="number"]:focus {
    outline: none;
    border-color: var(--gold, #FFB830);
}

.roi-input-wrap input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

.roi-input-suffix {
    position: absolute;
    right: 10px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.roi-result {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 184, 48, 0.04);
    border: 1px solid rgba(255, 184, 48, 0.06);
}

.roi-result-left,
.roi-result-right,
.roi-result-bottom {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.roi-result-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.2);
}

.roi-result-value {
    font-family: var(--f-display, "Oswald", sans-serif);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.roi-result-value.gold {
    color: var(--gold, #FFB830);
}

.roi-result-value.green {
    color: var(--green, #00E68A);
}

.roi-note {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.15);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.roi-note i {
    font-size: 10px;
}

@media (max-width: 600px) {
    .roi-grid {
        grid-template-columns: 1fr;
    }
    .roi-result {
        grid-template-columns: 1fr;
        padding: 10px 12px;
    }
    .roi-result-value {
        font-size: 18px;
    }
    .roi-calculator {
        padding: 12px 14px;
        display: none;
    }
}

.cs-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 8px 4px;
    margin: 4px 0 8px;
    font-family: inherit;
    position: relative;
}

.cs-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.cs-checkbox-custom {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    margin-top: 1px;
}

.cs-checkbox-label input[type="checkbox"]:checked + .cs-checkbox-custom {
    background: linear-gradient(135deg, #FFB830, #FF8C00);
    border-color: #FFB830;
    box-shadow: 0 0 20px rgba(255, 184, 48, 0.15);
}

.cs-checkbox-label input[type="checkbox"]:checked + .cs-checkbox-custom::after {
    content: "✓";
    color: #08040C;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.cs-checkbox-text {
    font-size: 12px;
    color: rgba(212, 200, 232, 0.5);
    line-height: 1.5;
    user-select: none;
}

.cs-checkbox-text a {
    color: #FFB830;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s;
}

.cs-checkbox-text a:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.cs-checkbox-label input[type="checkbox"]:checked ~ .cs-checkbox-text {
    color: rgba(212, 200, 232, 0.7);
}

.cs-checkbox-label.error .cs-checkbox-custom {
    border-color: #FF3B3B;
    box-shadow: 0 0 20px rgba(255, 59, 59, 0.15);
}

.cs-checkbox-label.error .cs-checkbox-text {
    color: #FF3B3B;
}

@media (max-width: 600px) {
    .cs-checkbox-text {
        font-size: 11px;
    }
    .cs-checkbox-custom {
        width: 20px;
        height: 20px;
    }
}

.cfg-dependent {
  position: relative;
  cursor: not-allowed;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.cfg-dependent.active {
  cursor: pointer;
  opacity: 1;
}

.cfg-dependent.active .cfg-tooltip {
  display: none;
}

.cfg-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 4, 12, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 184, 48, 0.15);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gold, #FFB830);
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 100;
  pointer-events: none;
  font-family: var(--f-body, "Montserrat", sans-serif);
}

.cfg-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(255, 184, 48, 0.15);
}

.cfg-dependent:not(.active):hover .cfg-tooltip {
  display: block;
  animation: tooltipFade 0.25s ease;
}

@media (max-width: 768px) {
  .cfg-tooltip {
    white-space: normal;
    max-width: 280px;
    text-align: center;
    font-size: 10px;
    padding: 6px 12px;
    bottom: calc(100% + 8px);
  }
}

.cfg-dependent input:disabled ~ .cfg-box {
  opacity: 0.4;
  border-color: rgba(255, 255, 255, 0.08);
}

.cfg-dependent.active input:disabled ~ .cfg-box {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.18);
}

.cfg-dependent input:disabled ~ .cfg-label {
  opacity: 0.6;
}

.cfg-dependent.active input:disabled ~ .cfg-label {
  opacity: 1;
}

.cfg-item.highlight-pulse {
  animation: highlightPulse 1.2s ease 3;
  border-color: var(--gold, #FFB830) !important;
  background: rgba(255, 184, 48, 0.08) !important;
  box-shadow: 0 0 30px rgba(255, 184, 48, 0.15) !important;
}

@media (max-width: 600px) {
  .cfg-item.highlight-pulse {
    animation: highlightPulseMobile 1s ease 3;
  }

  @keyframes highlightPulseMobile {
    0%, 100% {
      box-shadow: 0 0 20px rgba(255, 184, 48, 0.15);
      transform: scale(1);
    }
    50% {
      box-shadow: 0 0 40px rgba(255, 184, 48, 0.25);
      transform: scale(1.03);
    }
  }
}

.config-layout {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.price-cat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cfg-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 9px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cfg-item:hover {
  border-color: rgba(255, 184, 48, 0.25);
}

.cfg-item input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cfg-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 11px;
  transition: 0.2s;
}

.cfg-item input:checked~.cfg-box {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  border-color: transparent;
  color: #08040C;
}

.cfg-item input:checked~.cfg-label {
  color: #fff;
}

.cfg-item:has(input:checked) {
  border-color: var(--border-gold);
  background: rgba(255, 184, 48, 0.05);
}

.cfg-label {
  flex: 1;
  font-size: 13px;
  color: rgba(220, 210, 240, 0.86);
  line-height: 1.4;
}

.cfg-price {
  flex-shrink: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.config-summary {
  position: relative;
  border-radius: var(--r-lg);
  padding: 22px;
  background: linear-gradient(180deg, rgba(22, 16, 34, 0.85), rgba(12, 8, 22, 0.9));
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-card);
}

.cs-head {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.cs-head-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.cs-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  padding: 18px 0;
  text-align: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--r-sm);
}

.cs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.cs-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--text);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cs-list b {
  color: var(--gold);
  white-space: nowrap;
}

.cs-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  margin-bottom: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cs-total span {
  font-size: 13px;
  color: var(--text-dim);
}

.cs-total strong {
  font-family: var(--f-display);
  font-size: 26px;
  color: var(--gold);
}

.cs-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cs-form input,
.cs-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  resize: none;
}

.cs-form input::placeholder,
.cs-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.cs-form input:focus,
.cs-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.cs-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border-radius: var(--r-sm);
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: #08040C;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s, opacity 0.2s;
  margin-top: 4px;
}

.cs-submit:hover {
  transform: translateY(-2px);
}

.cs-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.cs-note {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.5;
  text-align: center;
  margin-top: 2px;
}

.cs-state {
  display: none;
  text-align: center;
  padding: 18px 4px;
}

.cs-state.show {
  display: block;
}

.cs-state-icon {
  font-size: 38px;
  margin-bottom: 10px;
}

.cs-state-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.cs-state-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 16px;
}

.cs-wa-fallback {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.35);
  color: #25D366;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

@media (min-width: 1024px) {
  .config-layout {
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: flex-start;
  }
  .config-summary {
    position: sticky;
    top: 96px;
    
  }
}

