.haal-welcome {
    --haal-accent: var(--wd-primary-color, #b87333);
    --haal-button: var(--btn-accented-bgcolor, #727376);
    --haal-heading: var(--wd-title-color, #242424);
    font-family: var(--wd-text-font, inherit);
}

.haal-welcome .haal-welcome__launcher,
.haal-welcome .haal-welcome__submit,
.haal-welcome .haal-welcome__close {
    appearance: none;
    margin: 0;
    border: 0;
    font-family: inherit;
    text-transform: none;
    cursor: pointer;
}

.haal-welcome .haal-welcome__launcher {
    position: fixed;
    z-index: 1000;
    top: 50%;
    left: env(safe-area-inset-left, 0px);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 44px;
    padding: .5rem .7rem;
    border-radius: 0 .75rem .75rem 0;
    border-right: 3px solid var(--haal-accent);
    background: #242424;
    box-shadow: 0 6px 20px rgba(24, 19, 16, .24);
    color: #fff;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.45;
    transform: translateY(-50%);
}

.haal-welcome .haal-welcome__launcher[hidden] {
    display: none;
}

.haal-welcome__launcher svg {
    flex: none;
    color: #e4b78c;
}

.haal-welcome .haal-welcome__launcher:hover {
    background: #36312d;
}

.haal-welcome .haal-welcome__dialog {
    position: fixed;
    inset: 0;
    width: min(27rem, calc(100% - 2rem));
    max-width: none;
    max-height: calc(100% - 2rem);
    box-sizing: border-box;
    margin: auto;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #eadacb;
    border-radius: .85rem;
    background: #fffdfa;
    box-shadow: 0 22px 70px rgba(24, 19, 16, .25);
    color: #555;
    text-align: right;
}

.haal-welcome .haal-welcome__dialog:not([open]) {
    display: none;
}

.haal-welcome__dialog::backdrop {
    background: rgba(31, 25, 22, .48);
    -webkit-backdrop-filter: blur(9px);
    backdrop-filter: blur(9px);
}

html:has(.haal-welcome__dialog[open]) {
    overflow: hidden;
}

.haal-welcome__panel {
    position: relative;
    padding: clamp(1.35rem, 5vw, 2rem);
    border-top: 3px solid var(--haal-accent);
}

.haal-welcome .haal-welcome__close {
    position: absolute;
    top: .6rem;
    left: .6rem;
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--haal-heading);
}

.haal-welcome .haal-welcome__close:hover {
    background: #f1e9e0;
}

.haal-welcome .haal-welcome__brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .65rem;
    color: #834b22;
    font-size: .88rem;
    font-weight: 600;
}

.haal-welcome__brand::after {
    width: 1.5rem;
    height: 1px;
    background: var(--haal-accent);
    content: '';
}

.haal-welcome .haal-welcome__title {
    margin: 0 0 .5rem;
    color: var(--haal-heading);
    font-family: var(--wd-title-font, inherit);
    font-size: clamp(1.5rem, 6vw, 1.9rem);
    font-weight: var(--wd-title-font-weight, 600);
    line-height: 1.35;
}

.haal-welcome .haal-welcome__title:focus {
    outline: none;
}

.haal-welcome .haal-welcome__description {
    margin: 0 0 1.15rem;
    font-size: .94rem;
    line-height: 1.9;
}

.haal-welcome__form label {
    display: block;
    margin: 0 0 .35rem;
    color: var(--haal-heading);
    font-size: .9rem;
    font-weight: 600;
}

.haal-welcome .haal-welcome__form input {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    height: auto;
    margin: 0 0 .65rem;
    padding: .55rem .75rem;
    border: var(--wd-form-brd-width, 1px) solid #a3988c;
    border-radius: var(--wd-form-brd-radius, .6rem);
    background: #fff;
    color: var(--haal-heading);
    font: inherit;
    font-size: 16px;
    text-align: left;
}

.haal-welcome .haal-welcome__submit {
    width: 100%;
    min-height: 46px;
    padding: .55rem .75rem;
    border-radius: var(--btn-accented-brd-radius, .6rem);
    background: var(--haal-button);
    color: #fff;
    font-size: .94rem;
    font-weight: 600;
    line-height: 1.5;
}

.haal-welcome .haal-welcome__submit:hover:not(:disabled) {
    background: var(--haal-accent);
    color: #16110d;
}

.haal-welcome .haal-welcome__submit:disabled {
    opacity: .7;
    cursor: default;
}

.haal-welcome :is(button, input):focus-visible {
    outline: 2px solid #834b22;
    outline-offset: 2px;
}

.haal-welcome .haal-welcome__feedback {
    margin: .65rem 0 0;
    font-size: .9rem;
    line-height: 1.65;
}

.haal-welcome .haal-welcome__feedback:empty {
    margin: 0;
}

.haal-welcome__feedback[data-state='error'] {
    color: #922c25;
}

.haal-welcome__feedback[data-state='success'] {
    color: #286044;
}

@media (max-width: 37.5rem) {
    .haal-welcome .haal-welcome__launcher {
        gap: .3rem;
        padding-inline: .5rem;
        font-size: .8rem;
    }

    .haal-welcome__launcher svg {
        width: 16px;
        height: 16px;
    }
}
