/* SEGES - inner blocks in the WooCommerce Checkout block (GLS parcel shop, marketing consent).
   Neutral styling on top of the blocks' own components, so colours and fonts follow the theme. */

/* GLS parcel shop (decision 29-30): the block's own text input, button and radio list,
   inside a box with the same border as the shipping options. */
.seges-bc-gls {
  position: relative;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid rgba(51, 51, 51, 0.2);
  border-radius: 4px;
}

.seges-bc-gls.has-error {
  border-color: #cc1818;
}

.wc-block-checkout .seges-bc-gls p.seges-bc-gls__title {
  margin: 0 0 12px;
  padding: 0;
  font-weight: 600;
}

.seges-bc-gls__lookup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: flex-start;
}

/* The theme's general input styles would otherwise win over the block's own. */
.wc-block-checkout .seges-bc-gls .seges-bc-gls__zipcode {
  flex: 1 1 110px;
  max-width: 200px;
  margin: 0;
}

.wc-block-checkout .seges-bc-gls .seges-bc-gls__zipcode input[type="text"] {
  box-sizing: border-box;
  min-height: 50px;
  border-radius: 4px;
}

.wc-block-checkout .seges-bc-gls .seges-bc-gls__button {
  flex: 0 0 auto;
  min-height: 50px;
  margin: 0;
}

.wc-block-checkout .seges-bc-gls p.seges-bc-gls__message {
  margin: 12px 0 0;
  padding: 0;
  font-size: 0.875em;
}

.seges-bc-gls__shops {
  min-width: 0;
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.wc-block-checkout .seges-bc-gls legend.seges-bc-gls__legend {
  margin: 0 0 8px;
  padding: 0;
  font-weight: 600;
}

.seges-bc-gls .wc-block-components-radio-control__description {
  display: block;
}

.seges-bc-gls .wc-block-components-validation-error {
  margin-top: 8px;
}

/* Marketing consent (decision 31): same sizes as the checkbox text and the terms. */
.seges-bc-optin {
  margin: 0 0 24px;
}

.wc-block-checkout .seges-bc-optin p.seges-bc-optin__title {
  margin: 0 0 10px;
  padding: 0;
  font-weight: 600;
}

.seges-bc-optin__checkbox {
  margin-top: 0;
}

.wc-block-checkout .seges-bc-optin p.seges-bc-optin__more {
  margin: 6px 0 0;
  padding: 0 0 0 32px;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.seges-bc-optin__more a {
  text-decoration: underline;
}

/* Consent modal */
.seges-bc-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.seges-bc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.seges-bc-modal__dialog {
  position: relative;
  box-sizing: border-box;
  width: min(680px, 100%);
  max-height: min(760px, 90vh);
  overflow: auto;
  padding: 28px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.seges-bc-modal__dialog h2 {
  margin: 0 0 18px;
  padding-right: 50px;
}

.seges-bc-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.seges-bc-modal__content p:last-child {
  margin-bottom: 0;
}

/* AgroID notices above the Cart and Checkout blocks */
.seges-block-notices {
  margin: 0 0 24px;
}
