/* =============================================================================
   Country Selector Styles - Following Jambvant UI Standards
   ============================================================================= */

.country-phone-input {
    display: flex;
    gap: 8px;
    width: 100%;
}

.country-selector {
    position: relative;
    flex-shrink: 0;
}

.country-selector-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 14px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    height: 48px;
    color: var(--text-dark);
}

.country-selector-trigger:hover {
    border-color: var(--primary-purple);
}

.country-flag {
    font-size: 18px;
    line-height: 1;
}

.country-dial {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
}

.dropdown-arrow {
    opacity: 0.6;
    transition: transform 0.2s ease;
    color: var(--text-gray);
}

.country-selector-trigger:hover .dropdown-arrow {
    opacity: 1;
    color: var(--primary-purple);
}

.country-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 140px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 280px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.country-search {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.country-search input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-dark);
    font-size: 14px;
}

.country-search input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.country-search input::placeholder {
    color: var(--text-gray);
}

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

.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text-dark);
}

.country-option:hover {
    background: var(--bg-light);
}

.country-option .country-flag {
    font-size: 18px;
}

.country-option .country-dial {
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
}

.phone-input-wrapper {
    flex: 1;
    position: relative;
}

.phone-input-wrapper .mobile-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-dark);
    font-size: 15px;
    transition: all 0.2s ease;
    height: 48px;
}

.phone-input-wrapper .mobile-input:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.phone-input-wrapper .mobile-input::placeholder {
    color: var(--text-gray);
}

/* Scrollbar styling for country list */
.country-list::-webkit-scrollbar {
    width: 6px;
}

.country-list::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.country-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.country-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-gray);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .country-phone-input {
        flex-direction: row;
        gap: 8px;
    }

    .country-selector-trigger {
        min-width: 90px;
        padding: 10px 12px;
    }

    .country-dropdown {
        min-width: 180px;
    }
}

/* Integration with existing form styles */
.form-group .country-phone-input {
    margin-bottom: 0;
}
