/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Template: astra
Author: Brainstorm Force
Author URI: https://wpastra.com/about/
Description: Child theme for Astra.
Tags: astra-child
Version: 1.0.1
Updated: 2025-07-14
*/

/* ===== EDD Single Download: заголовок, мета, кнопка ===== */

/* Заголовок товара: центр + комфортный интерлиньяж */
.single-download h1.entry-title {
  text-align: center !important;
  line-height: 2.2 !important;
  margin: 0 0 .9em !important;
  padding: 0 6px !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

/* Мета (автор/дата) */
.single-download .entry-meta,
.single-download .ast-blog-meta {
  text-align: center !important;
  margin-top: .2em;
  margin-bottom: 1.2em;
  opacity: .95;
}

/* Кнопка Purchase по центру */
.single-download .edd_purchase_submit_wrapper,
.single-download .edd_download_purchase_form,
.single-download .edd-download-purchase-button {
  display: flex !important;
  justify-content: center !important;
}

/* Кнопка не на всю ширину (кроме мобилок) */
.single-download .edd-submit,
.single-download a.edd-submit {
  display: inline-block;
}

/* Мобильная подстройка кнопки */
@media (max-width: 600px) {
  .single-download .edd-submit,
  .single-download a.edd-submit,
  .single-download .edd-submit.button {
    width: 100% !important;
    max-width: 420px !important;
    margin: 14px auto 18px;
    text-align: center;
  }
}

/* ===== Бейдж языка в названии товара ===== */
.lang-badge {
  color: #d00 !important;         /* всегда красный */
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
  vertical-align: baseline;
}
/* если бейдж попал внутрь ссылки или заголовка Elementor — тоже красим */
a .lang-badge,
.elementor .elementor-heading-title .lang-badge {
  color: #d00 !important;
}

/* ==== EDD Checkout — мобильные правки ==== */
@media (max-width: 768px) {
  /* Контейнер — немного воздуха по бокам */
  .edd-checkout,
  .edd_checkout,
  .edd_form {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Поля форм — 100% ширины, читаемый размер шрифта */
  .edd_form input[type="text"],
  .edd_form input[type="email"],
  .edd_form input[type="tel"],
  .edd_form input[type="password"],
  .edd_form select,
  .edd_form textarea {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.35;
    padding: 12px 12px;
    box-sizing: border-box;
  }

  .edd_form label {
    display: block;
    margin: 10px 0 6px;
    line-height: 1.2;
  }

  .edd-checkout .edd-customer-info .edd-fields-row,
  .edd-checkout .edd-cart-adjustment,
  .edd_form .edd-half {
    display: block !important;
    width: 100% !important;
    margin-right: 0 !important;
  }

  .edd_checkout_cart,
  .edd_cart_total {
    font-size: 16px;
    line-height: 1.4;
  }

  .edd_submit,
  a.edd-submit,
  .edd-submit.button {
    display: inline-block;
    width: 100%;
    max-width: 420px;
    margin: 14px auto 18px;
    padding: 14px 16px;
    font-size: 17px;
    line-height: 1.2;
    text-align: center;
  }

  .edd-payment-icons img {
    max-height: 22px;
    margin-right: 6px;
  }

  .edd_errors, .edd_error, .edd-alert, .edd_notice {
    font-size: 14px;
    line-height: 1.35;
    margin: 10px 0 14px;
    padding: 10px 12px;
  }
}
