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

* {
  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;
  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;
  border: 1px solid #e5e7eb;
  margin-bottom: 40px;
  color: #1a1a1a;
}

.rbc-lcl-result-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.rbc-lcl-result-label {
  font-size: 14px;
  color: #666666;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.rbc-lcl-result-price {
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 800;
  color: #1a1a1a;
  margin: 0;
  line-height: 1;
  letter-spacing: -1px;
}

.rbc-lcl-result-details {
  background: #ffffff;
  padding: 30px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.rbc-lcl-result-table {
  width: 100%;
  font-size: 16px;
  line-height: 1.6;
  border-collapse: collapse;
}

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

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

.rbc-lcl-result-table td {
  padding: 16px 0;
  vertical-align: top;
}

.rbc-lcl-result-table td:first-child {
  font-weight: 500;
  color: #555;
  width: 50%;
  padding-right: 20px;
}

.rbc-lcl-result-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: #1a1a1a;
}

.rbc-lcl-result-route {
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px solid #e5e7eb;
  color: #333;
  font-size: 15px;
  line-height: 1.7;
}

.rbc-lcl-result-route strong {
  color: #000;
  font-weight: 700;
}

/* --- Форма CF7 --- */
.rbc-lcl-contact {
  padding-top: 40px;
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* CF7 форма — стилизуем под наш дизайн.
   ВАЖНО: CF7 оборачивает каждое поле в <p>, поэтому grid
   применяем именно к .wpcf7-form, а дочерние <p> становятся
   grid-items. */
.rbc-lcl-contact .wpcf7-form {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 20px !important;
  margin: 0 !important;
}

/* Убираем margin у параграфов CF7 */
.rbc-lcl-contact .wpcf7-form > p {
  margin: 0 !important;
}

/* Лейблы полей (ВАШЕ ИМЯ *, ТЕЛЕФОН * и т.д.) */
.rbc-lcl-contact .wpcf7-form > p > label,
.rbc-lcl-contact .wpcf7-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff !important;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Поля ввода CF7 */
.rbc-lcl-contact .wpcf7-form input[type="text"],
.rbc-lcl-contact .wpcf7-form input[type="tel"],
.rbc-lcl-contact .wpcf7-form input[type="email"],
.rbc-lcl-contact .wpcf7-form input[type="text"].wpcf7-form-control,
.rbc-lcl-contact .wpcf7-form input[type="tel"].wpcf7-form-control,
.rbc-lcl-contact .wpcf7-form input[type="email"].wpcf7-form-control {
  height: 54px;
  padding: 0 20px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-size: 15px;
  color: #1a1a1a !important;
  background: #ffffff !important;
  outline: none;
  width: 100%;
  font-family: inherit;
  font-weight: 500;
  box-sizing: border-box;
}

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

/* Кнопка отправки — на всю ширину, белая */
.rbc-lcl-contact .wpcf7-form input[type="submit"],
.rbc-lcl-contact .wpcf7-form input[type="submit"].wpcf7-form-control {
  width: 100%;
  height: 62px;
  background: #ffffff !important;
  color: #1a1a1a !important;
  border: none !important;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 14px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  grid-column: 1 / -1;
}

.rbc-lcl-contact .wpcf7-form input[type="submit"]:hover {
  background: #f0f0f0 !important;
  transform: translateY(-2px);
}

/* Чекбокс согласия (acceptance) */
.rbc-lcl-contact .wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label,
.rbc-lcl-contact .wpcf7-form .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.9) !important;
  cursor: pointer;
}

.rbc-lcl-contact .wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #dc2626;
  flex-shrink: 0;
  cursor: pointer;
}

.rbc-lcl-contact .wpcf7-form .wpcf7-acceptance a {
  color: #ff6b6b;
  text-decoration: underline;
}

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

/* Сообщения CF7 (ошибки, успех) */
.rbc-lcl-contact .wpcf7-form .wpcf7-response-output {
  grid-column: 1 / -1;
  margin: 0;
  border-radius: 10px;
}

.rbc-lcl-contact .wpcf7-form .wpcf7-not-valid-tip {
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 5px;
}

/* --- Дисклеймер --- */
.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;
    font-size: 13px;
  }
  .rbc-lcl-result-table td:last-child {
    text-align: left !important;
    font-size: 15px;
    margin-bottom: 8px;
  }
  .rbc-lcl-result-route {
    font-size: 14px;
  }
  .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;
  }
}
