/* Country Autocomplete Component */
.country-autocomplete-wrapper {
    width: 100%;
}

.country-autocomplete-container {
    position: relative;
    width: 100%;
}

.country-tags-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    min-height: 46px;
    cursor: text;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.country-tags-input:focus-within {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.selected-countries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Pill/tag style for selected countries */
.country-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem 0.375rem 0.875rem;
    background: #1a1a1a;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.country-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.15s;
}

.country-tag-remove:hover {
    background: rgba(255, 255, 255, 0.35);
}

.country-tag-remove i {
    font-size: 0.625rem;
}

.country-search-input {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    padding: 0.25rem 0;
    font-size: 0.9375rem;
    background: transparent;
}

.country-search-input::placeholder {
    color: #999;
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 280px;
    overflow: hidden;
}

.country-dropdown-list {
    max-height: 280px;
    overflow-y: auto;
}

.country-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s;
}

.country-option:hover {
    background: #f5f5f5;
}

.country-option.selected {
    background: #f0f7ff;
    color: #0066cc;
}

.country-option.selected:hover {
    background: #e5f0fa;
}

.country-option i {
    font-size: 0.75rem;
    color: #0066cc;
}

.country-name {
    font-size: 0.9375rem;
}

.country-name strong {
    font-weight: 600;
    color: #000;
}

.country-no-results {
    padding: 1rem;
    text-align: center;
    color: #888;
    font-size: 0.875rem;
}

/* Ensure parent doesn't clip dropdown */
.form-group:has(.country-autocomplete-wrapper) {
    overflow: visible;
}

.settings-form {
    overflow: visible;
}

.settings-section {
    overflow: visible;
}

