/**
 * Frontend styles for Variantic integration
 */

/* Viewer container */
.variantic-viewer-container {
  margin: 4em 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  height: 600px;
  position: relative;
}

/* Ensure the player takes full height and width of its container */
.variantic-viewer-container variantic-player {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 500px;
  overflow: hidden;
}

/* Loading overlay */
.variantic-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.variantic-loading-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  animation: variantic-spin 1.5s linear infinite;
  margin-bottom: 10px;
}

.variantic-loading-text {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

@keyframes variantic-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* When used as gallery replacement */
.variantic-as-gallery {
  width: 100%;
  position: relative;
}

/* Add to cart button for configured products */
.variantic-add-to-cart {
  margin-top: 2.5em;
  margin-bottom: 3em;
  text-align: center;
}

.variantic-quantity-button-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}
@media (max-width: 767px) {
  .variantic-quantity-button-wrapper {
    flex-direction: column;
    gap: 0;
  }
}

.variantic-quantity-button-wrapper .quantity {
  margin: 0;
  flex-shrink: 0;
  display: flex;
}

.variantic-quantity-button-wrapper .quantity input {
  width: 45px;
  height: 45px;
  padding: 0 5px 4px;
  border: 1px solid #ddd;
  color: #000;
  border-radius: 3px;
  background-color: #fff;
  box-shadow: none;
  font-size: 16px;
  text-align: center;
  margin: 0;
}

.variantic-add-configured-to-cart {
  background: #333;
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  height: auto;
  line-height: normal;
  padding: 15px 40px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-family: inherit;
  font-size: 14px;
  margin: 0;
  white-space: nowrap;
}

.variantic-add-configured-to-cart:hover {
  background: #000;
  color: #fff;
}

.variantic-add-configured-to-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading button state */
.variantic-btn-loading {
  /* position: relative; */
  pointer-events: none;
  opacity: 0.7;
  line-height: 25px!important;
}

.variantic-btn-loading:before {
  /* content: '';
  position: absolute;
  left: 10px;
  top: 34%!important;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: variantic-spin 1s infinite linear; */
  content: '';
  background: url('/wp-content/uploads/2026/03/preloader.gif');
  display: inline-block;
  width: 30px;
  height: 30px;
  margin-right: 20px;
  vertical-align: middle;
  margin-top: -2px;
  margin-bottom: -2px;
  background-size: contain;
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7487%) hue-rotate(217deg) brightness(107%) contrast(103%);
}

/* Messages container */
.variantic-messages {
  margin: 1em 0;
  padding: 1em;
  border-radius: 3px;
  padding-left: 3em;
}

/* Custom tab styling */
.woocommerce-Tabs-panel--variantic_viewer {
  padding: 1em 0;
}

/* Configuration details in cart/email */
.variantic-configuration-details {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.variantic-configuration-details p {
  margin: 0 0 5px 0;
}

.variantic-configuration-details p:last-child {
  margin-bottom: 0;
}

.variantic-configuration-details a {
  color: #2271b1;
  text-decoration: none;
  font-weight: 500;
}

.variantic-configuration-details a:hover {
  text-decoration: underline;
}

/* Admin Order Table Style */
.variantic-admin-info {
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #2271b1;
}

.variantic-admin-info p {
  margin: 3px 0;
  font-size: 13px;
}

/* Snapshot styling */
.variantic-snapshot {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .variantic-viewer-container {
      height: 450px;
  }
}

@media screen and (max-width: 480px) {
  .variantic-viewer-container {
      height: 350px;
  }
}

#direct-add-configured-button{
  background: #333;
  margin-top: 20px;
  margin-bottom: 20px;
  padding-left: 40px!important;
  padding-right: 40px!important;
  padding-top: 15px!important;
  padding-bottom: 15px!important;
}
#direct-add-configured-button:hover{
  background: #000;
}

/* Custom */
body.woocommerce-order-received dl.variation dt.variation-WersjaBiblioteki,
body.woocommerce-order-received dl.variation dd.variation-WersjaBiblioteki,
body.woocommerce-order-received dl.variation dt.variation-wersja-biblioteki,
body.woocommerce-order-received dl.variation dd.variation-wersja-biblioteki,
body.woocommerce-order-received dl.variation dt.variation-LibraryVersion,
body.woocommerce-order-received dl.variation dd.variation-LibraryVersion {
  display: none !important;
}

/* body.variantic-product.variantic-configurable div[data-elementor-type="product"]{
  display: none;
} */
