/* Country Selector Styles */
.country-selector {
    position: relative;
    width: auto;
    min-width: 120px;
    max-width: 140px;
}

.country-selector__button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
}

.country-selector__button:hover {
    border-color: #294b6a;
}

.country-selector__button:focus {
    outline: none;
    border-color: #294b6a;
    box-shadow: 0 0 0 3px rgba(41, 75, 106, 0.1);
}

.country-selector__button--open {
    border-color: #294b6a;
    box-shadow: 0 0 0 3px rgba(41, 75, 106, 0.1);
}

.country-selector__selected {
    display: flex;
    align-items: center;
    gap: 6px;
}

.country-selector__flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.country-selector__code {
    font-weight: 600;
    color: #294b6a;
    font-size: 13px;
}

.country-selector__arrow {
    transition: transform 0.3s ease;
    color: #6b7280;
}

.country-selector__button--open .country-selector__arrow {
    transform: rotate(180deg);
}

.country-selector__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.country-selector__dropdown--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.country-selector__search {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
}

.country-selector__search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.country-selector__search-input:focus {
    border-color: #294b6a;
}

.country-selector__list {
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.country-selector__list::-webkit-scrollbar {
    width: 6px;
}

.country-selector__list::-webkit-scrollbar-track {
    background: transparent;
}

.country-selector__list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.country-selector__list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.country-selector__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    color: #374151;
}

.country-selector__option:hover {
    background-color: #f9fafb;
}

.country-selector__option--selected {
    background-color: #eff6ff;
    color: #294b6a;
    font-weight: 600;
}

.country-selector__option-flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.country-selector__option-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.country-selector__option-name {
    font-weight: 500;
    color: inherit;
}

.country-selector__option-code {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.country-selector__option--selected .country-selector__option-code {
    color: #294b6a;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .country-selector__dropdown {
        max-height: 250px;
    }
    
    .country-selector__list {
        max-height: 190px;
    }
    
    .country-selector__option {
        padding: 14px 16px;
    }
}
