.swifch-order-received,
.swifch-place-order-wrapper {
    background: #fff;
    padding: clamp(25px, 4vw, 40px);
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Common Variables */

.swifch-container {
  --swifch-font-size: 14px;
  --swifch-color-text: #333333;
  --swifch-color-label: #666666;
  --swifch-color-primary: #0f0f11;
  --wift-checkout-color-border: s#eee;
  --swifch-color-error: #ff4444;
  --swifch-color-background: #ffffff;
  --swifch-border-radius: 6px;

}

/* Common Button Styles */
.swifch-container .swifch-add-to-cart,
.swifch-container .swifch-form-section .swifch-submit-order,
.swifch-container .swifch-actions .button,
.swifch-container .swifch-select-options,
.swifch-container .swifch-add-to-cart,
.swifch-container .swifch-submit-order {
  padding: 14px 20px;
  background-color: var(--swifch-color-primary);
  color: var(--swifch-color-background);
  border: none;
  border-radius: var(--swifch-border-radius);
  cursor: pointer;
  font-size: var(--swifch-font-size);
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  line-height: 1;
}



.swifch-container .swifch-add-to-cart:hover,
.swifch-container .swifch-submit-order:hover,
.swifch-container .swifch-actions .button:hover,
.swifch-container .swifch-select-options:hover,
.swifch-container .swifch-add-to-cart:hover,
.swifch-container .swifch-submit-order:hover {
  background-color: #000 !important;
}


.swifch-add-to-cart,
.swifch-select-options {
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.swifch-container .button-left {
  text-align: left;
}

.swifch-container .button-center {
  text-align: center;
}

.swifch-container .button-right {
  text-align: right;
}

.swifch-container .button-justify {
  text-align: justify;
}

.swifch-container .button-justify .swifch-add-to-cart {
  width: 100%;
}

/* Common Form Styles */
.swifch-container .swifch-form-row {
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.swifch-container .swifch-form-label,
.swifch-variations-wrapper .swifch-variation-row label {
  display: block;
  font-weight: 500;
  margin-bottom: 10px;
  font-size: var(--swifch-font-size);
  color: var(--swifch-color-label);
}

/* Common Title Styles */
.swifch-container .swifch-mini-cart-title,
.swifch-container .swifch-checkout-title,
.swifch-container .swifch-common-title {
  font-size: calc(var(--swifch-font-size) + 4px);
  padding-bottom: 10px;
  position: relative;
  margin: 0 0 20px;
  color: var(--swifch-color-text);
  font-weight: 500;
}

/* simple style  */
.swifch-container.simple .swifch-form-row {
  display: flex;
  flex-direction: column-reverse;
}

.swifch-container .swifch-form-row.swifch-form-row-submit {
  width: auto;
  display: block;
}

/* modern style */
.swifch-container.modern .swifch-form-input {
  width: 100%;
  padding-right: 0 !important;
  padding-left: 0 !important;
  border: none !important;
  border-bottom: 1px solid #e9e9e9 !important;
  background-color: transparent !important;
  transition: all 0.3s ease;
  border-radius: 0 !important;
}

/* Remove autofill background color */
.swifch-container.modern .swifch-form-input:-webkit-autofill,
.swifch-container.modern .swifch-form-input:-webkit-autofill:hover,
.swifch-container.modern .swifch-form-input:-webkit-autofill:focus,
.swifch-container.modern .swifch-form-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px var(--swifch-color-background) inset !important;
  -webkit-text-fill-color: var(--swifch-color-text) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.swifch-container.modern .swifch-form-row::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--swifch-color-primary);
  transition: width 0.3s ease;
}

.swifch-container.modern .swifch-form-row-address::after {
  bottom: 7px;
}

.swifch-container.modern .swifch-form-row:focus-within::after {
  width: 100%;
}

.swifch-container.modern .swifch-form-label {
  position: absolute;
  top: 50%;
  left: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  margin: 0 !important;
  transform: translateY(-50%);
}

.swifch-container.modern .swifch-form-input:focus~.swifch-form-label,
.swifch-container.modern .swifch-form-input:not(:placeholder-shown)~.swifch-form-label {
  top: 0;
  font-size: calc(var(--swifch-font-size) - 2px);
  color: var(--swifch-color-primary);
  font-weight: 500;
}

.swifch-container.modern .swifch-form-input:focus {
  outline: none;
  border-bottom-color: transparent;
}

.swifch-container.modern .swifch-form-input:focus {
  box-shadow: none !important;
}

/* Error Styles */
.swifch-container .swifch-form-label .required {
  color: var(--swifch-color-error);
  margin-left: 2px;
}

/* Input error styles */
.swifch-container .swifch-input-error {
  border-color: var(--swifch-color-error) !important;
  box-shadow: 0 0 0 1px var(--swifch-color-error) !important;
  background-color: rgba(255, 68, 68, 0.03) !important;
}

.swifch-container .swifch-form-error {
  color: var(--swifch-color-error);
  font-size: calc(var(--swifch-font-size) - 1px);
  margin-top: 5px;
  font-weight: 500;
}

.swifch-container.modern .swifch-input-error {
  border-bottom-color: var(--swifch-color-error) !important;
}

.swifch-container.modern .swifch-form-row:has(.swifch-input-error)::after {
  background-color: var(--swifch-color-error);
  width: 100%;
}

/* Placeholder Styles */
.swifch-container.modern .swifch-form-input::placeholder {
  color: transparent;
}

.swifch-container .swifch-form-input::placeholder {
  color: var(--swifch-color-label);
  opacity: 0.7;
}


.swifch-container .swifch-cart-item,
.swifch-cart-item-inner,
.swifch-cart-right,
.swifch-cart-item-inner .product-quantity,
.swifch-qty-price {
  display: flex;
  align-items: center;
}

.swifch-container .swifch-cart-item {
  justify-content: space-between;
  border-bottom: 1px solid #e8e8e8;
  padding-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.swifch-cart-item-inner {
  gap: 15px;
  flex-wrap: wrap;
}

.swifch-cart-right {
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
}

.swifch-cart-item-inner .product-image img {
  width: 70px !important;
  vertical-align: middle;
  border-radius: 6px;
  height: auto;
}

.swifch-cart-item-inner .product-quantity {
  gap: 5px;
  margin-top: 10px;
  /* justify-content: space-between; */
}

.swifch-cart-item-inner .product-name {
  font-size: 16px;
  font-weight: 600;
  color: #1b1b21;
}

.swifch-qty-price {
  gap: 3px;
}

input.swifch-qty-input-text {
  border: 0;
  padding: 0;
  line-height: 1;
}

.swifch-cart-subtotal-shipping {
  padding: 15px 0;
  border-bottom: 1px solid #e8e8e8;
}
.swifch-cart-subtotal {
  margin-bottom: 10px;
}
.swifch-cart-subtotal,
.swifch-cart-shipping,
.swifch-cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 500;
}

.swifch-cart-total {
  padding-top: 15px;
  font-weight: 700;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
  .swifch-container .swifch-input-group {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .swifch-cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .swifch-cart-right {
    margin-top: 10px;
    width: 100%;
    justify-content: space-between;
  }

  .swifch-container .swifch-shipping-method label {
    flex-wrap: wrap;
  }

  .swifch-container .swifch-mini-cart,
  .swifch-container .swifch-checkout-form {
    padding: 15px;
  }

  .swifch-container .swifch-place-order-wrapper  {
    text-align: center;
  }

  .swifch-container .swifch-submit-order {
    width: 100%;
  }

  .swifch-cart-subtotal,
  .swifch-cart-shipping,
  .swifch-cart-total {
    font-size: 14px;
  }
}

@media screen and (max-width: 480px) {
  .swifch-container .swifch-cart-item .product-image img {
    width: 50px !important;
  }

  .swifch-container .swifch-common-title {
    font-size: 16px;
  }

  .swifch-container .swifch-qty-input {
    width: 50px !important;
  }
}

.swifch-container .swifch-mini-cart,
.swifch-container .swifch-checkout-form {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
}

.swifch-container .swifch-mini-cart-title:after,
.swifch-container .swifch-checkout-title:after,
.swifch-container .swifch-common-title:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
}

.swifch-container .swifch-quantity {
  display: flex;
  align-items: center;
  gap: 5px;
}

.swifch-container .swifch-qty-input {
  height: 30px !important;
  width: 70px !important;
  border: 1px solid #e3e3e3 !important;
  background: transparent;
  border-radius: 6px !important;
  font-weight: 600;
  font-size: 12px;
  outline: none;
  text-align: center !important;
}

.swifch-container .swifch-qty-minus,
.swifch-container .swifch-qty-plus,
.swifch-container .swifch-remove-item {
  background: transparent;
  border: 1px solid #e7e8e9;
  border-radius: 6px;
  padding: 0;
  font-size: 12px;
  height: 30px;
  line-height: 30px;
  width: 32px;
  color: #333;
  cursor: pointer;
  font-weight: 500;
}

.swifch-container .swifch-remove-item {
  background: rgba(255, 28, 28, 0.071) !important;
  color: #f00 !important;
  border: 0 !important;
}


.swifch-container .swifch-checkout-form .swifch-form-input,
.swifch-container .swifch-variation-select {
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 12px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  min-height: auto;
  line-height: 1;
}

.swifch-container .swifch-checkout-form .swifch-form-input:focus,
.swifch-container .swifch-variation-select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.swifch-container .swifch-checkout-form .swifch-input-group {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-direction: column;
}

@media (min-width: 768px) {
  .swifch-container .swifch-checkout-form .swifch-input-group {
    flex-direction: row;
  }
}

.swifch-container .swifch-form-section:last-child {
  margin-bottom: 0;
}

.swifch-container .swifch-form-section:last-child {
  margin-bottom: 0;
}

.swifch-container .swifch-order-received {
  text-align: center;
}

.swifch-success-icon svg {
  width: 50px;
  height: 50px;
}

.swifch-success-icon {
  margin-bottom: 14px;
}

.swifch-container .swifch-thank-you-message {
  font-size: 16px;
  color: #141416;
}

.swifch-container .swifch-order-details {
  display: inline-flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  grid-column-gap: 15px;
  grid-row-gap: 7px;
  font-size: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Animation & Transitions */
.swifch-container .swifch-mini-cart,
.swifch-container .swifch-checkout-form {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.swifch-container .swifch-mini-cart.swifch-visible,
.swifch-container .swifch-checkout-form.swifch-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  max-height: 2000px;
}

.swifch-container .swifch-mini-cart.swifch-visible {
  animation: slideDown 0.4s ease-out;
}

.swifch-container .swifch-checkout-form.swifch-visible {
  animation: slideDown 0.4s ease-out 0.2s backwards;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.swifch-container .swifch-cart-item {
  transition: all 0.3s ease;
}


.swifch-container .swifch-cart-item.removing {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-20px);
  }
}

.swifch-container .swifch-add-to-cart.loading {
  position: relative;
  color: transparent;
}

.swifch-container .swifch-add-to-cart.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Variable Product Styles */
.swifch-variations-wrapper {
  margin-top: 15px;
}

.swifch-variations-wrapper .swifch-variation-row {
  margin-bottom: 15px;
}

.swifch-variations-wrapper .swifch-variation-price {
  margin: 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.swifch-variations-wrapper .swifch-variation-stock {
  margin-bottom: 15px;
  font-size: 14px;
}

.swifch-variations-wrapper .swifch-variation-stock .in-stock {
  color: #28a745;
}

.swifch-variations-wrapper .swifch-variation-stock .out-of-stock {
  color: #dc3545;
}

.swifch-variations-wrapper .swifch-variation-add-to-cart {
  margin-top: 15px;
}

.swifch-variations-wrapper .swifch-variation-add-to-cart button:hover:not(:disabled) {
  background-color: #135e96;
}

.swifch-variations-wrapper .swifch-variation-add-to-cart button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Remove old modal styles */
.swifch-variable-product-modal {
  display: none;
}

.swifch-place-order-wrapper {
  display: none; /* Hide by default */
}

.swifch-place-order-wrapper .swifch-submit-order {
  margin-top: 20px;
}

.swifch-place-order-wrapper.swifch-visible {
  display: block; /* Show only when visible class is added */
}

/* Make child elements inherit visibility from parent wrapper */
.swifch-place-order-wrapper .swifch-mini-cart,
.swifch-place-order-wrapper .swifch-checkout-form {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.swifch-place-order-wrapper.swifch-visible .swifch-mini-cart,
.swifch-place-order-wrapper.swifch-visible .swifch-checkout-form {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  max-height: 2000px;

}

.swifch-place-order-wrapper.swifch-visible .swifch-mini-cart {
  animation: slideDown 0.4s ease-out;
}

.swifch-place-order-wrapper.swifch-visible .swifch-checkout-form {
  animation: slideDown 0.4s ease-out 0.2s backwards;
}

/* Form Row Animation */
.swifch-container.modern .swifch-form-row {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Shipping Methods Styles */
.swifch-shipping-methods {
  margin: 20px 0;
}


.swifch-shipping-zone {
  margin-bottom: 15px;
}

.swifch-shipping-method {
  padding: 15px;
  border: 1px solid #e6e6e6;
  border-radius: var(--swifch-border-radius);
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.swifch-shipping-method.selected {
  background-color: rgba(15, 15, 17, 0.03);
}

.swifch-shipping-method label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: var(--swifch-font-size);
  color: var(--swifch-color-text);
}

.swifch-shipping-method-input {
  margin: 0;
  cursor: pointer;
}

.swifch-shipping-methods-loading {
  padding: 15px;
  text-align: center;
  color: var(--swifch-color-label);
  font-style: italic;
}

/* Shipping Address Toggle Styles */
.swifch-container .swifch-shipping-toggle {
  margin: 20px 0;
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: var(--swifch-border-radius);
  border: 1px solid #e6e6e6;
  transition: all 0.3s ease;
}

.swifch-container .swifch-shipping-toggle label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  gap: 10px;
  transition: all 0.3s ease;
}

.swifch-container .swifch-shipping-toggle label.shipping-enabled {
  color: var(--swifch-color-primary);
}

.swifch-container #swifch-shipping-address-fields {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.swifch-container #swifch-shipping-address-fields.shipping-active {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading State Styles */
.swifch-container .swifch-submit-order.loading,
.swifch-container .swifch-add-to-cart.loading {
  position: relative;
  color: transparent !important;
}

.swifch-container .swifch-submit-order.loading::after,
.swifch-container .swifch-add-to-cart.loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.updating {
  position: relative;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* Pulse animation for updating elements */
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

.swifch-cart-total-value.updating,
.swifch-cart-shipping-value.updating {
  animation: pulse 1s infinite;
}

/* Country Selector Styles */
.swifch-country-search-container {
  position: relative;
  margin-top: 5px;
}

.swifch-country-search {
  width: 100%;
  padding: 12px;
  border: 1px solid #e6e6e6;
  border-radius: var(--swifch-border-radius);
  box-sizing: border-box;
  font-size: var(--swifch-font-size);
}

.swifch-country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #e6e6e6;
  border-top: none;
  border-radius: 0 0 var(--swifch-border-radius) var(--swifch-border-radius);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 100;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.swifch-country-dropdown.active {
  max-height: 200px;
  opacity: 1;
  overflow-y: auto;
}

.swifch-country-options {
  list-style: none;
  margin: 0;
  padding: 0;
}

.swifch-country-options li {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.swifch-country-options li:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.swifch-form-row-country {
  position: relative;
}
