.country-selector-host .select-box {
    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(--gray-300, #d1d5db);
    border-radius: 8px;
    background-color: #fff;
    color: var(--gray-900, #111827);
    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 var(--gray-600, #4b5563);
    border-bottom: 2px solid var(--gray-600, #4b5563);
    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: var(--gray-700, #374151);
}

.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: var(--gray-500, #6b7280);
    font-weight: 500;
}

.country-selector-host .options {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    display: none;
    background: #fff;
    border: 1px solid var(--gray-300, #d1d5db);
    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(--gray-200, #e5e7eb);
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
    color: var(--gray-900, #111827);
}

.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(--gray-100, #f3f4f6);
}

.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: var(--gray-50, #f9fafb);
}

.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;
}
