/* ============================================================
   CHECKOUT PAGE — Оформление заказа
   Form fields, rental period, consent, order summary
   ============================================================ */

/* --- Rental Period Block --- */
.checkout-rental {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: var(--radius-lg);
}

.checkout-rental__label {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.22;
  color: var(--color-dark);
  opacity: 0.5;
}

.checkout-rental__dates {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: var(--color-dark);
}

.checkout-rental__days {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: var(--color-dark);
  opacity: 0.5;
}

/* --- Form Field --- */
.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkout-field__label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.22;
  color: rgba(37, 37, 37, 0.7);
}

.checkout-field__required {
  color: var(--color-orange);
  font-size: 12px;
  line-height: 1;
}

.checkout-field__input {
  width: 100%;
  height: 50px;
  padding: 0 20px;
  border: 0.5px solid rgba(5, 76, 132, 0.5);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.17;
  color: var(--color-blue);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
}

.checkout-field__input::placeholder {
  color: rgba(5, 76, 132, 0.3);
  font-weight: 400;
}

.checkout-field__input:focus {
  border-color: var(--color-blue);
  border-width: 1px;
}

.checkout-field__textarea {
  width: 100%;
  padding: 16px 20px;
  border: 0.5px solid rgba(5, 76, 132, 0.5);
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-blue);
  background: transparent;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}

.checkout-field__textarea::placeholder {
  color: rgba(5, 76, 132, 0.3);
  font-weight: 400;
}

.checkout-field__textarea:focus {
  border-color: var(--color-blue);
  border-width: 1px;
}

/* --- Field Error Message --- */
.checkout-field__error {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 500;
  color: #EC6305;
  line-height: 1.2;
}

/* --- Consent Section --- */
.checkout-consent__check {
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.checkout-consent__checkbox {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--color-dark);
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s;
}

.checkout-consent__checkbox:checked {
  background-color: var(--color-blue);
  border-color: var(--color-blue);
}

.checkout-consent__checkbox:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 7px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkout-consent__text {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.22;
  color: var(--color-dark);
}

.checkout-consent__disclaimer {
  padding: 30px;
  border-radius: var(--radius-lg);
  background-color: #ECECEC;
}

.checkout-consent__disclaimer p {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-dark);
}

.checkout-consent__disclaimer a {
  text-decoration: underline;
}

/* --- Order Summary Card (right panel) --- */
.checkout-order {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-order__title {
  font-family: var(--font-primary);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  color: var(--color-dark);
}

/* --- Divider --- */
.checkout-divider {
  width: 100%;
  height: 1px;
  border: none;
  background-color: rgba(5, 76, 132, 0.5);
}

/* --- Fix product column width in checkout order --- */
#checkout-order .cart-row__product {
  min-width: 0;
}

@media (min-width: 1024px) {
  #checkout-table-head,
  #checkout-items .cart-row {
    grid-template-columns: minmax(0, 3fr) 100px 70px 140px 110px;
  }
}

/* --- Desktop tweaks --- */
@media (min-width: 1024px) {
  .checkout-rental__label {
    font-size: 20px;
  }

  .checkout-rental__dates {
    font-size: 36px;
  }

  .checkout-rental__days {
    font-size: 36px;
  }

  .checkout-field__label {
    font-size: 20px;
  }

  .checkout-field__input {
    height: 60px;
    font-size: 20px;
  }

  .checkout-field__textarea {
    font-size: 20px;
  }

  .checkout-consent__text {
    font-size: 24px;
  }

  .checkout-consent__disclaimer {
    padding: 50px;
  }

  .checkout-consent__disclaimer p {
    font-size: 20px;
  }

  .checkout-order__title {
    font-size: 40px;
  }
}
