/* ── Alpine cloak ────────────────────────────────────────────────────────────── */
[data-x-cloak] { display: none !important; }

/* ── Overlay wrapper ─────────────────────────────────────────────────────────── */
.watershed-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.watershed-overlay__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 23, 49, 0.55);
    backdrop-filter: blur(3px);
    cursor: pointer;
}

/* ── Panel ───────────────────────────────────────────────────────────────────── */
.watershed-overlay__panel {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 24px 64px -20px rgba(94, 60, 93, 0.45);
    padding: 2.5rem 2rem 2rem;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ── Close button ────────────────────────────────────────────────────────────── */
.watershed-overlay__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}
.watershed-overlay__close:hover,
.watershed-overlay__close:focus-visible {
    color: #141731;
    background: #f3eaf2;
}
.watershed-overlay__close:focus-visible {
    outline: 3px solid var(--focus-outline-color, #1696e7);
    outline-offset: 2px;
}

/* ── Title + hint ────────────────────────────────────────────────────────────── */
.watershed-overlay__title {
    font-family: var(--font-family-heading, 'Raleway', sans-serif);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-heading-deep, #141731);
    margin: 0;
}
.watershed-overlay__hint {
    color: var(--color-text-muted, #666);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.6;
}

/* ── Input form ──────────────────────────────────────────────────────────────── */
.watershed-overlay__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.watershed-overlay__label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-heading-deep, #141731);
}
.watershed-overlay__row {
    display: flex;
    gap: 0.5rem;
}
.watershed-overlay__input {
    flex: 1;
    min-width: 0;
    padding: 0.6rem 0.875rem;
    border: 1.5px solid var(--color-border, #eceff8);
    border-radius: 0.6rem;
    font-size: 1rem;
    color: var(--color-text, #141731);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.watershed-overlay__input:focus {
    outline: none;
    border-color: var(--color-primary, #9a6699);
    box-shadow: 0 0 0 3px rgba(154, 102, 153, 0.2);
}
.watershed-overlay__submit {
    white-space: nowrap;
    flex-shrink: 0;
}
.watershed-overlay__submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.watershed-overlay__error {
    color: #b21917;
    font-size: 0.875rem;
    margin: 0;
}

/* ── Ort-Auswahl ─────────────────────────────────────────────────────────────── */
.watershed-overlay__places {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 15rem;
    overflow-y: auto;
}
.watershed-overlay__place-btn {
    width: 100%;
    text-align: left;
    padding: 0.6rem 0.875rem;
    background: #ffffff;
    border: 1.5px solid var(--color-border, #eceff8);
    border-radius: 0.6rem;
    font-size: 1rem;
    color: var(--color-text, #141731);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.watershed-overlay__place-btn:hover,
.watershed-overlay__place-btn:focus-visible {
    border-color: var(--color-primary, #9a6699);
    background: #f9f4f8;
}
.watershed-overlay__place-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(154, 102, 153, 0.2);
}
.watershed-overlay__place-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Result states ───────────────────────────────────────────────────────────── */
.watershed-overlay__result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    padding-top: 0.5rem;
}
.watershed-overlay__icon {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
}
.watershed-overlay__result-text {
    font-size: 1rem;
    color: var(--color-text, #141731);
    margin: 0;
    line-height: 1.5;
}
.watershed-overlay__result-sub {
    font-size: 0.875rem;
    color: var(--color-text-muted, #666);
    margin: -0.5rem 0 0;
}
.watershed-overlay__cta {
    width: 100%;
    text-align: center;
}
.watershed-overlay__retry-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--color-primary-dark, #835782);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.watershed-overlay__retry-btn:hover,
.watershed-overlay__retry-btn:focus-visible {
    color: var(--color-primary, #9a6699);
}
.watershed-overlay__retry-btn:focus-visible {
    outline: 3px solid var(--focus-outline-color, #1696e7);
    outline-offset: 2px;
    border-radius: 2px;
}
