/* Copyright (c) 2026 Daniel Bauer - ELAAX. Alle Rechte vorbehalten. */
.address-confirmation { max-width: min(44rem, 94vw); max-height: 90vh; overflow: auto; border: 1px solid var(--border, #ccc); border-radius: 5px; padding: 1.25rem; background: var(--panel, #fff); color: var(--ink, #222); }
.address-confirmation::backdrop { background: rgb(0 0 0 / 45%); }
.address-confirmation dl { display: grid; grid-template-columns: minmax(7rem, 1fr) minmax(0, 2fr); gap: .5rem 1rem; }
.address-confirmation dd { margin: 0; overflow-wrap: anywhere; }
.address-provider-view { border: 1px solid var(--border, #ccc); border-radius: 5px; margin-block: .5rem; padding: .5rem; }
.address-provider-map { display: block; width: 600px; max-width: 100%; height: auto; object-fit: contain; }
.address-provider-attribution { font: 400 14px sans-serif; white-space: nowrap; color: #1f1f1f; background: #fff; padding: 2px 4px; }
.address-editor .address-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; width: 100%; max-width: none; }
.address-editor .address-country { width: 100%; max-width: none; margin-block: .75rem 1rem; }
/* The editor can be embedded in a host form grid (for example the public contact modal).
   Its generated sections must remain complete rows instead of becoming individual grid cells. */
.address-editor .address-location-panel, .address-editor .address-country, .address-editor .address-details, .address-editor .address-more, .address-editor .address-restore, .address-editor .form-hint { grid-column: 1 / -1; }
.address-editor [data-address-slot] { display: flex; flex-direction: column; align-items: stretch; gap: .375rem; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; }
.address-editor [data-address-slot] > span { font-size: .75rem; font-weight: 700; }
.address-editor [data-address-slot] input, .address-editor [data-address-slot] select { box-sizing: border-box; width: 100%; min-height: 2.75rem; }
.address-editor [hidden] { display: none !important; }
.address-editor .address-location-panel { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: .85rem; align-items: center; margin-block: .75rem 1rem; padding: 1rem 1.1rem; border: 1px solid color-mix(in srgb, var(--primary, #85159b) 38%, var(--border, #ccc)); border-radius: 5px; background: linear-gradient(105deg, color-mix(in srgb, var(--primary, #85159b) 9%, var(--panel, #fff)), var(--panel, #fff)); }
.address-editor .address-location-panel-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--primary, #85159b); color: #fff; }
.address-editor .address-location-panel-icon svg { width: 1.4rem; height: 1.4rem; fill: currentColor; }
.address-editor .address-location-panel-content { display: grid; gap: .2rem; min-width: 0; }
.address-editor .address-location-panel-content strong { font-size: 1rem; }
.address-editor .address-location-panel-content span { color: var(--muted, #666); font-size: .9rem; line-height: 1.4; }
.address-editor .address-location-panel > .address-location-progress,
.address-editor .address-location-panel > .address-location-status { grid-column: 1 / -1; width: auto; margin: .15rem 0 0; }
.address-editor .address-locate { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 2.75rem; margin: 0; padding: .55rem .9rem; border: 1px solid var(--primary, #85159b); border-radius: 4px; background: var(--primary, #85159b); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.address-editor .address-locate:hover { filter: brightness(.93); }
.address-editor .address-locate:disabled { opacity: .72; cursor: wait; }
.address-editor .address-more { width: 100%; max-width: none; margin-block: 1rem; }
.address-editor .address-more summary { cursor: pointer; padding-block: .5rem; }
.address-editor .address-more[open] summary { margin-bottom: .5rem; }
.address-editor .address-results:empty, .address-editor [role="status"]:empty { display: none; }
.address-editor .address-result { display: block; width: 100%; text-align: start; padding: .75rem; white-space: normal; }
.address-editor button:focus-visible, .address-editor summary:focus-visible { outline: 2px solid var(--primary, #85159b); outline-offset: 3px; }
@media (max-width: 600px) { .address-editor .address-details { grid-template-columns: minmax(0, 1fr); } .address-editor .address-country { max-width: none; } }
@media (max-width: 600px) { .address-editor .address-location-panel { grid-template-columns: 2.5rem minmax(0, 1fr); } .address-editor .address-locate { grid-column: 1 / -1; width: 100%; } }

.address-editor .address-restore { width: auto; justify-self: start; align-self: start; margin-block: .5rem 1rem; }
.address-editor .address-result-translation { display: block; margin-top: .25rem; color: var(--muted, #666); }

.address-editor .address-search-control, .address-compact-search .address-search-control { position: relative; display: block; width: 100%; }
.address-editor .address-search-control input, .address-compact-search .address-search-control input { box-sizing: border-box; width: 100%; min-height: 2.75rem; padding-inline-end: 3.25rem; }
.address-editor .address-search-submit, .address-compact-search .address-search-submit { position: absolute; inset-inline-end: .15rem; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; min-height: 2.5rem; padding: .5rem; border: 0; }
.address-editor .address-search-submit svg, .address-compact-search .address-search-submit svg { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.address-editor .address-location-progress { display: flex; align-items: center; gap: 1rem; padding: 1rem; margin-block: .75rem .5rem; border: 1px solid var(--primary, #85159b); border-radius: 5px; background: var(--panel, #fff); color: var(--ink, #222); }
.address-editor .address-location-spinner { flex: 0 0 auto; width: 2rem; height: 2rem; border: 3px solid var(--border, #ddd); border-top-color: var(--primary, #85159b); border-radius: 50%; animation: address-location-spin 1s linear infinite; }
.address-editor .address-location-progress-content { min-width: 0; display: grid; gap: .5rem; }
.address-editor .address-location-steps { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; padding: 0; margin: 0; counter-reset: address-step; font-size: .9rem; }
.address-editor .address-location-steps li { display: flex; align-items: center; gap: .4rem; color: var(--muted, #666); counter-increment: address-step; }
.address-editor .address-location-steps li::before { content: counter(address-step); display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border: 1px solid currentColor; border-radius: 50%; font-size: .8rem; }
.address-editor .address-location-steps .is-active { color: var(--primary, #85159b); font-weight: 600; }
.address-editor .address-location-steps .is-complete::before { content: "✓"; }
.address-editor .address-location-time { color: var(--muted, #666); font-size: .85rem; font-variant-numeric: tabular-nums; }
.address-editor .address-location-status { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .75rem; align-items: start; margin-block: .75rem 1rem; padding: .85rem 1rem; border-inline-start: 4px solid var(--primary, #85159b); border-radius: 5px; background: color-mix(in srgb, var(--primary, #85159b) 7%, var(--panel, #fff)); color: var(--ink, #222); line-height: 1.45; }
.address-editor .address-location-status-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--primary, #85159b); color: #fff; font-weight: 700; }
.address-editor .address-location-status-icon::before { content: "i"; }
.address-editor .address-location-status-text { padding-block: .2rem; }
.address-editor .address-location-status[data-tone="success"] { border-color: #237a4b; background: #edf8f1; }
.address-editor .address-location-status[data-tone="success"] .address-location-status-icon { background: #237a4b; }
.address-editor .address-location-status[data-tone="success"] .address-location-status-icon::before { content: "✓"; }
.address-editor .address-location-status[data-tone="restored"] { border-color: #4d6275; background: #f1f5f8; }
.address-editor .address-location-status[data-tone="restored"] .address-location-status-icon { background: #4d6275; }
.address-editor .address-location-status[data-tone="restored"] .address-location-status-icon::before { content: "↶"; font-size: 1.25rem; }
.address-editor .address-location-status[data-tone="warning"], .address-editor .address-location-status[data-tone="error"] { border-color: #a15c00; background: #fff7e7; }
.address-editor .address-location-status[data-tone="warning"] .address-location-status-icon, .address-editor .address-location-status[data-tone="error"] .address-location-status-icon { background: #a15c00; }
.address-editor .address-location-status[data-tone="warning"] .address-location-status-icon::before, .address-editor .address-location-status[data-tone="error"] .address-location-status-icon::before { content: "!"; }
@keyframes address-location-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .address-editor .address-location-spinner { animation: none; } }

/* Gemeinsame Adresspflege in Backoffice-Profilen. */
.profile-address > [data-profile-edit-form] { margin: .75rem 1rem; }
.profile-address__form { margin: 0; padding: 0; }
.profile-address__editor { display: none; padding: 1rem; }
.profile-address__editor fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.profile-address__editor legend { font-weight: 600; margin-bottom: .75rem; }
.profile-address__form.is-editing .profile-address__summary { display: none; }
.profile-address__form.is-editing .profile-address__editor { display: block; }
.profile-grid > .profile-address { grid-column: 1 / -1; min-width: 0; }
