/* The address dialog has one scrollable field area and an always reachable save action. */
dialog.gift-address {
  position: fixed;
  inset: calc(var(--gift-top61, 0px) + 12px) 0 auto;
  margin: 0 auto;
  width: min(650px, calc(100vw - 28px));
  height: min(760px, calc(var(--gift-height61, 100dvh) - 24px));
  max-height: calc(var(--gift-height61, 100dvh) - 24px);
  box-sizing: border-box;
  overflow: hidden;
}
.gift-address #gift-address-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}
.gift-address-fields {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 22px 16px;
  scroll-padding-block: 16px;
  touch-action: pan-y pinch-zoom;
}
.gift-address-fields:focus-visible { outline: 2px solid var(--green, #789b77); outline-offset: -3px; }
.gift-address-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--cream, #fffdf8);
}
.gift-address-actions #gift-address-status {
  margin: 0;
  min-width: 0;
  font-size: 12px;
  line-height: 1.6;
  max-height: 4.8em;
  overflow: auto;
}
.gift-address-actions #gift-address-save { flex: 0 0 auto; white-space: nowrap; }
#gift-address-product { overflow-wrap: anywhere; max-height: 3em; overflow: auto; }
html[data-theme=dark] .gift-address-actions { background: var(--surface, #20362b); }
.gift-address[data-compact-viewport=true] .message-head { padding: 6px 14px; align-items: center; }
.gift-address[data-compact-viewport=true] .message-head h2 { font-size: 18px; }
.gift-address[data-compact-viewport=true] :is(.message-head .small-label, #gift-address-product) { display: none; }
.gift-address[data-compact-viewport=true] #gift-address-status { max-height: 3.2em; }
@media (max-width: 600px) {
  .gift-address .message-head { padding: 12px 16px; gap: 12px; }
  .gift-address .message-head h2 { font-size: 21px; }
  .gift-address .message-head .small-label { display: none; }
  .gift-address-fields { padding: 16px; }
  .gift-address .shipping-grid :is(input, textarea) { font-size: 16px; }
  .gift-address-actions { padding: 10px 14px max(10px, env(safe-area-inset-bottom)); gap: 8px; }
  .gift-address-actions #gift-address-save { padding: 11px 13px; font-size: 13px; }
}
