/*!
Theme Name: Eduact Child theme
Theme URI: https://bracketweb.com/eduactwp/
Template: eduact
Author: bracket-web
Author URI: https://themeforest.net/user/bracket-web
Description: This is a Child theme for Eduact WordPress theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: eduact-child
*/

/* Bangs Academy - mobile stability and WooCommerce polish */
html,
body {
  max-width: 100%;
}

body {
  overflow-x: clip;
}

img,
picture,
video,
iframe,
svg,
canvas {
  max-width: 100%;
}

/* EduAct uses viewport-based widths for some overlays. On phones this can
   include the scrollbar width and create a small horizontal scroll. */
@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    min-width: 0;
    overflow-x: clip !important;
  }

  .elementor,
  .elementor-section,
  .elementor-container,
  .elementor-column,
  .elementor-widget-wrap,
  .elementor-widget,
  .elementor-element {
    min-width: 0;
    max-width: 100%;
  }

  .elementor-section.elementor-section-stretched {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .mobile-nav__wrapper,
  .mobile-nav__container,
  .mobile-nav__content,
  .mobile-nav__content-inner {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .mobile-nav__wrapper {
    left: 0 !important;
    right: 0 !important;
  }

  .mobile-nav__wrapper .container,
  .site-header .container,
  .main-menu .container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Prevent common row/grid overflows from theme negative gutters. */
  .row,
  [class*="row"] {
    min-width: 0;
  }

  .woocommerce,
  .woocommerce-page,
  .woocommerce-cart,
  .woocommerce-checkout,
  .woocommerce-account {
    max-width: 100%;
    min-width: 0;
  }

  .woocommerce * {
    min-width: 0;
  }

  .woocommerce table.shop_table,
  .woocommerce form,
  .woocommerce .col2-set,
  .woocommerce .col-1,
  .woocommerce .col-2,
  .woocommerce .form-row {
    max-width: 100%;
    box-sizing: border-box;
  }

  .woocommerce table.shop_table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Long URLs/emails/text must wrap instead of widening the viewport. */
  .woocommerce,
  .woocommerce p,
  .woocommerce li,
  .woocommerce td,
  .woocommerce th,
  .woocommerce address,
  .elementor-widget-text-editor,
  .elementor-widget-container {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  /* Mobile nav/megamenu: never use viewport width, which is the most common
     source of the 12-20px horizontal strip on phones. */
  .mobile-nav__container .main-menu__list > .megamenu.megamenu-clickable > ul,
  .main-menu .main-menu__list > .megamenu.megamenu-clickable > ul,
  .stricky-header .main-menu__list > .megamenu.megamenu-clickable > ul {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    left: 0 !important;
    right: 0 !important;
  }

  /* Inputs/select2 can overflow their parent on narrow screens. */
  .select2-container,
  .select2-container--default,
  .select2-container .select2-selection--single {
    max-width: 100% !important;
  }

  .select2-container {
    width: 100% !important;
  }

  /* Checkout: never let Woo's percentage gutters create a second column. */
  body.ba-checkout-ui .checkout,
  body.ba-checkout-ui .col2-set,
  body.ba-checkout-ui .col-1,
  body.ba-checkout-ui .col-2,
  body.ba-checkout-ui #customer_details,
  body.ba-checkout-ui #order_review {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  body.ba-checkout-ui .form-row-first,
  body.ba-checkout-ui .form-row-last {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
  }

  body.ba-checkout-ui .woocommerce-checkout-review-order-table {
    width: 100% !important;
    table-layout: fixed;
  }

  body.ba-checkout-ui .woocommerce-checkout-review-order-table th,
  body.ba-checkout-ui .woocommerce-checkout-review-order-table td {
    overflow-wrap: anywhere;
  }
}

/* Keep focus rings and form controls usable on touch devices. */
@media (max-width: 480px) {
  input,
  select,
  textarea,
  button,
  .button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button {
    max-width: 100%;
  }

  .woocommerce input.input-text,
  .woocommerce select,
  .woocommerce textarea {
    font-size: 16px;
  }
}
