/* Country Code Dropdown Styles */
.country-code-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
}

.country-code-select {
    flex: 0 0 auto;
    min-width: 105px;
    max-width: 120px;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: none !important;
    background-color: #f8f9fa !important;
    padding: 0.75rem 1.75rem 0.75rem 0.75rem !important;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    font-weight: 500;
    color: #2d3748 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 48px;
}

.country-code-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background-color: white;
    outline: none;
}

.country-code-select option {
    padding: 0.5rem;
    font-size: 0.95rem;
}

.contact-number-input {
    flex: 1 1 auto;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.contact-number-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.contact-number-input::placeholder {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* For enhanced forms */
.form-control-enhanced.country-code-select {
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 12px 0 0 12px;
    transition: all 0.3s ease;
    border-right: none;
}

.form-control-enhanced.country-code-select:hover {
    background: #f1f3f5;
    border-color: #cbd5e0;
}

.form-control-enhanced.country-code-select:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    z-index: 1;
    position: relative;
}

.form-control-enhanced.contact-number-input {
    border-radius: 0 12px 12px 0;
    border-left: 2px solid #e2e8f0;
    padding-left: 1rem;
}

.form-control-enhanced.contact-number-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    border-left-color: #667eea;
    z-index: 1;
    position: relative;
}

/* For rounded-3 forms (ClientSignUp) */
.country-code-select.rounded-3 {
    border-radius: 0.5rem 0 0 0.5rem !important;
}

.contact-number-input.rounded-3 {
    border-radius: 0 0.5rem 0.5rem 0 !important;
}

/* Ensure seamless connection between select and input */
.country-code-wrapper .country-code-select,
.country-code-wrapper .contact-number-input {
    box-shadow: none;
}

.country-code-wrapper:focus-within {
    position: relative;
}

.country-code-wrapper:focus-within .country-code-select,
.country-code-wrapper:focus-within .contact-number-input {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    border-color: #667eea;
}

.country-code-wrapper:focus-within .country-code-select {
    border-right: none;
}

.country-code-wrapper:focus-within .contact-number-input {
    border-left-color: #667eea;
}

/* Info text styling */
.country-code-wrapper + small {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.35rem;
    display: block;
    font-style: italic;
}

.country-code-wrapper + small i {
    margin-right: 0.3rem;
    color: #667eea;
    font-size: 0.75rem;
}

/* Mobile responsiveness */
@@media (max-width: 768px) {
    .country-code-select {
        min-width: 95px;
        max-width: 105px;
        font-size: 0.9rem;
        padding: 0.65rem 1.5rem 0.65rem 0.65rem;
    }
    
    .country-code-wrapper + small {
        font-size: 0.75rem;
    }
    
    .form-control-enhanced.country-code-select {
        border-radius: 12px 0 0 12px;
    }
    
    .form-control-enhanced.contact-number-input {
        border-radius: 0 12px 12px 0;
    }
}

