.country-selector-host .select-box {
    --country-editor-bg: var(--dxds-color-surface-neutral-default-rest, var(--dxbl-fl-group-bg, var(--dxbl-group-bg, var(--bs-body-bg, #ffffff))));
    --country-editor-color: var(--dxds-color-content-neutral-default-rest, var(--dxbl-fl-group-color, var(--dxbl-group-color, var(--bs-body-color, #111827))));
    --country-editor-border: var(--dxds-color-border-neutral-default-rest, color-mix(in srgb, var(--country-editor-bg) 66%, var(--country-editor-color) 34%));
    position: relative;
    width: 100%;
}

.country-selector-host .selected-option {
    width: 100%;
}

.country-selector-host .selected-option-trigger {
    position: relative;
    width: 100%;
    min-height: var(--wa-phone-editor-height, 2.5rem);
    height: var(--wa-phone-editor-height, 2.5rem);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--country-editor-border);
    border-radius: 8px;
    background-color: var(--country-editor-bg);
    color: var(--country-editor-color);
    padding: 0 2rem 0 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.country-selector-host .selected-option-trigger:focus {
    outline: none;
    border-color: var(--primary-color, #0aa6c2);
    box-shadow: 0 0 0 3px rgba(10, 166, 194, 0.1);
}

.country-selector-host .selected-option-trigger::after {
    content: "";
    position: absolute;
    right: 0.75rem;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.2s ease;
}

.country-selector-host .selected-option-trigger.active::after {
    transform: translateY(-35%) rotate(225deg);
}

.country-selector-host .selected-flag-host,
.country-selector-host .selected-flag,
.country-selector-host .option-flag {
    font-size: 1rem;
    flex-shrink: 0;
}

.country-selector-host .selected-flag-host {
    display: inline-flex;
    align-items: center;
}

.country-selector-host .selected-country-code,
.country-selector-host .option-code {
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.country-selector-host .selected-country-name,
.country-selector-host .country-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-selector-host .selected-country-name {
    font-size: 0.85rem;
    color: inherit;
}

.country-selector-host .selected-option-trigger.is-empty .selected-flag-host,
.country-selector-host .selected-option-trigger.is-empty .selected-flag,
.country-selector-host .selected-option-trigger.is-empty .selected-country-code {
    display: none;
}

.country-selector-host .selected-option-trigger.is-empty .selected-country-name {
    color: color-mix(in srgb, var(--country-editor-color) 68%, transparent);
    font-weight: 500;
}

.country-selector-host .options {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    display: none;
    background: var(--country-editor-bg);
    border: 1px solid var(--country-editor-border);
    color: var(--country-editor-color);
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.15);
    z-index: 30;
    overflow: hidden;
}

.country-selector-host .options.active {
    display: block;
}

.country-selector-host .search-box {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--country-editor-border);
    background: var(--country-editor-bg);
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    color: var(--country-editor-color);
}

.country-selector-host .search-box:focus {
    outline: none;
    border-bottom-color: var(--primary-color, #0aa6c2);
}

.country-selector-host .options ol {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
}

.country-selector-host .option {
    display: block;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--country-editor-border);
}

.country-selector-host .option:last-child {
    border-bottom: none;
}

.country-selector-host .option-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-selector-host .option:hover {
    background-color: color-mix(in srgb, var(--country-editor-bg) 84%, var(--country-editor-color) 16%);
}

.country-selector-host .option.hide {
    display: none;
}

.country-selector-host.is-invalid .selected-option-trigger {
    border-color: var(--danger-color, #ef4444) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}
