/* 
 * 2025 Addify
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to http://www.prestashop.com for more information.
 *
 *  Author: Addify
 *  Copyright: 2025 Addify
 *  License: http://opensource.org/licenses/afl-3.0.php
 */

/* Table Preview Styling */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  margin-bottom: 0;
}

.custom-table th,
.custom-table td {
  padding: 10px;
  border: none;
}

@media (max-width: 576px) {
  .custom-table th,
  .custom-table td {
    padding: 8px;
    font-size: 14px;
    white-space: nowrap;
  }
}

/* List */
.addify-prv-main-cont {
  max-width: 600px;
  margin: 1rem auto;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem;
  background-color: #fff;
  position: relative;
}

.addify-preview-lbl {
  position: absolute;
  top: -14px;
  left: 15px;
  background-color: #fff;
  padding: 0 8px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.addify-bmsm-prv-cont {
  padding-top: 0.5rem;
}

.addify-preview-custom-radio label {
  display: block;
  text-align: left;
  margin-bottom: 0.75rem;
  font-size: 15px;
  color: #333;
  cursor: pointer;
}

.addify-preview-custom-radio input[type="radio"] {
  margin-right: 2px;
  vertical-align: middle;
}

.addify-list-perc {
  font-weight: 600;
  color: lab(75.71% -73.68 63.38);
  margin: 0 4px;
}

.addify-bmsm-list-new-price {
  font-weight: bold;
  margin-left: 6px;
}

.bmsm-list-tag {
  display: inline-block;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: white;
  font-size: 10px;
  font-weight: 500;
  clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
  padding: 0px 4px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .addify-prv-main-cont {
    padding: 1rem;
  }

  .addify-preview-custom-radio label {
    font-size: 14px;
  }

  .addify-preview-lbl {
    font-size: 13px;
  }
}

/* Grid */
.addify-prv-main-cont {
  max-width: 700px;
  margin: 1rem auto;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 1rem;
  background-color: #fff;
  position: relative;
}

.addify-bmsm-preview-lbl {
  position: absolute;
  top: -14px;
  left: 15px;
  background-color: #fff;
  padding: 0 8px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.addify-bmsm-prv-cont {
  padding-top: 0.5rem;
}

.addify-bmms-grid-main-con {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: start;
}

.addify-bmsm-grid-sec-con {
  position: relative;
  border: 1px solid #e0e0e0;
  border: none;
  border-radius: 6px;
  padding: 1rem;
  width: 180px;
  text-align: center;
  transition: 0.3s ease;
  overflow: hidden;
}

.addify-bmsm-grid-per-cor {
  font-weight: bold;
  font-size: 16px;
  padding: 2px 6px;
  border: none;
  border-radius: 12px;
  margin: 4px 0;
  display: inline-block;
}

.addify-bmms-grid-inner_main {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
}

.addify-bmsm-grid-inner {
  display: block;
}

.addify-bmms-grid-inner-new-price {
  font-weight: bold;
}

.addify-bmsm-cd-img-old-pr {
  display: block;
  font-size: 13px;
  text-decoration: line-through;
  color: #999;
  margin-top: 2px;
}

.bmsm-grid-tag {
  position: absolute;
  top: 0px;
  right: 0px;
  display: inline-block;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: white;
  font-size: 10px;
  font-weight: 600;
  clip-path: polygon(5% 0%, 100% 0%, 100% 100%, 5% 100%, 0% 50%);
  padding: 2px 8px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 10;
}

@media (max-width: 576px) {
  .addify-bmsm-grid-sec-con {
    width: 100%;
  }
}

/* Card */
.addify-card-prv-main-cont {
  max-width: 800px;
  margin: 1rem auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  background-color: #fff;
  position: relative;
}

.addify-card-preview-lbl {
  position: absolute;
  top: -14px;
  left: 15px;
  background-color: #fff;
  padding: 0 8px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.addify-card-style-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.addify-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1rem;
  background-color: #fff;
  position: relative;
}

.addify-card-badge {
  position: absolute;
  top: 0px;
  right: 0px;
  background-image: linear-gradient(135deg, #ff6a00, #ee0979);
  border: 2px solid rgb(196, 178, 174);
  font-weight: bold;
  padding: 0px 8px;
  border-radius: 50px;
  line-height: 1;
}

.bmsm-card-tag {
  position: absolute;
  top: -8px;
  right: 30%;
  display: inline-block;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: white;
  font-size: 10px;
  font-weight: 600;
  clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
  padding: 2px 8px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 10;
}

.addify-card-left {
  flex-grow: 1;
  text-align: left;
}

.addify-card-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.addify-card-sub {
  text-align: right;
  min-width: 160px;
}

.addify-card-prices {
  display: block;
  margin-bottom: 4px;
}

.addify-card-new-price {
  font-weight: bold;
  margin-right: 6px;
}

.addify-card-old-price {
  font-size: 13px;
  color: #888;
  text-decoration: line-through;
}

.addify-card-total-label {
  font-weight: 500;
  margin-right: 4px;
}

.addify-card-total-price {
  font-weight: bold;
  margin-right: 6px;
}

@media (max-width: 576px) {
  .addify-card-item {
    flex-direction: column;
    align-items: flex-start;
    padding-right: 3rem;
  }

  .addify-card-sub {
    text-align: left;
    margin-top: 0.5rem;
  }
}

/* Card Image */
.addify-cimg-preview-container {
  max-width: 800px;
  margin: 1rem auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  background-color: #fff;
  position: relative;
}

.addify-cimg-preview-label {
  position: absolute;
  top: -14px;
  left: 15px;
  background: #fff;
  padding: 0 8px;
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

.addify-cimg-preview-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.addify-cimg-item {
  position: relative;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1rem;
  background-color: #fafafa;
}

.addify-cimg-item-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 0.5rem;
}

.addify-cimg-old-total {
  text-decoration: line-through;
  color: #999;
  margin-left: 8px;
}

.addify-cimg-item-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.addify-cimg-qty-label {
  font-weight: 500;
}

.addify-cimg-price-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.addify-cimg-old-price {
  text-decoration: line-through;
  color: #999;
}

.addify-cimg-new-price {
  font-weight: bold;
}

.bmsm-cimg-tag {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-block;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: white;
  font-size: 10px;
  font-weight: 600;
  clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
  padding: 2px 8px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 10;
}

/* Card Template 1 */
.addify-crd1-main-wrapper {
  max-width: 700px;
  margin: 1rem auto;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 8px;
  background: #fff;
  position: relative;
}

.addify-crd1-radio-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.addify-crd1-radio-wrapper {
  position: relative;
}

.addify-crd1-radio-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fdfdfd;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}

.addify-crd1-radio-option:hover {
  background: #f9f9f9;
}

.addify-crd1-radio-input {
  pointer-events: none;
}

.addify-crd1-label-content {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #333;
}

.addify-crd1-price-group {
  display: flex;
  gap: 0.5rem;
  font-size: 14px;
}

.addify-crd1-original-price {
  text-decoration: line-through;
  color: #999;
}

.addify-crd1-discounted-price {
  color: green;
  font-weight: bold;
}

.bmsm-crd1-tag {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-block;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: white;
  font-size: 10px;
  font-weight: 600;
  clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
  padding: 4px 10px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 10;
  border-top-right-radius: 8px;
}

/* Card Template 2 */
.addify-crd2-main-wrapper {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  max-width: 700px;
  background: #fff;
  margin: 1rem auto;
  position: relative;
}

.addify-crd2-preview-label {
  position: absolute;
  top: -12px;
  left: 15px;
  background: #fff;
  padding: 0 8px;
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

.addify-crd2-radio-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.addify-crd2-card-wrapper {
  position: relative;
}

.addify-crd2-card-option {
  padding: 1rem;
  border: 1px solid #e1e1e1;
  border-radius: 6px;
  background-color: #f9f9f9;
  transition: background 0.2s ease;
}

.addify-crd2-card-option:hover {
  background-color: #f1f1f1;
}

.addify-crd2-label-block {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.addify-crd2-price-block {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
  font-size: 14px;
}

.addify-crd2-original-price {
  text-decoration: line-through;
  color: #999;
}

.addify-crd2-discounted-price {
  font-weight: bold;
  color: green;
}

.bmsm-crd2-tag {
  position: absolute;
  top: 1px;
  right: -10%;
  transform: translateX(-50%);
  display: inline-block;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  clip-path: polygon(5% 0%, 95% 0%, 100% 50%, 95% 100%, 5% 100%, 0% 50%);
  padding: 2px 8px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 10;
}

/* Card Template 3 */
.addify-crd3-main-wrapper {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background-color: #fff;
  max-width: 700px;
  margin: 1rem auto;
  position: relative;
}

.addify-crd3-preview-label {
  position: absolute;
  top: -14px;
  left: 15px;
  background: #fff;
  padding: 0 8px;
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

.addify-crd3-style-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.addify-crd3-card-wrapper {
  position: relative;
}

.addify-crd3-card {
  display: flex;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  overflow: hidden;
  background: #f9f9f9;
  position: relative;
}

.addify-crd3-card-left {
  color: white;
  text-align: center;
  padding: 1rem;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.addify-crd3-discount-badge span:first-child {
  font-size: 20px;
}

.addify-crd3-card-right {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: 14px;
  color: #333;
}

.addify-crd3-original-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 8px;
}

.addify-crd3-discounted-price {
  font-weight: bold;
  color: green;
}

.bmsm-crd3-tag {
  position: absolute;
  top: 1px;
  right: -5px;
  background: linear-gradient(135deg, #ff6a00, #ee0979);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  line-height: 1.2;
  clip-path: polygon(5% 0%, 95% 0%, 95% 100%, 5% 100%, 0% 50%);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 5;
}

/* universal classes for all  */
.bmsm-top-container {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bmsm-top-icon {
  /* height: 35px;
  width: 35px; */
  height: 50px;
  width: 50px;
  border-radius: 10px;
  object-fit: cover;
}

.bmsm-table-tier-tag {
  white-space: nowrap;
  display: inline-block;
  background: #ff5e57;
  color: white;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Product price overrides when tier is active */
.product-prices.bmsm-tier-active .current-price:not(.bmsm-active-price),
.product-prices.bmsm-tier-active .product-discount,
.product-prices.bmsm-tier-active .tax-shipping-delivery-label,
.product-prices.bmsm-tier-active .regular-price {
  display: none !important;
}

.bmsm-active-price {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.bmsm-original-price {
  font-size: 16px;
  color: #7a7a7a;
  display: block;
  margin-right: 0.625rem;
  font-weight: 500;
}

.bmsm-original-price del {
  text-decoration: line-through;
}

.bmsm-active-price-row {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.bmsm-active-price .current-price-value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 0.625rem;
  /* color removed to inherit default theme color */
}

.bmsm-active-price-badge {
  display: inline-block;
  padding: 0.3125rem 0.625rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  background: #f39d72;
}
/* Utility to hide elements during initial load/move to prevent flicker */
.bmsm-init-hidden {
  display: none !important;
}
