/* iPhonek.cz — targeted fixes, 2026-10-13. Load AFTER shop-ui.css. */

/* The flex form left its fieldset at intrinsic width (215px of 460px). */
#header #formSearchForm > fieldset {
  display: flex !important;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  position: relative;
}
#header #formSearchForm .query-input {
  flex: 1 1 0%;
  width: 0 !important;
  min-width: 0;
}
#header #formSearchForm button[type="submit"] {
  flex: 0 0 48px;
  right: 0;
}
#header #formSearchForm .search-whisperer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Keep native form, validation, honeypot and any server-required CAPTCHA. */
footer .custom-footer > .custom-footer__newsletter.extended {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  align-items: center !important;
  gap: 24px !important;
  height: auto !important;
  padding: 24px !important;
}
footer .custom-footer > .custom-footer__newsletter.extended .newsletter-header {
  min-width: 0;
  margin: 0 !important;
  position: relative;
  z-index: 1;
}
footer .custom-footer > .custom-footer__newsletter.extended h3 {
  white-space: normal !important;
  padding: 0 !important;
}
footer .custom-footer > .custom-footer__newsletter.extended #formNewsletterWidget {
  width: 100% !important;
  max-width: 520px !important;
  min-width: 0;
  margin: 0 !important;
  text-align: left;
}
footer .custom-footer__newsletter #formNewsletterWidget > fieldset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  min-width: 0;
}
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > .form-group {
  min-width: 0;
  margin: 0;
}
footer .custom-footer__newsletter #formNewsletterWidget label {
  display: block !important;
  position: static;
  margin: 0 0 6px;
  font-size: 13px;
}
footer .custom-footer__newsletter #formNewsletterWidget input[type="email"] {
  padding: 0 18px !important;
}
footer .custom-footer__newsletter #formNewsletterWidget input[name="captcha"] {
  width: 100%;
  max-width: 240px;
}
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > fieldset,
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > .form-group:has(input[type="checkbox"]),
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > .consents {
  grid-column: 1 / -1;
}
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > fieldset {
  grid-row: 2;
  min-width: 0;
}
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > button[type="submit"] {
  grid-column: 2;
  grid-row: 1;
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  height: 46px !important;
  width: auto !important;
  padding: 0 18px !important;
  font-size: 14px !important;
  color: #fff !important;
}
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > button::before,
footer .custom-footer__newsletter #formNewsletterWidget > fieldset > button::after {
  content: none !important;
}

/* Shoptet .sr-only forces white background and black text with !important.
   These spans are deliberately shown by the existing variant design. */
body.type-product #variants .add-to-cart-button > .sr-only {
  background: transparent !important;
  color: inherit !important;
}

@media (max-width: 767px) {
  footer .custom-footer > .custom-footer__newsletter.extended {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px !important;
    padding: 22px 16px !important;
  }
  footer .custom-footer > .custom-footer__newsletter.extended #formNewsletterWidget {
    max-width: 100% !important;
  }
  footer .custom-footer__newsletter #formNewsletterWidget > fieldset {
    grid-template-columns: minmax(0, 1fr);
  }
  footer .custom-footer__newsletter #formNewsletterWidget > fieldset > button[type="submit"] {
    grid-column: 1;
    grid-row: auto;
  }
}
