/* AC Install Calculator v2.1 — Дополнительные стили */
.ac-calc-section {
  --ac-accent: #1e88e5;
  --ac-accent-hover: #1565c0;
  --ac-surface: #ffffff;
  --ac-surface-soft: #f8fafc;
  --ac-border: #e2e8f0;
  --ac-border-focus: #1e88e5;
  --ac-text: #0f172a;
  --ac-text-muted: #64748b;
  margin-top: 24px;
  margin-bottom: 24px;
}

.ac-calc-section .ac-calc-heading-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.ac-calc-section .ac-calc-heading {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ac-text);
  white-space: nowrap;
}

.ac-calc-section .ac-calc-heading-line {
  flex: 1;
  height: 1px;
  background: var(--ac-border);
}

.ac-calc-section .ac-calc-card {
  background: var(--ac-surface);
  border: 1px solid var(--ac-border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.ac-calc-section .ac-calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

.ac-calc-section .ac-calc-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.ac-calc-section .ac-calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ac-calc-section .ac-calc-field--full {
  grid-column: 1 / -1;
}

.ac-calc-section .ac-calc-label {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.35;
}

.ac-calc-section .ac-calc-control {
  display: block;
  width: 100%;
  height: 44px;
  padding: 8px 34px 8px 13px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ac-text);
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none;
}

.ac-calc-section .ac-calc-control:hover {
  border-color: #94a3b8;
}

.ac-calc-section .ac-calc-control:focus {
  outline: none;
  border-color: var(--ac-accent);
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.16);
}

/* Radio cards */
.ac-calc-section .ac-calc-radio-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ac-calc-section .ac-calc-radio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--ac-text);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ac-calc-section .ac-calc-radio-item:hover {
  border-color: #94a3b8;
}

.ac-calc-section .ac-calc-radio-item:has(input:checked) {
  border-color: var(--ac-accent);
  background: #eff6ff;
}

.ac-calc-section .ac-calc-radio-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ac-calc-section .ac-calc-radio-item input,
.ac-calc-section .ac-calc-check-item input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--ac-accent);
  flex-shrink: 0;
  cursor: pointer;
}

/* Checkboxes */
.ac-calc-section .ac-calc-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ac-calc-section .ac-calc-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ac-text);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ac-calc-section .ac-calc-check-item:hover {
  border-color: #94a3b8;
}

.ac-calc-section .ac-calc-check-item:has(input:checked) {
  border-color: var(--ac-accent);
  background: #eff6ff;
}

.ac-calc-section .ac-calc-opt-price {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Track length slider box */
.ac-calc-section .ac-calc-track-box {
  background: var(--ac-surface-soft);
  border: 1px solid var(--ac-border);
  border-radius: 12px;
  padding: 14px 16px;
}

.ac-calc-section .ac-calc-track-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ac-calc-section .ac-calc-length-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 3px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-text);
  font-variant-numeric: tabular-nums;
}

.ac-calc-section .ac-calc-length {
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #cbd5e1;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.ac-calc-section .ac-calc-length::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ac-accent);
  border: 3px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ac-calc-section .ac-calc-length::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.ac-calc-section .ac-calc-length::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ac-accent);
  border: 3px solid #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.3);
  cursor: pointer;
}

.ac-calc-section .ac-calc-track-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: var(--ac-text-muted);
  font-variant-numeric: tabular-nums;
}

.ac-calc-section .ac-calc-track-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ac-text-muted);
}

/* Free install toggle row */
.ac-calc-section .ac-calc-free-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--ac-text);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ac-calc-section .ac-calc-free-label:hover {
  border-color: #94a3b8;
}

.ac-calc-section .ac-calc-free-label:has(input:checked) {
  border-color: #16a34a;
  background: #f0fdf4;
}

.ac-calc-section .ac-calc-free-label input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #16a34a;
  flex-shrink: 0;
}

/* Right Summary Panel */
.ac-calc-section .ac-calc-summary {
  background: var(--ac-surface-soft);
  border: 1px solid var(--ac-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ac-calc-section .ac-calc-total-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ac-border);
}

.ac-calc-section .ac-calc-total-caption {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ac-text-muted);
}

.ac-calc-section .ac-calc-total-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ac-accent);
  font-variant-numeric: tabular-nums;
}

.ac-calc-section .ac-calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  color: #334155;
}

.ac-calc-section .ac-calc-breakdown-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ac-calc-section .ac-calc-breakdown-price {
  font-weight: 600;
  color: var(--ac-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ac-calc-section .ac-calc-free-tag {
  color: #16a34a;
  font-weight: 700;
  margin-left: 4px;
}

.ac-calc-section .ac-calc-notice {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
}

.ac-calc-section .ac-calc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.ac-calc-section .ac-calc-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 11px 18px;
  border: none;
  border-radius: 10px;
  background: var(--ac-accent);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ac-calc-section .ac-calc-btn-primary:hover {
  opacity: 0.92;
}

.ac-calc-section .ac-calc-btn-primary:active {
  transform: translateY(1px);
}

.ac-calc-section .ac-calc-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ac-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ac-calc-section .ac-calc-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Responsive breakpoints */
@media (max-width: 991px) {
  .ac-calc-section .ac-calc-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ac-calc-section .ac-calc-heading {
    white-space: normal;
    font-size: 18px;
  }

  .ac-calc-section .ac-calc-heading-line {
    display: none;
  }

  .ac-calc-section .ac-calc-card {
    padding: 16px;
  }

  .ac-calc-section .ac-calc-fields-grid,
  .ac-calc-section .ac-calc-radio-list {
    grid-template-columns: 1fr;
  }

  .ac-calc-section .ac-calc-total-value {
    font-size: 24px;
  }
}
