/* Keep native Hyva markup and controls; scope placement styles to this module. */
.kowal-currency-slot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    order: 100;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    margin-inline-start: 0.25rem;
}

.kowal-currency-slot > .kowal-currency {
    flex: 0 0 auto;
}

.kowal-currency-footer {
    padding-block: 1.5rem;
}

.kowal-currency {
    position: relative;
    max-width: 100%;
    text-align: start;
}

.kowal-currency > [x-data] {
    width: 100%;
    max-width: 100%;
    padding-inline-end: 0;
}

.kowal-currency [x-data] > .relative {
    max-width: 100%;
}

.kowal-currency .form-select {
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    cursor: pointer;
}

.kowal-currency nav {
    z-index: 50;
    width: 100%;
    min-width: 100%;
    max-width: min(22rem, calc(100vw - 2rem));
    max-height: min(24rem, 60vh);
    overflow: auto;
    color: #111827;
    background: #fff;
    text-align: start;
}

.kowal-currency nav button {
    white-space: normal;
    overflow-wrap: anywhere;
}

.kowal-currency--header,
.kowal-currency--inline {
    display: inline-block;
    vertical-align: middle;
}

.kowal-currency--header [x-data] > h2,
.kowal-currency--inline [x-data] > h2 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.kowal-currency--header .form-select,
.kowal-currency--inline .form-select {
    width: auto;
    max-width: 13rem;
    min-height: 2rem;
    padding-block: 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    color: #111827;
    background-color: #fff;
}

.kowal-currency--footer nav {
    top: auto;
    bottom: 100%;
    margin-block: 0 0.25rem;
}

.kowal-currency--header .form-select {
    max-width: 7rem;
}

@media (max-width: 767px) {
    .kowal-currency-slot {
        margin-inline-start: 0;
    }

    .kowal-currency--header .form-select,
    .kowal-currency--inline .form-select {
        max-width: min(11rem, calc(100vw - 2rem));
        min-height: 2.75rem;
    }

    .kowal-currency nav button {
        min-height: 2.75rem;
    }

    .kowal-currency--header .form-select {
        max-width: 6rem;
    }
}
