/* Country Code Dropdown Styles */
.phone-input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-code-dropdown {
    position: relative;
    flex-shrink: 0;
}

.country-code-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
 /**   background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333333;
    transition: all 0.3s ease;
    min-width: 90px;
    height: 48px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); **/
}

/**.country-code-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
} **/

.country-code-btn:focus {
 /**   outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); **/
}

.selected-code {
    font-weight: 600;
    color: #007bff;
        flex: 1;
    text-align: left;
    margin-right: 8px;
}

.country-code-btn iconify-icon {
    flex-shrink: 0;
    color: #666;
}

.country-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 320px;
    overflow: hidden;
    margin-top: 6px;
    backdrop-filter: blur(10px);
}

.search-box {
    position: relative;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: white;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.search-box input::placeholder {
    color: #999;
}

.search-box iconify-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 1;
}

.country-options {
    max-height: 260px;
    overflow-y: auto;
    padding: 8px 0;
}

.country-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
}

.country-option:hover {
    background-color: #f8f9ff;
    border-left: 3px solid #007bff;
}

.country-option:last-child {
    border-bottom: none;
}

.country-option.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #007bff;
}

.country-name {
    font-size: 14px;
    color: #333333;
    flex: 1;
    font-weight: 500;
}

.country-code {
    font-size: 14px;
    color: #007bff;
    font-weight: 600;
    margin-left: 12px;
    background: #f0f8ff;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

/* Custom scrollbar for country options */
.country-options::-webkit-scrollbar {
    width: 8px;
}

.country-options::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

.country-options::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
    opacity: 0.7;
}

.country-options::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .phone-input-container {
     /**   flex-direction: column; **/
        align-items: stretch;
        gap: 12px;
    }
    
    .country-code-dropdown {
        align-self: flex-start;
    }
    
    .country-code-btn {
    **/    min-width: 80px; **/
        padding: 10px 12px;
        font-size: 13px;
        height: 44px;
    }
    
    .country-list {
        max-height: 280px;
        width: 280px;
        left: 0;
        right: auto;
    }
    
    .country-options {
        max-height: 220px;
    }
    
    .search-box {
        padding: 12px;
    }
    
    .search-box input {
        padding: 10px 14px 10px 36px;
    }
    
    .country-option {
        padding: 10px 12px;
    }
}

/* Animation for dropdown */
.country-list {
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top center;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smooth transitions for all interactive elements */
.country-code-btn,
.country-option,
.search-box input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.country-option:focus {
    outline: none;
    background-color: #e3f2fd;
    border-left: 3px solid #007bff;
}

/* Loading state */
.country-code-dropdown.loading .country-code-btn {
    opacity: 0.7;
    cursor: not-allowed;
}

.country-code-dropdown.loading .country-code-btn::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 6px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced visual feedback */
.country-code-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Empty state styling */
.country-options:empty::after {
    content: 'No countries found';
    display: block;
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .country-code-btn {
        border-width: 2px;
    }
    
    .country-option:hover {
        background-color: #000;
        color: #fff;
    }
} 