/***
 *
 * Tokoo WooCommerce Product Button Styles
 * Frontend styles untuk product button block component
 *
*/

/**
 * Product Button Container
 */
.wp-block-button.wc-block-components-product-button {
  gap: 0;
}

/**
 * Product Button with Cart Icon
 */
.wp-block-button.wc-block-components-product-button.tokoo-product-button--has-icon
  .wc-block-components-product-button__button.tokoo-cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45em;
}

/**
 * Cart Icon Styling
 */
.wp-block-button.wc-block-components-product-button .tokoo-cart-icon {
  display: inline-flex;
  width: 1.1em;
  height: 1.1em;
  line-height: 1;
  flex-shrink: 0;
  color: currentColor;
}

.wp-block-button.wc-block-components-product-button .tokoo-cart-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/**
 * Icon-Only Button Styling
 */
.wp-block-button.wc-block-components-product-button.tokoo-product-button--icon-only
  .wc-block-components-product-button__button.tokoo-cart-button--icon-only {
  font-size: 0 !important;
  line-height: 1;
  text-indent: 0;
  width: var(--tokoo-product-button-size, 44px);
  height: var(--tokoo-product-button-size, 44px);
  min-width: var(--tokoo-product-button-size, 44px);
  min-height: var(--tokoo-product-button-size, 44px);
  aspect-ratio: 1 / 1;
  padding: 0 !important;
  overflow: visible;
}

.wp-block-button.wc-block-components-product-button.tokoo-product-button--icon-only
  .wc-block-components-product-button__button.tokoo-cart-button--icon-only
  .wc-block-components-product-button__text {
  display: none !important;
}

.wp-block-button.wc-block-components-product-button.tokoo-product-button--icon-only
  .wc-block-components-product-button__button.tokoo-cart-button--icon-only
  .tokoo-cart-icon {
  font-size: 16px;
}

.wp-block-button.wc-block-components-product-button.tokoo-product-button--icon-only
  .wc-block-components-product-button__button.tokoo-cart-button--icon-only {
  position: relative;
}

.wp-block-button.wc-block-components-product-button.tokoo-product-button--icon-only {
  overflow: visible;
}

/**
 * Cart Count Badge
 */
.wp-block-button.wc-block-components-product-button.tokoo-product-button--icon-only
  .wc-block-components-product-button__button.tokoo-cart-button--icon-only
  .tokoo-cart-count {
  display: none;
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background-color: var(--wp--preset--color--accent, #ef4444);
  color: #fff;
  border: 1px solid #fff;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 14px;
  pointer-events: none;
}

.wp-block-button.wc-block-components-product-button.tokoo-product-button--icon-only
  .wc-block-components-product-button__button.tokoo-cart-button--icon-only.tokoo-cart-button--has-count
  .tokoo-cart-count {
  display: block;
}

/**
 * Circular Button
 */
.wp-block-button.wc-block-components-product-button.tokoo-product-button--circle
  .wc-block-components-product-button__button.tokoo-cart-button {
  border-radius: 999px !important;
}

/**
 * Responsive: Small screens
 */
@media screen and (max-width: 450px) {
  .loopz
    .wp-block-button.wc-block-components-product-button
    .wc-block-components-product-button__button::before {
    font-size: 13px !important;
  }
}
