/**
 * Country Selector Component Styles
 */

/* Dropdown fade-in animation */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Dropdown visibility states */
#country-dropdown.hidden {
    display: none !important;
}

#country-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.2s ease-out forwards;
}

/* Country option styles */
.country-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid transparent;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

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

.country-option:hover {
    background-color: rgb(244 244 245);
}

html.dark .country-option:hover {
    background-color: rgb(55 55 62);
}

.country-option.selected {
    background-color: rgb(236 254 255);
}

html.dark .country-option.selected {
    background-color: rgb(22 78 99 / 0.5);
}

/* Flag icons */
.country-option .fi {
    font-size: 1rem;
    width: 1.25rem;
    display: inline-block;
}

/* Country code styling */
.country-option .country-code {
    font-weight: 500;
    color: rgb(161 161 170);
    min-width: 2.75rem;
    font-size: 0.875rem;
}

html.dark .country-option .country-code {
    color: rgb(113 113 122);
}

/* Country name styling */
.country-option .country-name {
    color: rgb(24 24 27);
    flex: 1;
}

html.dark .country-option .country-name {
    color: rgb(228 228 231);
}

/* Custom scrollbar for dropdown list */
#country-list::-webkit-scrollbar {
    width: 8px;
}

#country-list::-webkit-scrollbar-track {
    background: transparent;
}

#country-list::-webkit-scrollbar-thumb {
    background-color: rgb(228 228 231);
    border-radius: 4px;
    border: 2px solid white;
}

html.dark #country-list::-webkit-scrollbar-thumb {
    background-color: rgb(64 64 64);
    border: 2px solid rgb(24 24 27);
}

#country-list::-webkit-scrollbar-thumb:hover {
    background-color: rgb(180 180 185);
}

html.dark #country-list::-webkit-scrollbar-thumb:hover {
    background-color: rgb(87 87 87);
}

/* No results message */
.no-results {
    padding: 2rem;
    text-align: center;
    color: rgb(161 161 170);
}

html.dark .no-results {
    color: rgb(113 113 122);
}

/* Dropdown overflow handling */
#country-dropdown {
    overflow: hidden;
}
