@import (reference) '@sb1/ffe-core/less/breakpoints';

.ffe-phone-number {
    &__input-group {
        @media (min-width: @breakpoint-sm) {
            display: flex;
        }
        & > * {
            margin-top: 0;
        }
    }

    &__country-code &__input-group {
        display: flex;
    }

    &__country-code {
        min-width: 110px;
        flex-grow: 1;

        label {
            white-space: nowrap;
            margin-right: var(--ffe-spacing-xs);
        }

        @media (max-width: (@breakpoint-sm - 1)) {
            margin-bottom: var(--ffe-spacing-xs);
        }
    }

    &__country-code-input {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;

        @media (min-width: @breakpoint-sm) {
            max-width: 4rem;
            margin-right: var(--ffe-spacing-sm);
        }
    }

    &__plus {
        font-weight: 400;
        line-height: 1;
        padding: 12px var(--ffe-spacing-sm);
        background-color: var(--ffe-color-surface-primary-default);
        border: var(--ffe-g-border-width) solid
            var(--ffe-color-border-primary-default);
        border-radius: var(--ffe-g-border-radius) 0 0 var(--ffe-g-border-radius);
        border-right: 0;
        transition: border-color var(--ffe-transition-duration) var(--ffe-ease);
        color: var(--ffe-color-foreground-default);
        display: flex;
        align-items: center;
    }

    &__number {
        flex-grow: 10000; // Make this element fill all remaining white space

        label {
            white-space: nowrap;
        }
    }

    &__phone-input:disabled,
    &__country-code-input:disabled {
        color: transparent;
    }
}
