/* ShopLight Contact fragment + WPForms contact page */

.shoplight-wp-contact-fragment {
  --sw-font-size-sm: 0.875rem;
  --slwp-contact-gap: 12px;
  width: 100%;
}

.shoplight-wp-contact-heading {
  margin: 0 0 8px;
}

.shoplight-wp-contact-label {
  color: #687385 !important;
  font-size: 0.875rem !important;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

/* Phone/email are images — keep natural size, don't stretch like product images */
.shoplight-wp-shell .shoplight-wp-contact-item img,
.shoplight-wp-contact-item img {
  width: auto !important;
  max-width: min(100%, 280px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  display: inline-block !important;
}

.shoplight-wp-contact-item {
  align-items: flex-start !important;
  border-radius: 0 !important;
  width: 100%;
}

.shoplight-wp-contact-item > div {
  gap: 6px;
  width: 100%;
}

.shoplight-wp-contact-item a {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.shoplight-wp-contact-icon {
  flex-shrink: 0;
}

/* Single column for contact cards — fill parent column */
.shoplight-wp-contact-fragment.is-mode-cards .shoplight-wp-contact-items,
.shoplight-wp-contact-fragment.is-orientation-grid .shoplight-wp-contact-items,
.shoplight-wp-contact-fragment.is-orientation-vertical .shoplight-wp-contact-items {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: var(--slwp-contact-gap);
  align-items: stretch;
  width: 100%;
  max-width: none;
}

/* Hide repeated "Phone" labels; keep Email */
.shoplight-wp-contact-item.is-phone > div > strong {
  display: none !important;
}

/* Contact page: keep content off screen edges (site-main has no global padding) */
.site-main > .wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container),
.wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 16px;
  box-sizing: border-box;
  width: 100%;
}

/* Contact page: contacts + form side by side, equal columns */
.wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) {
  align-items: flex-start;
  gap: 32px;
}

.wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) > .shoplight-wp-shell,
.wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) > .wpforms-container {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* WPForms fills parent column */
.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-container,
.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-container .wpforms-form,
.wp-block-column .wpforms-container,
.wp-block-column .wpforms-container .wpforms-form,
.wp-block-group .wpforms-container,
.wp-block-group .wpforms-container .wpforms-form {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-field,
.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-field input,
.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-field select,
.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-field textarea,
.wp-block-column .wpforms-field,
.wp-block-column .wpforms-field input,
.wp-block-column .wpforms-field select,
.wp-block-column .wpforms-field textarea,
.wp-block-group .wpforms-field,
.wp-block-group .wpforms-field input,
.wp-block-group .wpforms-field select,
.wp-block-group .wpforms-field textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-submit-container,
.wp-block-column .wpforms-submit-container,
.wp-block-group .wpforms-submit-container {
  width: 100%;
}

.wp-block-group:has(.shoplight-wp-contact-fragment) .wpforms-submit,
.wp-block-column .wpforms-submit,
.wp-block-group .wpforms-submit {
  width: 100%;
  max-width: 100%;
}

/* Stack on tablet/mobile (Group uses is-nowrap which blocks wrap) */
@media (max-width: 900px) {
  .wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    gap: 24px;
  }

  .wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) > .shoplight-wp-shell,
  .wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) > .wpforms-container {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .shoplight-wp-shell .shoplight-wp-contact-item img,
  .shoplight-wp-contact-item img {
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  .wp-block-group.is-layout-flex:has(.shoplight-wp-contact-fragment):has(.wpforms-container) {
    gap: 16px;
  }

  .shoplight-wp-contact-item {
    padding: 12px !important;
  }
}
