/**
 * Custom Buy X Get Y Auto Add Variant - Modal Styles
 *
 * @package Custom_BXGY_Auto_Add_Variant
 * @version 1.0.0
 */

.woocommerce-cart table.cart .product-name .product-delete {
  display: none !important;
}

.woocommerce-cart dl.variation {
  margin-bottom: 0;
}

.awdr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.awdr-modal-content {
  background: #fff;
  padding: 0;
  border-radius: 8px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.awdr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.awdr-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.awdr-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  color: #6b7280;
  transition: color 0.2s;
}

.awdr-modal-close:hover {
  color: #111827;
}

.awdr-select-variant-product {
  padding: 1rem;
  max-height: calc(80vh - 80px);
  overflow-y: auto;
  display: block;
}

.awdr_free_product_variants {
  margin-bottom: 0.5rem;
}

.awdr_change_product {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.awdr_change_product:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.awdr_variation_image {
  flex-shrink: 0;
  margin-right: 1rem;
  width: 50px;
  height: 50px;
}

.awdr_variation_image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.awdr-product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.awdr-product-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: #111827;
  line-height: 1.25;
}

.awdr-product-attributes {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.25;
}

.awdr-product-price {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.awdr-price-original {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: line-through;
}

.awdr-price-discounted {
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
}

.awdr-price-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #10b981;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.awdr-price-free {
  font-size: 0.875rem;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
}

.awdr-radio-wrapper {
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.awdr-radio-wrapper input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  cursor: pointer;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
  .awdr-modal-content {
    max-width: 100%;
    max-height: 90vh;
  }

  .awdr-modal-header {
    padding: 1rem;
  }

  .awdr_change_product {
    padding: 0.5rem;
  }
}

.woocommerce-cart table.cart .product-name .product-delete {
  display: none !important;
}

.woocommerce-cart dl.variation {
  margin-bottom: 0;
}

.woocommerce-cart .awdr-select-free-variant-product-toggle {
  justify-content: left;
  position: relative;
  background: #f8f8f8;
  padding: 8.5px 8px;
  border-radius: 4px;
  border: 1px solid var(--Low-Grey, #e4e4e4);
}

.woocommerce-cart .awdr-select-free-variant-product-toggle:focus {
  color: #444;
}

.woocommerce-cart .awdr_change_product {
  height: auto;
}
.woocommerce-cart .awdr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  z-index: 9999;
  padding: 0 !important;
}

.woocommerce-cart .awdr-select-variant-product {
  padding: 0 16px;
  max-height: calc(40vh - 80px);
  overflow-y: auto;
  display: block;
}

.woocommerce-cart .awdr-modal-header h3 {
  font-size: 13px !important;
  font-weight: 600 !importatn;
}

.woocommerce-cart .awdr-product-name {
  padding-left: 0;
  font-size: 12px;
  font-weight: 500;
  color: #40484f;
}

.woocommerce-cart .awdr-product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.woocommerce-cart .awdr-product-attributes {
  font-size: 11px;
  color: #8f9aa3;
  line-height: 1.25;
  font-weight: 500;
}

.woocommerce-cart .awdr-modal-content {
  max-height: 40vh;
  position: absolute;
  max-width: 100vw;
  border-radius: 8px 8px 0 0;
  bottom: 0;
}

.woocommerce-cart .awdr-price-original,
.woocommerce-cart .awdr-price-badge {
  display: none;
}
.woocommerce-cart .awdr-product-price {
  margin-top: 0 !important;
}

.woocommerce-cart .awdr-modal-content .woocommerce-Price-amount.amount {
  font-size: 11px;
  font-weight: 500;
  color: #40484f;
}

@media (min-width: 768px) {
  .woocommerce-cart .awdr-select-variant-product {
    padding: 0 16px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    display: block;
  }

  .woocommerce-cart .awdr-modal-content {
    max-height: 80vh !important;
    bottom: auto !important;
    max-width: 500px;
    border-radius: 8px;
  }
}

.woocommerce-cart .awdr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 16px 16px 8px 16px;
  border-bottom: none !important;
}

.woocommerce-cart .awdr-modal-close {
  display: none;
}

.woocommerce-cart .awdr_free_product_text {
  display: inline-block;
  padding: 0px 10px;
  background-color: #dae6fb;
  color: #40484f;
  border-radius: 3px;
}

// newer version
.woocommerce-cart table.cart .product-name .product-delete {
  display: none !important;
}

.woocommerce-cart dl.variation {
  margin-bottom: 0;
}

.woocommerce-cart .awdr-select-free-variant-product-toggle {
  justify-content: left;
  position: relative;
  background: #f8f8f8;
  padding: 8.5px 8px;
  border-radius: 4px;
  border: 1px solid var(--Low-Grey, #e4e4e4);
}

.woocommerce-cart .awdr-select-free-variant-product-toggle:after {
  content: var(--awdr-chevron-icon);
  font-size: 12px;
  color: #777;
  margin-left: 10px;
  position: absolute;
  right: 8px;
  top: 10px;
}

.woocommerce-cart .awdr_change_product {
  height: auto;
}
.woocommerce-cart .awdr-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  z-index: 9999;
  padding: 0 !important;
}

.woocommerce-cart .awdr-select-variant-product {
  padding: 0 16px;
  max-height: calc(40vh - 80px);
  overflow-y: auto;
  display: block;
}

.woocommerce-cart .awdr-modal-header h3 {
  font-size: 13px !important;
  font-weight: 600 !importatn;
}

.woocommerce-cart .awdr-product-name {
  padding-left: 0;
  font-size: 12px;
  font-weight: 500;
  color: #40484f;
}

.woocommerce-cart .awdr-product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.woocommerce-cart .awdr-product-attributes {
  font-size: 11px;
  color: #8f9aa3;
  line-height: 1.25;
  font-weight: 500;
}

.woocommerce-cart .awdr-modal-content {
  max-height: 40vh;
  position: absolute;
  max-width: 100vw;
  border-radius: 8px 8px 0 0;
  bottom: 0;
}

.woocommerce-cart .awdr-price-original,
.woocommerce-cart .awdr-price-badge {
  display: none;
}
.woocommerce-cart .awdr-product-price {
  margin-top: 0 !important;
}

.woocommerce-cart .awdr-modal-content .woocommerce-Price-amount.amount {
  font-size: 11px;
  font-weight: 500;
  color: #40484f;
}

@media (min-width: 768px) {
  .woocommerce-cart .awdr-select-variant-product {
    padding: 0 16px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
    display: block;
  }

  .woocommerce-cart .awdr-modal-content {
    max-height: 80vh !important;
    bottom: auto !important;
    max-width: 500px;
    border-radius: 8px;
  }
}

.woocommerce-cart .awdr-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 16px 16px 8px 16px;
  border-bottom: none !important;
}

.woocommerce-cart .awdr-modal-close {
  display: none;
}

.woocommerce-cart .awdr_free_product_text {
  display: inline-block;
  padding: 0px 10px;
  background-color: #dae6fb;
  color: #40484f;
  border-radius: 3px;
}
