/* Address book: compact desktop and mobile layout. */
.nasol-ab-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 840px;
  margin: 0 auto 18px;
}
.nasol-ab-header h2 { margin: 0; text-align: center; font-size: clamp(24px, 2.2vw, 34px); }
.woocommerce-account .nasol-ab-header .button {
  position: absolute;
  right: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 15px !important;
  border: 1px solid #247b89 !important;
  border-radius: 5px !important;
  background: #247b89 !important;
  color: #fff !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.woocommerce-account .nasol-ab-header .button:hover,
.woocommerce-account .nasol-ab-header .button:focus {
  border-color: #185e69 !important;
  background: #185e69 !important;
  color: #fff !important;
}
.nasol-address-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 7px;
  width: 100%;
  max-width: 840px;
  margin-right: auto;
  margin-left: auto;
}
.nasol-address-card {
  align-self: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 220px !important;
  min-height: 220px !important;
  max-height: 220px !important;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 2px solid #cbd5db;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 45, 50, .05);
}
.nasol-address-card h3 {
  margin: 0 0 3px !important;
  font-size: 15px !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere;
}
.nasol-address-card h3 small {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 12px;
  background: #247b89;
  color: #fff;
  font-size: 10px;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}
.nasol-address-type {
  margin-bottom: 6px;
  color: #63707a;
  font-size: 11px;
  line-height: 1.35;
}
.nasol-address-card address {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  color: #4d555b;
  font-size: 11.5px;
  font-style: normal;
  line-height: 1.45;
  overflow: auto;
  overflow-wrap: anywhere;
  scrollbar-width: thin;
}
.nasol-address-contact {
  flex: 0 0 auto;
  margin-top: 5px;
  color: #3f4a50;
  font-size: 10.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.nasol-address-contact span { display: block; }
.nasol-address-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 7px;
}
.woocommerce-account .nasol-address-actions .button,
.woocommerce-account .nasol-address-form .button {
  min-height: 34px !important;
  padding: 6px 11px !important;
  border-radius: 5px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}
.woocommerce-account .nasol-address-actions .button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #247b89 !important;
  background: #247b89 !important;
  color: #fff !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.woocommerce-account .nasol-address-actions .button:hover,
.woocommerce-account .nasol-address-actions .button:focus {
  border-color: #185e69 !important;
  background: #185e69 !important;
  color: #fff !important;
}
.woocommerce-account .nasol-address-actions .button.nasol-delete {
  border-color: #b42318 !important;
  background: #b42318 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 0 !important;
  text-indent: 0 !important;
  min-width: 48px !important;
  overflow: visible !important;
}
.woocommerce-account .nasol-address-actions .button.nasol-delete::after {
  content: "Sil";
  display: inline !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}
.woocommerce-account .nasol-address-actions .button.nasol-delete:hover,
.woocommerce-account .nasol-address-actions .button.nasol-delete:focus {
  border-color: #7a1710 !important;
  background: #7a1710 !important;
  color: #fff !important;
}
.woocommerce-account .nasol-address-form button[type="submit"].button,
.woocommerce-account .nasol-address-form button[type="submit"].button.alt {
  border: 1px solid #247b89 !important;
  background: #247b89 !important;
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
  box-shadow: none !important;
}
.woocommerce-account .nasol-address-form button[type="submit"].button:hover,
.woocommerce-account .nasol-address-form button[type="submit"].button:focus {
  border-color: #185e69 !important;
  background: #185e69 !important;
  color: #fff !important;
}

/* Add/edit form: override oversized theme inputs only inside this plugin. */
.nasol-address-form {
  width: 100%;
  max-width: 680px;
}
.nasol-address-form:after { content: ""; display: block; clear: both; }
.woocommerce-account .nasol-address-form .form-row {
  margin: 0 0 8px !important;
}
.woocommerce-account .nasol-address-form label {
  margin-bottom: 4px !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
}
.woocommerce-account .nasol-address-form input.input-text,
.woocommerce-account .nasol-address-form input[type="text"],
.woocommerce-account .nasol-address-form input[type="email"],
.woocommerce-account .nasol-address-form input[type="tel"],
.woocommerce-account .nasol-address-form select,
.woocommerce-account .nasol-address-form .select2-selection {
  box-sizing: border-box !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 5px 9px !important;
  border-radius: 5px !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}
.woocommerce-account .nasol-address-form .select2-selection__rendered {
  padding: 0 !important;
  line-height: 24px !important;
}
.woocommerce-account .nasol-address-form .select2-selection__arrow {
  height: 34px !important;
}
.woocommerce-account .nasol-address-form input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
}

/* Checkout address picker remains compact and isolated from payment fields. */
.nasol-checkout-addresses { clear: both; margin: 0 0 14px; }
.nasol-checkout-addresses h3 { margin: 0 0 8px; font-size: 17px; }
.nasol-checkout-address-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}
.nasol-checkout-address-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid #d9dee3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.nasol-checkout-address-card:has(input:checked) {
  border-color: #247b89;
  box-shadow: 0 0 0 1px #247b89;
}
.nasol-checkout-address-card input { flex: 0 0 auto; margin: 3px 0 0; }
.nasol-checkout-address-card strong { display: block; margin-bottom: 3px; font-size: 13px; }
.nasol-checkout-address-text { display: block; font-size: 12px; line-height: 1.4; }
.nasol-checkout-address-text br { display: block; }

/* Keep WooCommerce country/state Select2 options readable against theme colors. */
body.woocommerce-checkout .select2-dropdown,
body.woocommerce-account .select2-dropdown {
  border-color: #cbd5db !important;
  background: #fff !important;
  color: #162033 !important;
}
body.woocommerce-checkout .select2-search__field,
body.woocommerce-account .select2-search__field {
  background: #fff !important;
  color: #162033 !important;
  -webkit-text-fill-color: #162033 !important;
}
body.woocommerce-checkout .select2-results__option,
body.woocommerce-account .select2-results__option {
  background: #fff !important;
  color: #162033 !important;
  -webkit-text-fill-color: #162033 !important;
}
body.woocommerce-checkout .select2-results__option[aria-selected="true"],
body.woocommerce-account .select2-results__option[aria-selected="true"] {
  background: #e7f1f3 !important;
  color: #102f35 !important;
  -webkit-text-fill-color: #102f35 !important;
}
body.woocommerce-checkout .select2-results__option--highlighted,
body.woocommerce-checkout .select2-results__option[aria-selected="true"].select2-results__option--highlighted,
body.woocommerce-account .select2-results__option--highlighted,
body.woocommerce-account .select2-results__option[aria-selected="true"].select2-results__option--highlighted {
  background: #247b89 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
body.woocommerce-checkout select option,
body.woocommerce-account .nasol-address-form select option {
  background: #fff !important;
  color: #162033 !important;
}

@media (max-width: 767px) {
  .nasol-ab-header { align-items: stretch; margin-bottom: 14px; }
  .nasol-ab-header h2 { font-size: 25px; }
  .woocommerce-account .nasol-ab-header .button { min-height: 38px; padding: 7px 11px !important; }
  .nasol-address-grid { grid-template-columns: 1fr; gap: 8px; }
  .nasol-address-card {
    height: 190px !important;
    min-height: 190px !important;
    max-height: 190px !important;
    padding: 10px 11px;
  }
  .nasol-address-card h3 { font-size: 16px !important; }
  .nasol-address-card address { font-size: 12px; }
  .nasol-address-form { max-width: none; }
  .woocommerce-account .nasol-address-form .form-row-first,
  .woocommerce-account .nasol-address-form .form-row-last {
    float: none !important;
    width: 100% !important;
  }
  .woocommerce-account .nasol-address-form input.input-text,
  .woocommerce-account .nasol-address-form input[type="text"],
  .woocommerce-account .nasol-address-form input[type="email"],
  .woocommerce-account .nasol-address-form input[type="tel"],
  .woocommerce-account .nasol-address-form select,
  .woocommerce-account .nasol-address-form .select2-selection {
    box-sizing: border-box !important;
    min-height: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }
  .nasol-checkout-address-grid { grid-template-columns: 1fr; }
  .nasol-checkout-address-card { padding: 9px 10px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .nasol-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .nasol-ab-header { flex-direction: column; }
  .woocommerce-account .nasol-ab-header .button { position: static; width: 100%; }
}

/* Address book visual redesign — v2.1.2 */
.nasol-ab-header {
  max-width: 1120px;
  min-height: 58px;
  margin-bottom: 26px;
  padding: 0 190px;
  box-sizing: border-box;
}
.nasol-ab-header h2 {
  color: #102a32;
  font-size: clamp(28px, 2.5vw, 40px);
  font-weight: 800;
  letter-spacing: -.6px;
}
.woocommerce-account .nasol-ab-header .button {
  right: 2px;
  min-height: 46px;
  padding: 10px 18px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #167b8b, #075f70) !important;
  box-shadow: 0 8px 18px rgba(7, 95, 112, .22) !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  transition: transform .18s ease, box-shadow .18s ease !important;
}
.woocommerce-account .nasol-ab-header .button::before {
  content: "+";
  margin-right: 7px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}
.woocommerce-account .nasol-ab-header .button:hover,
.woocommerce-account .nasol-ab-header .button:focus {
  background: linear-gradient(135deg, #116d7c, #064f5d) !important;
  box-shadow: 0 10px 22px rgba(7, 95, 112, .3) !important;
  transform: translateY(-1px);
}
.nasol-address-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
  max-width: 1120px;
}
.nasol-address-card {
  position: relative;
  align-self: stretch;
  height: 330px !important;
  min-height: 330px !important;
  max-height: 330px !important;
  padding: 20px 20px 17px;
  border: 1px solid #d7e2e6;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfdfe 100%);
  box-shadow: 0 10px 28px rgba(22, 50, 59, .09);
  isolation: isolate;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nasol-address-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(90deg, #075f70, #28a3b5);
}
.nasol-address-card:hover {
  border-color: #a9cbd2;
  box-shadow: 0 14px 34px rgba(22, 50, 59, .14);
  transform: translateY(-2px);
}
.nasol-address-card h3 {
  min-height: 48px;
  margin: 3px 0 7px !important;
  color: #102a32;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.nasol-address-card h3 small {
  margin-left: 5px;
  padding: 3px 8px;
  border: 0;
  background: #daf3f6;
  color: #075f70;
  font-size: 10px;
  font-weight: 800;
}
.nasol-address-type {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  width: auto;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf6f8;
  color: #176778;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1px;
}
.nasol-address-type::before {
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
}
.nasol-address-type.is-billing::before { content: "▤"; }
.nasol-address-type.is-shipping::before { content: "⌂"; }
.nasol-address-card address {
  flex: 1 1 auto;
  max-height: 96px;
  padding: 10px 11px;
  border: 1px solid #edf1f3;
  border-radius: 10px;
  background: #f7fafb;
  color: #44555b;
  font-size: 12px;
  line-height: 1.48;
  scrollbar-color: #aac4ca transparent;
}
.nasol-address-contact {
  display: grid;
  gap: 3px;
  min-height: 38px;
  margin-top: 8px;
  color: #40545b;
  font-size: 11px;
  line-height: 1.35;
}
.nasol-address-contact span {
  position: relative;
  padding-left: 19px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nasol-address-contact span::before {
  position: absolute;
  left: 1px;
  color: #167b8b;
  font-weight: 800;
}
.nasol-address-phone::before { content: "☎"; }
.nasol-address-email::before { content: "✉"; }
.nasol-address-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding-top: 10px;
}
.woocommerce-account .nasol-address-actions .button {
  width: 100%;
  min-height: 40px !important;
  padding: 8px 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #087387 !important;
  box-shadow: 0 5px 12px rgba(8, 115, 135, .18) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}
.woocommerce-account .nasol-address-actions .button::before {
  content: "✎";
  margin-right: 6px;
  font-size: 14px;
}
.woocommerce-account .nasol-address-actions .button:hover,
.woocommerce-account .nasol-address-actions .button:focus {
  background: #055d6d !important;
  box-shadow: 0 7px 15px rgba(8, 115, 135, .26) !important;
}
.woocommerce-account .nasol-address-actions .button.nasol-delete {
  min-width: 0 !important;
  border: 0 !important;
  background: #c72d2d !important;
  box-shadow: 0 5px 12px rgba(199, 45, 45, .18) !important;
  font-size: 13px !important;
}
.woocommerce-account .nasol-address-actions .button.nasol-delete::before {
  content: "⌫";
  margin-right: 6px;
  color: #fff;
  font-size: 14px;
}
.woocommerce-account .nasol-address-actions .button.nasol-delete::after {
  content: none !important;
}
.woocommerce-account .nasol-address-actions .button.nasol-delete:hover,
.woocommerce-account .nasol-address-actions .button.nasol-delete:focus {
  background: #9f2020 !important;
  box-shadow: 0 7px 15px rgba(199, 45, 45, .26) !important;
}

@media (min-width: 768px) and (max-width: 1100px) {
  .nasol-ab-header,
  .nasol-address-grid { max-width: 900px; }
  .nasol-address-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .nasol-ab-header {
    flex-direction: column;
    min-height: 0;
    padding: 0;
    gap: 12px;
  }
  .woocommerce-account .nasol-ab-header .button {
    position: static;
    width: min(100%, 360px);
  }
  .nasol-address-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .nasol-address-card {
    height: 310px !important;
    min-height: 310px !important;
    max-height: 310px !important;
    padding: 17px 16px 14px;
    border-radius: 15px;
  }
  .nasol-address-card h3 {
    min-height: 42px;
    font-size: 17px !important;
  }
  .nasol-address-card address {
    max-height: 86px;
    font-size: 11.5px;
  }
  .nasol-address-actions { gap: 8px; }
  .woocommerce-account .nasol-address-actions .button,
  .woocommerce-account .nasol-address-actions .button.nasol-delete {
    min-height: 42px !important;
    font-size: 13px !important;
  }
}
