/* ============================================================
   RB Calculator — LCL Styles
   Стили калькулятора доставки сборных грузов.
   Все стили scoped под .rbc-lcl, чтобы не конфликтовать с темой.
   ============================================================ */

.rbc-lcl-wrapper *,
.rbc-lcl-wrapper *::before,
.rbc-lcl-wrapper *::after {
  box-sizing: border-box;
}

.rbc-lcl-wrapper {
  width: 100%;
  background: #ffffff;
  font-family: 'TT Norms', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  padding: 0;
  margin: 0;
}

.rbc-lcl-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* --- Заголовок --- */
.rbc-lcl-header {
  text-align: center;
  margin-bottom: 50px;
}

.rbc-lcl-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 15px 0;
  line-height: 1.2;
}

.rbc-lcl-subtitle {
  font-size: clamp(16px, 2.5vw, 18px);
  color: #666666;
  margin: 0 auto;
  line-height: 1.6;
  max-width: 800px;
}

/* --- Форма ввода (тёмный блок) --- */
.rbc-lcl-form {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  border-radius: 20px;
  padding: 50px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.rbc-lcl-form-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 35px;
  align-items: start;
}

.rbc-lcl-form-group {
  display: flex;
  flex-direction: column;
  min-height: 90px;
}

.rbc-lcl-label {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1.3;
  min-height: 30px;
  display: flex;
  align-items: center;
}

.rbc-lcl-input,
.rbc-lcl-select {
  height: 54px !important;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  color: #1a1a1a !important;
  background: #ffffff !important;
  outline: none;
  transition: all 0.3s ease;
  appearance: none;
  font-family: inherit;
  font-weight: 500;
  width: 100%;
}

.rbc-lcl-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 18px;
  padding-right: 50px;
}

.rbc-lcl-input:hover,
.rbc-lcl-select:hover {
  border-color: #e5e7eb;
  background: #fafafa;
}

.rbc-lcl-input:focus,
.rbc-lcl-select:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
  background: #ffffff;
}

.rbc-lcl-input::placeholder {
  color: #999999;
  font-weight: 400;
}

/* --- Опции (чекбоксы) --- */
.rbc-lcl-options {
  background: rgba(255, 255, 255, 0.08);
  padding: 30px;
  margin-bottom: 35px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.rbc-lcl-options-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.rbc-lcl-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.rbc-lcl-checkbox {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  gap: 12px;
}

.rbc-lcl-checkbox:hover {
  background: rgba(255, 255, 255, 0.1);
}

.rbc-lcl-checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #dc2626;
  flex-shrink: 0;
}

/* --- Кнопка расчёта --- */
.rbc-lcl-btn-calc {
  width: 100%;
  height: 62px;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

.rbc-lcl-btn-calc:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(220, 38, 38, 0.45);
}

.rbc-lcl-btn-calc:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Результат (светлый блок) --- */
.rbc-lcl-result {
  margin-top: 40px;
  animation: rbcSlideDown 0.5s ease;
}

@keyframes rbcSlideDown {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.rbc-lcl-result-box {
  background: #f8f9fa;
  padding: 40px;
  border-radius: 18px;
  margin-bottom: 40px;
}

.rbc-lcl-result-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
}

.rbc-lcl-result-label {
  margin-bottom: 12px;
}

.rbc-lcl-result-price {
  font-size: clamp(42px, 5vw, 64px);
  margin: 0;
  line-height: 1;
}

.rbc-lcl-result-details {
  padding: 30px;
}

.rbc-lcl-result-table {
  width: 100%;
  border-collapse: collapse;
  border: none;
}

.rbc-lcl-result-table tr {
  border-bottom: 1px solid #eee;
  border-top: none;
}

.rbc-lcl-result-table tr:last-child {
  border-bottom: none;
}

.rbc-lcl-result-table td,
.rbc-lcl-result-table th {
  padding: 16px 0;
  vertical-align: top;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: none;
}

.rbc-lcl-result-table td:first-child {
  width: 50%;
  padding-right: 20px;
}

.rbc-lcl-result-table td:last-child {
  text-align: right;
}

.rbc-lcl-result-route {
  margin-top: 25px;
  padding-top: 25px;
}

/* --- Форма CF7 — только центрирование и сетка, стили элементов из темы --- */
.rbc-lcl-contact {
  padding-top: 40px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.rbc-lcl-contact .wpcf7 {
  max-width: 700px;
  margin: 0 auto;
}

.rbc-lcl-contact .wpcf7-form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 0;
}

/* Каждое поле — равная доля строки */
.rbc-lcl-contact .wpcf7-form > p {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

/* Submit и response-output — на всю ширину */
.rbc-lcl-contact .wpcf7-form p:has(> input[type="submit"]),
.rbc-lcl-contact .wpcf7-form .wpcf7-response-output {
  flex: 0 0 100%;
}

.rbc-lcl-contact .wpcf7-form input[type="submit"] {
  width: 100%;
}

/* Все контролы на всю ширину своей ячейки — структурно */
.rbc-lcl-contact .wpcf7-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.rbc-lcl-contact .wpcf7-form select,
.rbc-lcl-contact .wpcf7-form textarea {
  width: 100%;
  box-sizing: border-box;
}

/* Цвет текста и плейсхолдера — белый (тёмный фон секции) */
.rbc-lcl-contact .wpcf7-form input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]),
.rbc-lcl-contact .wpcf7-form textarea {
  color: #ffffff;
}

.rbc-lcl-contact .wpcf7-form input::placeholder,
.rbc-lcl-contact .wpcf7-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

/* Текст согласия — белый, ссылка наследует свой цвет */
.rbc-lcl-contact .wpcf7-form .wpcf7-acceptance label {
  color: #ffffff;
}
.rbc-lcl-contact .wpcf7-form .wpcf7-acceptance label a {
  color: inherit;
}

/* Сообщение об успехе/ошибке */
.rbc-lcl-contact .wpcf7-form .wpcf7-response-output {
  color: #ffffff;
  font-size: 20px;
  font-style: normal;
}

/* Скрытые поля */
.rbc-lcl-contact .wpcf7-form input[type="hidden"] {
  display: none;
}

/* --- Дисклеймер --- */
.rbc-lcl-disclaimer {
  padding: 40px 30px;
  background: #f8f9fa;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
}

.rbc-lcl-disclaimer p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 15px;
}

.rbc-lcl-disclaimer ul {
  list-style: none;
  padding: 0;
  margin: 20px 0 0 0;
}

.rbc-lcl-disclaimer li {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 12px;
  padding-left: 25px;
  position: relative;
}

.rbc-lcl-disclaimer li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #dc2626;
  font-weight: 700;
  font-size: 18px;
}

.rbc-lcl-disclaimer strong {
  color: #1a1a1a;
  font-weight: 700;
}

/* --- Адаптив --- */
@media (max-width: 1024px) {
  .rbc-lcl-container {
    padding: 50px 20px;
  }
  .rbc-lcl-form {
    padding: 40px 30px;
  }
  .rbc-lcl-form-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .rbc-lcl-options-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .rbc-lcl-container {
    padding: 40px 15px;
  }
  .rbc-lcl-form {
    padding: 30px 20px;
    border-radius: 16px;
  }
  .rbc-lcl-form-row {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 25px;
  }
  .rbc-lcl-form-group {
    min-height: auto;
  }
  .rbc-lcl-label {
    min-height: auto;
    font-size: 11px;
  }
  .rbc-lcl-input,
  .rbc-lcl-select {
    height: 50px;
    font-size: 16px;
  }
  .rbc-lcl-options {
    padding: 20px 15px;
  }
  .rbc-lcl-btn-calc {
    height: 56px;
    font-size: 14px;
  }
  .rbc-lcl-result-box {
    padding: 25px 20px;
    border-radius: 16px;
  }
  .rbc-lcl-result-price {
    font-size: 36px;
  }
  .rbc-lcl-result-details {
    padding: 20px 15px;
  }
  .rbc-lcl-result-table {
    font-size: 14px;
  }
  .rbc-lcl-result-table td {
    padding: 12px 0;
    display: block;
    width: 100% !important;
    text-align: left !important;
  }
  .rbc-lcl-result-table td:first-child {
    padding-right: 0;
    margin-bottom: 4px;
  }
  .rbc-lcl-result-table td:last-child {
    text-align: left !important;
    margin-bottom: 8px;
  }
  .rbc-lcl-contact .wpcf7-form {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .rbc-lcl-disclaimer {
    padding: 25px 20px;
  }
}

@media (max-width: 480px) {
  .rbc-lcl-container {
    padding: 30px 12px;
  }
  .rbc-lcl-form {
    padding: 25px 15px;
  }
  .rbc-lcl-result-box {
    padding: 20px 15px;
  }
  .rbc-lcl-result-details {
    padding: 15px 12px;
  }
  .rbc-lcl-disclaimer {
    padding: 20px 15px;
  }
}
