/*
============================================================
 StockSkill Book Class Responsive V4
 Mobile + Tablet + Desktop
============================================================
*/

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
}

/* Universal safe sizing */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

input,
select,
textarea,
button {
  max-width: 100%;
}

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

/* ----------------------------------------------------------
   BOOK CLASS MAIN WRAPPER
---------------------------------------------------------- */

.book-class-page,
.book-class-wrapper,
.book-class-container,
.booking-page,
.booking-wrapper,
.booking-container,
.offline-booking,
.class-booking {
  width: 100%;
  max-width: 100%;
}

/* ----------------------------------------------------------
   GENERAL CONTAINERS
---------------------------------------------------------- */

.container,
.page-container,
.content-container,
.main-container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ----------------------------------------------------------
   FLEX / GRID SAFETY
---------------------------------------------------------- */

.row,
.form-row {
  max-width: 100%;
}

.grid,
.grid-2,
.grid-3,
.grid-4,
.booking-grid,
.class-grid {
  width: 100%;
}

/* ----------------------------------------------------------
   FORMS
---------------------------------------------------------- */

form {
  width: 100%;
  max-width: 100%;
}

label {
  display: block;
  max-width: 100%;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
}

textarea {
  resize: vertical;
}

button,
.btn,
input[type="submit"],
input[type="button"] {
  max-width: 100%;
}

/* ----------------------------------------------------------
   DESKTOP
---------------------------------------------------------- */

@media (min-width: 1025px) {

  .book-class-page,
  .book-class-wrapper,
  .booking-page,
  .offline-booking {
    padding-left: 24px;
    padding-right: 24px;
  }

}

/* ----------------------------------------------------------
   TABLET
---------------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1024px) {

  .container,
  .page-container,
  .content-container,
  .main-container {
    width: 100%;
    max-width: 100%;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .row,
  .form-row {
    display: flex;
    flex-wrap: wrap;
  }

  .grid-2,
  .two-column,
  .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

}

/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */

@media (max-width: 767px) {

  body {
    font-size: 15px;
  }

  /* Main containers */

  .container,
  .page-container,
  .content-container,
  .main-container,
  .book-class-page,
  .book-class-wrapper,
  .book-class-container,
  .booking-page,
  .booking-wrapper,
  .booking-container,
  .offline-booking,
  .class-booking {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Typography */

  h1 {
    font-size: clamp(27px, 8vw, 36px) !important;
    line-height: 1.15 !important;
    max-width: 100%;
  }

  h2 {
    font-size: clamp(23px, 6.5vw, 30px) !important;
    line-height: 1.2 !important;
  }

  h3 {
    font-size: 20px !important;
    line-height: 1.25 !important;
  }

  p {
    line-height: 1.55;
  }

  /* All common desktop rows become columns */

  .row,
  .form-row,
  .hero-row,
  .two-column,
  .two-col,
  .columns {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 14px !important;
  }

  /* Grid */

  .grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .booking-grid,
  .class-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 14px !important;
  }

  /* Columns */

  .col,
  [class*="col-"],
  .left-column,
  .right-column,
  .form-column {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* Booking cards */

  .booking-card,
  .booking-panel,
  .booking-form,
  .book-class-form,
  .class-booking-form,
  .form-card,
  .summary-card,
  .class-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .booking-card,
  .booking-panel,
  .form-card {
    padding: 16px !important;
  }

  /* Form */

  form {
    width: 100% !important;
    max-width: 100% !important;
  }

  form > * {
    max-width: 100% !important;
  }

  label {
    width: 100% !important;
    margin-bottom: 5px;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 12px !important;
  }

  textarea {
    min-height: 110px !important;
  }

  /* Buttons */

  button,
  .btn,
  form button,
  form input[type="submit"],
  .booking-form button,
  .book-class-form button {
    min-height: 48px !important;
  }

  form button[type="submit"],
  form input[type="submit"],
  .booking-form .btn-primary,
  .book-class-form .btn-primary {
    width: 100% !important;
  }

  /* Cards */

  .card,
  .feature-card,
  .course-card,
  .class-card,
  .service-card,
  .booking-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Images */

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Header */

  header {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
  }

  nav {
    max-width: 100%;
  }

  /* Tables */

  .table-responsive,
  .table-wrap,
  .responsive-table,
  .overflow-table {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
  }

  /* Modal */

  .modal,
  .modal-dialog,
  .modal-content {
    max-width: calc(100vw - 20px) !important;
  }

  /* Long text */

  a,
  p,
  span,
  label,
  td,
  th {
    overflow-wrap: anywhere;
  }

  /* Remove common fixed widths */

  [style*="width: 1200px"],
  [style*="width:1200px"],
  [style*="width: 1100px"],
  [style*="width:1100px"],
  [style*="width: 1000px"],
  [style*="width:1000px"],
  [style*="min-width: 1000px"],
  [style*="min-width:1000px"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Horizontal safety */

  section,
  main,
  article,
  aside,
  footer {
    max-width: 100% !important;
    overflow-x: hidden;
  }

}

/* ----------------------------------------------------------
   SMALL PHONES
---------------------------------------------------------- */

@media (max-width: 380px) {

  .container,
  .page-container,
  .content-container,
  .main-container,
  .book-class-page,
  .book-class-wrapper,
  .booking-page,
  .booking-wrapper,
  .booking-container {
    padding-left: 11px !important;
    padding-right: 11px !important;
  }

  h1 {
    font-size: 26px !important;
  }

  h2 {
    font-size: 22px !important;
  }

  .booking-card,
  .booking-panel,
  .form-card {
    padding: 13px !important;
  }
}
