/* One phone field for login, registration, employees, and contacts. */

.wms-phone {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 2.7rem;
    border: 1px solid #dde2eb;
    border-radius: 0.5rem;
    background: #fff;
    color: #1f2937;
}

.modal .wms-phone,
.wms-account .wms-phone {
    min-height: 2.25rem;
}

.wms-phone:hover {
    border-color: #b7c2d0;
}

.wms-phone:focus-within {
    border-color: #1b7a48;
    box-shadow: 0 0 0 3px rgba(27, 122, 72, 0.16);
}

.wms-phone.is-invalid {
    border-color: #c23b3b;
}

.wms-phone.is-invalid:focus-within {
    border-color: #c23b3b;
    box-shadow: 0 0 0 3px rgba(194, 59, 59, 0.16);
}

.wms-phone__prefix {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0 0.55rem 0 0.6rem;
    border: 0;
    border-right: 1px solid #e6ebf2;
    border-radius: 0.5rem 0 0 0.5rem;
    background: #f7f9fb;
    color: #1f2937;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.wms-phone__prefix:hover,
.wms-phone.is-open .wms-phone__prefix {
    background: #eef6f2;
    color: #146c43;
}

.wms-phone__prefix:focus {
    outline: 0;
}

.wms-phone__mark {
    display: flex;
    flex: 0 0 1.25rem;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
}

.wms-phone__flag {
    display: block;
    width: 1.25rem;
    height: 0.875rem;
    border-radius: 0.15rem;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.wms-phone__globe {
    display: block;
    width: 1rem;
    height: 1rem;
    color: #5e6c84;
}

.wms-phone__prefix:hover .wms-phone__globe,
.wms-phone.is-open .wms-phone__globe {
    color: #146c43;
}

.wms-phone__code,
.wms-phone__dial {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.wms-phone__chevron {
    width: 0.7rem;
    height: 0.7rem;
    color: #5e6c84;
}

.wms-phone.is-open .wms-phone__chevron {
    transform: rotate(180deg);
}

.wms-phone__national {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0 0.75rem;
    border: 0;
    border-radius: 0 0.5rem 0.5rem 0;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 0.9375rem;
    line-height: 1.2;
    box-shadow: none;
    appearance: none;
}

.modal .wms-phone__national,
.wms-account .wms-phone__national {
    font-size: 0.875rem;
}

.wms-phone__national:focus {
    outline: 0;
}

.wms-phone__national::placeholder {
    color: #5e6c84;
    font-weight: 500;
    opacity: 1;
}

.wms-phone__menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 16rem;
    margin: 0;
    padding: 0.3rem;
    border: 1px solid #dde2eb;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.wms-phone.is-up .wms-phone__menu {
    top: auto;
    bottom: calc(100% + 0.35rem);
}

.wms-phone__menu[hidden] {
    display: none;
}

.wms-phone__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    min-height: 2.25rem;
    margin: 0;
    padding: 0.3rem 0.5rem;
    border: 0;
    border-radius: 0.45rem;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.wms-phone__option:hover,
.wms-phone__option:focus-visible {
    background: #f4f6f8;
    outline: 0;
}

.wms-phone__option[aria-selected="true"] {
    background: #e5f6ec;
}

.wms-phone__option[aria-selected="true"] .wms-phone__dial {
    color: #146c43;
}

.wms-phone__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wms-phone__dial {
    flex: 0 0 auto;
    color: #5e6c84;
    font-size: 0.8125rem;
}

.wms-phone__divider {
    height: 1px;
    margin: 0.2rem 0.45rem;
    background: #eef1f4;
}

.form-group:has(.wms-phone.is-open),
.mb-3:has(.wms-phone.is-open) {
    position: relative;
    z-index: 40;
}

.wms-account__card:has(.wms-phone.is-open) {
    overflow: visible;
}
