/* Responsive CSS for Moon Plugin */

/* Slider Base Styles */
.slick-slider {
  position: relative;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.slick-list {
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.slick-track {
  display: flex;
  align-items: center;
}

/* Navigation arrows base styles */
.slick-prev,
.slick-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.slick-prev:hover,
.slick-next:hover {
  background: #f3f4f6;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.slick-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Large screens (above 1200px) */
@media screen and (min-width: 1201px) {
  .mpc-container-v3 {
    padding: 0 3rem;
    grid-template-columns: 550px 0.75fr;
  }

  .mpc-configurator {
    width: 450px;
  }

  .mpc-canvas {
    width: 350px;
  }

  .mpc-canvas.design-you-me {
    width: 470px;
  }

  .mpc-canvas.design-journey {
    width: 500px;
  }

  /* Preview slider for large screens */
  .mpc-preview-slider {
    max-width: 470px;
  }

  .mpc-preview-slider .slick-prev {
    left: -100px;
  }

  .mpc-preview-slider .slick-next {
    right: -100px;
  }

  /* Product slider
    #mpc-product-selector {
        padding: 0 40px;
    } */

  .mpc-product-item-wrapper {
    flex-basis: 80px;
  }

  .mpc-option-box.finalise {
    width: 70px;
    height: 70px;
  }
}

/* Medium screens (between 992px and 1200px) */
@media screen and (max-width: 1200px) {
  .mpc-container-v3 {
    padding: 0 2rem;
    grid-template-columns: 450px 1fr;
    gap: 1.5rem;
  }

  .mpc-configurator {
    width: 400px;
  }

  .mpc-canvas {
    width: 300px;
  }

  .mpc-canvas.design-you-me {
    width: 400px;
  }

  .mpc-canvas.design-journey {
    width: 420px;
  }

  /* Preview slider adjustments */
  .mpc-preview-slider {
    max-width: 400px;
    margin: 0 auto;
  }

  .mpc-preview-slider .slick-prev {
    left: -50px;
    width: 35px;
    height: 35px;
  }

  .mpc-preview-slider .slick-next {
    right: -50px;
    width: 35px;
    height: 35px;
  }

  /* Product slider adjustments */
  #mpc-product-selector {
    padding: 0 30px;
  }

  .mpc-product-item-wrapper {
    flex-basis: 70px;
  }

  /* Preview navigation thumbnails */
  .mpc-preview-nav {
    max-width: 400px;
    margin: 0 auto;
  }
}

/* Tablet screens (between 768px and 991px) */
@media screen and (max-width: 991px) {
  .mpc-container-v3 {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .mpc-configurator {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .mpc-canvas {
    width: 280px;
    margin: 0 auto;
  }

  .mpc-canvas.design-you-me,
  .mpc-canvas.design-journey {
    width: 380px;
  }

  /* Cart page responsive */
  .woocommerce-cart .woocommerce {
    flex-direction: column;
  }

  .cart-collaterals {
    width: 100% !important;
    padding-left: 0 !important;
    margin-top: 2rem;
  }

  .col.large-7.pb-0 {
    padding-right: 0 !important;
  }

  /* Checkout page responsive */
  .woocommerce .col2-set {
    flex-direction: column;
  }

  #order_review {
    width: 100% !important;
    margin-top: 2rem;
  }

  .mpc-moon-selector span {
    font-size: 0.5rem;
  }
  .mpc-secondary-btn {
    padding: 0.5rem;
  }
}

/* Touch-friendly tap targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .slick-prev,
  .slick-next {
    padding: 12px;
  }

  .mpc-preview-slider .slick-prev,
  .mpc-preview-slider .slick-next {
    background: rgba(255, 255, 255, 0.9);
  }
}

/* Mobile screens (between 576px and 767px) */
@media screen and (max-width: 767px) {
  .mpc-container-v3 {
    padding: 0 0.5rem;
  }

  .mpc-configurator {
    max-width: 100%;
  }

  /* Tab improvements for mobile */
  .mpc-steps {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .mpc-step {
    flex: 1;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
    text-align: center;
    border-radius: 8px;
    margin: 0;
  }

  .mpc-step.active {
    margin: 0;
  }

  .mpc-canvas.design-you-me,
  .mpc-canvas.design-journey {
    width: 320px;
  }

  /* Form elements */
  .mpc-datetime-group {
    flex-direction: column;
    gap: 1rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.5rem 0.75rem;
  }

  /* Moon selectors */
  .mpc-moon-selectors {
    flex-wrap: wrap;
    justify-content: center;
  }

  .mpc-moon-selector {
    width: 50px;
    height: 50px;
  }

  /* Option boxes */
  .mpc-option-selector {
    justify-content: center;
  }

  .mpc-option-box.size-box {
    min-width: 90px;
    min-height: 90px;
  }

  /* Cart and checkout responsive adjustments */
  .coupon {
    flex-direction: column;
  }

  .coupon .button,
  .actions .button {
    width: 100% !important;
    margin-top: 0.5rem;
  }

  table.shop_table.cart td {
    padding: 0.5rem;
  }

  td.product-thumbnail img {
    width: 60px !important;
  }

  td.product-name a {
    font-size: 0.9rem;
  }

  /* Preview slider mobile adjustments */
  .mpc-preview-slider {
    max-width: 320px;
    margin: 0 auto 1rem;
  }

  .mpc-preview-slider .slick-prev {
    left: -30px;
    width: 25px;
    height: 25px;
  }

  .mpc-preview-slider .slick-next {
    right: -30px;
    width: 25px;
    height: 25px;
  }

  .slick-prev:before,
  .slick-next:before {
    font-size: 20px;
  }

  /* Product slider mobile adjustments */
  #mpc-product-selector {
    padding: 0 20px;
  }

  .mpc-product-item-wrapper {
    flex-basis: 60px;
  }

  .mpc-product-name {
    font-size: 10px;
  }

  /* Preview navigation thumbnails */
  .mpc-preview-nav {
    max-width: 320px;
  }

  .mpc-nav-item {
    margin: 0 3px;
  }
}

/* Small mobile screens (below 576px) */
@media screen and (max-width: 575px) {
  .mpc-container-v3 {
    padding: 0;
  }

  /* Improved tab layout for small screens */
  .mpc-steps {
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .mpc-step {
    padding: 0.625rem 0.25rem;
    font-size: 0.8125rem;
    margin: 0;
    min-width: 0;
    flex: 1;
  }

  .mpc-step:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .mpc-canvas.design-you-me,
  .mpc-canvas.design-journey {
    width: 300px;
  }

  /* Text size adjustments */
  .mpc-text-title {
    font-size: 0.625rem;
  }

  .mpc-text-details {
    font-size: 0.375em;
  }

  /* Moon preview adjustments */
  .mpc-moons-container[data-design="you-me"]
    .mpc-single-moon-preview
    .mpc-moon-image,
  .mpc-moons-container[data-design="journey"]
    .mpc-single-moon-preview
    .mpc-moon-image {
    width: 80%;
  }

  /* Cart table adjustments */
  table.shop_table.cart thead {
    display: none;
  }

  table.shop_table.cart td {
    display: block;
    text-align: right;
    border-bottom: none;
    padding: 0.25rem 0.5rem;
  }

  td.product-thumbnail {
    text-align: center;
  }

  td.product-thumbnail:before {
    display: none;
  }
}

/* Very small mobile screens (below 360px) */
@media screen and (max-width: 359px) {
  .mpc-canvas.design-you-me,
  .mpc-canvas.design-journey {
    width: 240px;
  }

  /* Ultra-compact tab styling */
  .mpc-steps {
    padding: 0.375rem;
    gap: 0.2rem;
  }

  .mpc-step {
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    margin: 0;
  }

  .mpc-option-box.size-box {
    min-width: 80px;
    min-height: 80px;
  }
}

/* Fix for iPad Pro and other larger tablets */
@media screen and (min-width: 992px) and (max-width: 1024px) {
  .mpc-container-v3 {
    grid-template-columns: 400px 1fr;
  }

  .mpc-configurator {
    width: 380px;
  }
}
@media screen and (max-width: 767px) {
  /* Cart Table Responsive */
  table.shop_table.cart,
  .woocommerce-cart .woocommerce {
    width: 100% !important;
    display: block;
    border: none;
    background: transparent;
  }
  table.shop_table.cart thead {
    display: none;
  }
  table.shop_table.cart tr,
  table.shop_table.cart td {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    border: none;
    padding: 0.5rem 0.75rem;
    background: none;
  }

  td.product-thumbnail {
    text-align: center;
    padding-bottom: 0.5rem;
  }
  td.product-thumbnail img {
    width: 70px !important;
    height: auto !important;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }
  td.product-name {
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 0.25rem;
    text-align: left;
  }
  .cart-collaterals,
  .woocommerce-cart .cart-collaterals {
    width: 100% !important;
    margin-top: 1.5rem;
    padding: 0 !important;
  }
  .actions .button,
  .coupon .button {
    width: 100% !important;
    margin-top: 0.5rem;
  }
  .woocommerce-cart .cart_totals {
    width: 100% !important;
    margin-top: 1.5rem;
  }
  .woocommerce-cart .cart_totals table {
    width: 100%;
  }
  .woocommerce-cart .cart_totals th,
  .woocommerce-cart .cart_totals td {
    text-align: left;
    font-size: 1rem;
    padding: 0.5rem 0.75rem;
  }
  /* Product Selector Responsive */
  #mpc-product-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0 10px;
  }
  .mpc-product-item-wrapper {
    min-width: 0;
    min-height: 80px;
    padding: 0.5rem 0.1rem 0.3rem 0.1rem;
    border-radius: 8px;
    font-size: 0.95rem;
  }
  .mpc-option-box.finalise {
    margin-bottom: 0.3rem;
  }
  .mpc-product-name {
    font-size: 0.85rem;
    margin-top: 0.1rem;
  }
}
@media screen and (max-width: 480px) {
  #mpc-product-selector {
    gap: 0.4rem;
    padding: 0 2px;
  }
  .mpc-product-item-wrapper {
    min-height: 60px;
    font-size: 0.85rem;
    padding: 0.3rem 0.05rem 0.2rem 0.05rem;
  }
  .mpc-product-name {
    font-size: 0.75rem;
  }
  .woocommerce.row.row-large.row-divided {
    margin: 0 !important;
  }
  .shop_table .product-remove a {
    right: 0;
    left: auto !important;
  }
  .continue-shopping.pull-left.text-left {
    width: 100%;
  }
  .coupon {
    padding: 1rem;
  }
  .wc-proceed-to-checkout a.checkout-button {
    font-size: 0.97em !important;
    padding: 0.5rem !important;
  }
  .mpc-option-box.finalise {
    height: 70px;
    width: 70px;
  }
}
