/**
 * Užpildytų laukų fonas – nepriklauso nuo :-webkit-autofill (NordPass, 1Password ir kt.).
 * Ne taikoma input[type="number"].
 */

@keyframes gmg-autofill-start {
  from,
  to {
    opacity: 1;
  }
}

/* Bendras mixin efektas – autofill + užpildytas laukas */
html body input:not([type="number"]).gmg-has-value,
html body textarea.gmg-has-value,
html body select.gmg-has-value,
html body input:not([type="number"]):-webkit-autofill,
html body input:not([type="number"]):-webkit-autofill:hover,
html body input:not([type="number"]):-webkit-autofill:focus,
html body input:not([type="number"]):-webkit-autofill:active,
html body textarea:-webkit-autofill,
html body textarea:-webkit-autofill:focus,
html body select:-webkit-autofill,
html body select:-webkit-autofill:focus {
  animation-name: gmg-autofill-start !important;
  animation-duration: 0.001s !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1a1a1a !important;
  caret-color: #1a1a1a !important;
  background-color: #ffffff !important;
  background-image: none !important;
  filter: none !important;
  transition: background-color 999999s ease-out 999999s, color 999999s ease-out 999999s,
    box-shadow 999999s ease-out 999999s !important;
}

html body input:not([type="number"]):autofill,
html body textarea:autofill,
html body select:autofill {
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1a1a1a !important;
  background-color: #ffffff !important;
  filter: none !important;
}

/* Elementor */
html body .elementor-field-group .elementor-field-textual.gmg-has-value,
html body .elementor-field-group .elementor-field-textual:not(:placeholder-shown),
html body .elementor-field-group .elementor-field-textual:-webkit-autofill,
html body .elementor-field-group .elementor-field-textual:-webkit-autofill:focus,
html body input.elementor-field:not([type="number"]).gmg-has-value,
html body input.elementor-field:not([type="number"]):-webkit-autofill,
html body textarea.elementor-field.gmg-has-value,
html body textarea.elementor-field:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  background-color: #ffffff !important;
}

/* Checkout – tuščias */
html body #checkout-page-container #customer_details p input:not([type="number"]).gmg-has-value,
html body #checkout-page-container #customer_details p input:not([type="number"]):-webkit-autofill,
html body #checkout-page-container #customer_details p select.gmg-has-value,
html body #checkout-page-container #customer_details p select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1a1a1a !important;
  background-color: #ffffff !important;
}

/* Checkout – su reikšme pilkas */
html body #checkout-page-container #customer_details p input:not([type="number"]).gmg-has-value:not([type="hidden"]),
html body #checkout-page-container #customer_details p input:not([type="number"]):not(:placeholder-shown),
html body #checkout-page-container #customer_details p input:not([type="number"]):not(:placeholder-shown):-webkit-autofill,
html body #checkout-page-container #customer_details p input:not([type="number"]):not(:placeholder-shown):-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #eeeeee inset !important;
  box-shadow: 0 0 0 1000px #eeeeee inset !important;
  background-color: #eeeeee !important;
}

/* Newsletter – NordPass / Chrome autofill */
html body .gmg-newsletter-wrapper .gmg-newsletter-input.gmg-has-value,
html body .gmg-newsletter-wrapper .gmg-newsletter-input:not(:placeholder-shown),
html body .gmg-newsletter-wrapper .gmg-newsletter-input:-webkit-autofill,
html body .gmg-newsletter-wrapper .gmg-newsletter-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #999999 !important;
  caret-color: #999999 !important;
  color: #999999 !important;
  background-color: #ffffff !important;
}

/* Kontaktų forma */
html body #contact-form-modal form p .wpcf7-text.gmg-has-value,
html body #contact-form-modal form p .wpcf7-text:not(:placeholder-shown),
html body #contact-form-modal form p .wpcf7-text:-webkit-autofill,
html body #contact-form-modal form p .wpcf7-textarea.gmg-has-value,
html body #contact-form-modal form p .wpcf7-textarea:not(:placeholder-shown),
html body #contact-form-modal form p .wpcf7-textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #999999 !important;
  caret-color: #999999 !important;
  background-color: #ffffff !important;
}

/* WooCommerce */
html body .woocommerce-Input.gmg-has-value,
html body .woocommerce-Input:-webkit-autofill,
html body .form-row input:not([type="number"]).gmg-has-value,
html body .form-row input:not([type="number"]):-webkit-autofill,
html body .form-row select.gmg-has-value,
html body #customer_login input:not([type="number"]).gmg-has-value,
html body #reset-password-page-form input:not([type="number"]).gmg-has-value {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1a1a1a !important;
  background-color: #ffffff !important;
}

/* Kuponas */
html body .cart td.actions .coupon .input-text.gmg-has-value,
html body .cart td.actions .coupon .input-text:not(:placeholder-shown),
html body .cart td.actions .coupon .input-text:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #999999 !important;
  background-color: #ffffff !important;
}

/* Mobili paieška */
html body .gmg-mobile-search-sticky input.gmg-has-value,
html body .gmg-mobile-search-sticky input:-webkit-autofill,
html body .gmg-mobile-popup-inner input[type="search"].gmg-has-value,
html body .gmg-mobile-popup-inner input[type="search"]:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #999999 !important;
  background-color: #ffffff !important;
}
