.pp-country-picker {
    position: relative;
    width: 280px;
    max-width: 100%;
    flex-shrink: 0;
}

.pp-country-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.pp-country-trigger:disabled {
    opacity: .55;
    cursor: default;
}

.pp-country-trigger[aria-expanded="true"],
.pp-country-trigger:focus-visible,
.pp-country-actions button:focus-visible {
    outline: 2px solid var(--text-secondary);
    outline-offset: 2px;
}

.pp-country-panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 90;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 12px 30px #0008;
}

.pp-country-panel[hidden],
.pp-country-empty[hidden] {
    display: none;
}

.pp-country-panel .pp-country-search {
    width: 100%;
    min-width: 0;
    max-width: none;
    text-align: left;
}

.pp-country-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: space-between;
    margin: 10px 2px;
}

.pp-country-actions button {
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.pp-country-actions button:disabled {
    color: var(--text-muted);
    cursor: default;
}

.pp-country-list {
    max-height: min(268px, 38vh);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.pp-country-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 6px 7px;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
}

.pp-country-option:hover,
.pp-country-option:focus-within {
    background: var(--bg-hover);
}

.pp-country-option input {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    accent-color: var(--text-primary);
}

.pp-country-option > span:not(.pp-country-code) {
    overflow-wrap: anywhere;
}

.pp-country-code {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 11px;
    flex-shrink: 0;
}

.pp-country-empty {
    padding: 16px 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.pp-country-attribution {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 10px;
}

@media (max-width: 760px) {
    .pp-country-picker {
        width: 100%;
    }
}
