.contacts-onboarding-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.2s ease;
    overflow-y: auto;
    padding: 20px 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.contacts-onboarding-content {
    position: relative;
    background-color: #fff;
    margin: 0 auto;
    padding: 0;
    width: 90%;
    max-width: 650px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.contacts-onboarding-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1;
}

.contacts-onboarding-close:hover {
    color: #333;
    background-color: #f5f5f5;
}

.contacts-onboarding-content h2 {
    margin: 0;
    padding: 24px 30px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 26px;
    font-weight: 600;
    color: #2c3e50;
    flex-shrink: 0;
}

.contacts-onboarding-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.contacts-step {
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.contacts-step p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 12px 0;
    max-width: 500px;
}

.contacts-step p:last-child {
    font-size: 14px;
    color: #999;
}

.contacts-actions {
    margin-top: 24px;
}

.contacts-btn {
    padding: 14px 28px;
    margin: 10px 8px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 140px;
}

.contacts-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contacts-btn:active {
    transform: translateY(0);
}

.contacts-btn-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
}

.contacts-btn-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004666 100%);
}

.contacts-btn-secondary {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.contacts-btn-secondary:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.contacts-loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.contacts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.contacts-header p {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.contacts-header-info {
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    background-color: #e7f3ff;
    border-left: 3px solid #0073aa;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.contacts-list {
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 24px;
    background-color: #fff;
}

.contacts-list::-webkit-scrollbar {
    width: 8px;
}

.contacts-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.contacts-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.contacts-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.contacts-item {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.contacts-item:last-child {
    border-bottom: none;
}

.contacts-item:hover {
    background-color: #f8f9fa;
}

.contacts-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.contacts-checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.contact-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
    font-size: 15px;
}

.contact-phone {
    color: #6c757d;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

.contacts-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-top: 8px;
    flex-wrap: wrap;
}

.contacts-empty {
    padding: 60px 20px;
    color: #6c757d;
    font-style: italic;
    font-size: 15px;
    text-align: center;
}

.contacts-success-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #46b450 0%, #3a9943 100%);
    color: #fff;
    font-size: 54px;
    line-height: 90px;
    margin: 30px auto 20px;
    box-shadow: 0 4px 12px rgba(70, 180, 80, 0.3);
}

.contacts-error-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 54px;
    line-height: 90px;
    margin: 30px auto 20px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

#contacts-step-complete h3 {
    color: #46b450;
    margin: 16px 0;
    font-size: 24px;
    font-weight: 600;
}

#contacts-step-error h3 {
    color: #d97706;
    margin: 16px 0;
    font-size: 24px;
    font-weight: 600;
}

#contacts-result-message {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin: 20px 0;
    max-width: 450px;
}

/* Step-specific styling */
#contacts-step-select {
    text-align: left;
    min-height: auto;
    justify-content: flex-start;
}

#contacts-step-select .contacts-header p {
    display: flex;
    align-items: center;
    gap: 8px;
}

#contacts-count {
    display: inline-block;
    background-color: #0073aa;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .contacts-onboarding-modal {
        padding: 10px 0;
    }
    
    .contacts-onboarding-content {
        width: 95%;
        max-height: calc(100vh - 20px);
        border-radius: 8px;
    }
    
    .contacts-onboarding-content h2 {
        font-size: 22px;
        padding: 20px 20px;
    }
    
    .contacts-onboarding-body {
        padding: 20px;
    }
    
    .contacts-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
    }
    
    .contacts-list {
        max-height: 280px;
    }
    
    .contacts-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .contacts-btn {
        width: 100%;
        margin: 6px 0;
    }
    
    .contact-name {
        font-size: 14px;
    }
    
    .contact-phone {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .contacts-onboarding-content h2 {
        font-size: 20px;
        padding: 18px 16px;
    }
    
    .contacts-onboarding-close {
        right: 12px;
        top: 16px;
        font-size: 28px;
    }
}
