.br-intl-phone {
    position: relative;
}

.br-intl-phone__control {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.br-intl-phone__trigger,
.br-intl-phone__number {
    position: relative;
    z-index: 1;
}

.br-intl-phone__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 110px;
    width: auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding-right: 0.85rem;
    white-space: nowrap;
}

.br-intl-phone__number {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
}

.br-intl-phone__flag {
    font-size: 1.1rem;
    line-height: 1;
}

.br-intl-phone__dial {
    font-weight: 600;
}

.br-intl-phone__chevron {
    margin-left: auto;
    font-size: 0.75rem;
    opacity: 0.7;
}

.br-intl-phone.is-open .br-intl-phone__trigger,
.br-intl-phone__trigger:focus,
.br-intl-phone__number:focus {
    z-index: 3;
}

.br-intl-phone__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: min(100%, 360px);
    max-height: 360px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 0.95rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    z-index: 50;
}

.br-intl-phone__search-wrap {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.92);
}

.br-intl-phone__search {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.75rem;
    background: #fff;
    color: #0f172a;
    padding: 0.7rem 0.85rem;
    outline: none;
}

.br-intl-phone__search:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.16);
}

.br-intl-phone__results {
    max-height: 292px;
    overflow: auto;
    padding: 0.35rem 0;
}

.br-intl-phone__section-title {
    padding: 0.55rem 0.9rem 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
    text-transform: uppercase;
}

.br-intl-phone__option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: #0f172a;
    padding: 0.72rem 0.9rem;
    text-align: left;
}

.br-intl-phone__option:hover,
.br-intl-phone__option.is-active {
    background: rgba(15, 23, 42, 0.06);
}

.br-intl-phone__option-flag {
    width: 1.5rem;
    flex: 0 0 1.5rem;
    text-align: center;
    font-size: 1.1rem;
}

.br-intl-phone__option-name {
    min-width: 0;
    flex: 1 1 auto;
}

.br-intl-phone__option-dial {
    font-weight: 600;
    color: #475569;
}

.br-intl-phone__empty {
    padding: 1rem 0.9rem;
    color: #64748b;
}

@media (max-width: 575.98px) {
    .br-intl-phone__dropdown {
        width: 100%;
    }

    .br-intl-phone__trigger {
        min-width: 118px;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

html.dark .br-intl-phone__dropdown {
    border-color: rgba(148, 163, 184, 0.22);
    background: #0f172a;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
}

html.dark .br-intl-phone__search-wrap {
    border-bottom-color: rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.92);
}

html.dark .br-intl-phone__search {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
}

html.dark .br-intl-phone__section-title,
html.dark .br-intl-phone__empty {
    color: #94a3b8;
}

html.dark .br-intl-phone__option {
    color: #f8fafc;
}

html.dark .br-intl-phone__option:hover,
html.dark .br-intl-phone__option.is-active {
    background: rgba(148, 163, 184, 0.12);
}

html.dark .br-intl-phone__option-dial {
    color: #cbd5e1;
}

@media (prefers-color-scheme: dark) {
    html:not(.light):not(.dark) .br-intl-phone__dropdown {
        border-color: rgba(148, 163, 184, 0.22);
        background: #0f172a;
        box-shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
    }

    html:not(.light):not(.dark) .br-intl-phone__search-wrap {
        border-bottom-color: rgba(148, 163, 184, 0.14);
        background: rgba(15, 23, 42, 0.92);
    }

    html:not(.light):not(.dark) .br-intl-phone__search {
        border-color: rgba(148, 163, 184, 0.2);
        background: rgba(15, 23, 42, 0.85);
        color: #f8fafc;
    }

    html:not(.light):not(.dark) .br-intl-phone__section-title,
    html:not(.light):not(.dark) .br-intl-phone__empty {
        color: #94a3b8;
    }

    html:not(.light):not(.dark) .br-intl-phone__option {
        color: #f8fafc;
    }

    html:not(.light):not(.dark) .br-intl-phone__option:hover,
    html:not(.light):not(.dark) .br-intl-phone__option.is-active {
        background: rgba(148, 163, 184, 0.12);
    }

    html:not(.light):not(.dark) .br-intl-phone__option-dial {
        color: #cbd5e1;
    }
}
