.phone-wrapper {
    position: relative;
}

.phone-input {
    display: flex;
    width: 100%;
    height: 50px;

    border: 1px solid #cce3ee;
    border-radius: 13px;

    background: #f8fcfe;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.phone-input:focus-within {
    background: white;
    border-color: #1689c7;

    box-shadow:
        0 0 0 3px rgba(22, 137, 199, 0.1);
}

.phone-input__country {
    display: flex;
    align-items: center;
    gap: 9px;

    width: 115px;
    flex-shrink: 0;

    padding: 0 14px;

    border: 0;
    border-right: 1px solid #cce3ee;

    background: transparent;
    color: #123047;

    font-family: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}

.phone-input__flag {
    width: 24px;
    height: 24px;

    flex: 0 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: "Apple Color Emoji",
                 "Segoe UI Emoji",
                 "Noto Color Emoji",
                 sans-serif;

    font-size: 20px;
    line-height: 1;
}

.phone-input__dial {
    white-space: nowrap;

    font-size: 14px;
    font-weight: 600;
}

.phone-input__arrow {
    margin-left: 2px;

    color: #8aa0ac;

    font-size: 15px;
}

.phone-input__number {
    flex: 1;

    min-width: 0;

    height: 100%;

    padding: 0 14px;

    border: 0;
    outline: none;

    background: transparent;
    color: #123047;

    font-family: inherit;
    font-size: 15px;
}

.phone-input__number::placeholder {
    color: #9aafb9;
}

/* =========================
   COUNTRY LIST
   ========================= */

.phone-countries {
    position: absolute;

    top: calc(100% + 8px);
    left: 0;
    right: 0;

    display: none;

    max-height: 260px;

    overflow-y: auto;

    padding: 6px;

    background: white;

    border: 1px solid #cce3ee;
    border-radius: 14px;

    box-shadow:
        0 15px 40px rgba(40, 100, 130, 0.15);

    z-index: 50;
}

.phone-countries.visible {
    display: block;
}

.phone-country {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    border: 0;
    border-radius: 9px;

    background: transparent;
    color: #123047;

    font-family: inherit;

    cursor: pointer;

    text-align: left;
}

.phone-country:hover {
    background: rgba(22, 137, 199, 0.08);
}

.phone-country__flag {
    width: 28px;
    height: 24px;

    flex: 0 0 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: "Apple Color Emoji",
                 "Segoe UI Emoji",
                 "Noto Color Emoji",
                 sans-serif;

    font-size: 20px;
    line-height: 1;
}

.phone-country__name {
    flex: 1;

    font-size: 14px;
}

.phone-country__dial {
    color: #647d8c;

    font-size: 13px;
}

.phone-input__flag img.emoji,
.phone-country__flag img.emoji {
    width: 20px;
    height: 20px;
    display: block;
}

body.dark .phone-input {
    background: var(--surface-soft);
    border-color: var(--input-border);
}

body.dark .phone-input:focus-within {
    background: var(--surface);
}

body.dark .phone-input__country {
    color: var(--text);
    border-right-color: var(--input-border);
}

body.dark .phone-input__number {
    color: #123047;
}

body.dark .phone-input__number::placeholder {
    color: var(--text-muted);
}

body.dark .phone-countries {
    background: var(--surface);
    border-color: var(--border);
    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.35);
}

body.dark .phone-country {
    color: var(--text);
}

body.dark .phone-country:hover {
    background: rgba(36, 155, 211, 0.12);
}

body.dark .phone-country__dial {
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .phone-input__country {
        padding: 0 10px;
    }

    .phone-input__number {
        padding: 0 10px;
    }
}

