/* Theme integration - CSS custom properties for easy customization */
:root {
  --sticky-atc-bg: #ffffff;
  --sticky-atc-border: #e0e0e0;
  --sticky-atc-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  --sticky-atc-button-bg: #c72c41;
  --sticky-atc-button-color: #ffffff;
  --sticky-atc-button-hover-bg: #a12233;
  --sticky-atc-button-disabled-bg: #6c757d;
  --sticky-atc-quantity-bg: #f8f9fa;
  --sticky-atc-quantity-border: #e9ecef;
  --sticky-atc-quantity-button-hover-bg: #e9ecef;
  --sticky-atc-quantity-text-color: #212529;
}

.custom-sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  z-index: 10;
  transform: translateY(100%);
  transition: visibility 0.2s ease-in-out, opacity 0.2s ease-in-out;
  padding: 0;
  margin: 0 !important;
  opacity: 0;
  visibility: hidden;
}

.custom-sticky-atc.show {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.custom-sticky-atc__container {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) 0.1s,
    opacity 0.2s ease 0.1s;
}

.custom-sticky-atc.show .custom-sticky-atc__container {
  transform: translateY(0);
  opacity: 1;
}

.custom-sticky-atc__cart-form {
  width: 100%;
}

@media (min-width: 768px) {
  .custom-sticky-atc__cart-form {
    max-width: 500px;
  }
}

.custom-sticky-atc__cart-form .cart {
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin: 0 !important;
  padding: 8px;
  background: #ffffff;
}

.custom-sticky-atc__quantity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.custom-sticky-atc__quantity-label {
  color: #333;
  font-weight: 400;
  font-size: 12px;
  line-height: 140%;
  letter-spacing: 0.25px;
}

.custom-sticky-atc__quantity-wrapper {
  flex-shrink: 0;
}

.custom-sticky-atc__quantity-row:has(.quantity.hidden) {
  display: none;
}

.custom-sticky-atc__quantity-wrapper .quantity {
  margin: 0 !important;
  display: flex;
  align-items: stretch;
  padding: 2px !important;
}

.custom-sticky-atc__quantity-wrapper .quantity.hidden {
  display: none !important;
}

/* Quantity Input Plus/Minus Styling */
.custom-sticky-atc__quantity-wrapper .qib-container {
  display: flex !important;
  border: 1px solid #f1f1f1;
  border-radius: 24px;
  overflow: hidden;
  background: transparent;
  margin: 0 !important;
}

.custom-sticky-atc__quantity-wrapper .qib-container button.qib-button {
  background: transparent;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #495057;
  min-width: 40px;
}

.custom-sticky-atc__quantity-wrapper .qib-container button.qib-button:hover {
  background: #e9ecef;
  color: #212529;
}

.custom-sticky-atc__quantity-wrapper .qib-container .quantity input.qty {
  border: none;
  text-align: center;
  width: 50px;
  padding: 0;
  margin: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  outline: none;
}

.custom-sticky-atc__quantity-wrapper .quantity:not(.qib-container) input.qty {
  border: none;
  text-align: center;
  width: 60px;
  padding: 8px;
  margin: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  outline: none;
  height: 40px;
  border-radius: 6px;
}

/* Add to Cart Button */
.custom-sticky-atc__button {
  width: 100% !important;
  background: #c72c41;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: none;
  letter-spacing: normal;
  border: 1px solid #c72c41;
  padding: 12px 20px;
  margin-top: 4px !important;
}

@media (min-width: 768px) {
  .custom-sticky-atc__button {
    font-size: 16px;
  }
}

.custom-sticky-atc__button:hover {
  background: #a12233;
  border-color: #a12233;
}

.custom-sticky-atc__button:disabled,
.custom-sticky-atc__button.wc-variation-selection-needed {
  background: #6c757d;
  border-color: #6c757d;
  cursor: not-allowed;
}

.custom-sticky-atc__button:disabled:hover,
.custom-sticky-atc__button.wc-variation-selection-needed:hover {
  background: #6c757d;
  border-color: #6c757d;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .custom-sticky-atc__container {
    justify-content: flex-end;
  }

  .custom-sticky-atc__quantity-wrapper .qib-container {
    min-width: 120px;
  }
}

/* Notice styles for variant selection */
.custom-variant-notice {
  padding: 4px 8px !important;
}

.custom-variant-notice .ic-info {
  color: #a91d3a;
  font-size: 14px;
}

.custom-variant-notice .content-wrapper {
  font-size: 12px;
}

.custom-sticky-atc__button {
  background: var(--sticky-atc-button-bg);
  color: var(--sticky-atc-button-color);
  border-color: var(--sticky-atc-button-bg);
}

.custom-sticky-atc__button:hover {
  background: var(--sticky-atc-button-hover-bg);
  border-color: var(--sticky-atc-button-hover-bg);
}

.custom-sticky-atc__button:disabled,
.custom-sticky-atc__button.wc-variation-selection-needed {
  background: var(--sticky-atc-button-disabled-bg);
  border-color: var(--sticky-atc-button-disabled-bg);
}

.custom-sticky-atc__quantity-wrapper .qib-container button.qib-button:hover {
  background: var(--sticky-atc-quantity-button-hover-bg);
}

.custom-sticky-atc__quantity-wrapper .qib-container button.qib-button,
.custom-sticky-atc__quantity-wrapper .qib-container .quantity input.qty,
.custom-sticky-atc__quantity-wrapper .quantity:not(.qib-container) input.qty {
  color: var(--sticky-atc-quantity-text-color);
}
