/* Contact Center Page Styles */
.contact-center-container {
    margin-bottom: 40px;
}

.contact-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.contact-table table {
    margin-bottom: 0;
}

.contact-table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 15px;
}

.contact-table td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1rem;
}

.contact-table tr:hover {
    background-color: #f8f9fa;
}

.type-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.type-global {
    background-color: #6c757d;
}

.type-list {
    background-color: #445082;
}

.contact-name {
    color: #445082;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-name:hover {
    text-decoration: underline;
}

.contact-count {
    font-weight: 600;
    color: #495057;
}

/* Ensure contact group list uses normal weight for names and counts */
#contactGroupsList .contact-name { font-weight: 600; }
#contactGroupsList .contact-count { font-weight: 600; }

.action-menu {
    cursor: pointer;
    padding: 5px;
    color: #6c757d;
}

.action-menu:hover {
    color: #495057;
}

.search-container {
    margin-bottom: 20px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

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

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

.btn-add-contacts {
    background-color: #445082;
    border-color: #445082;
    color: white;
}

.btn-add-contacts:hover {
    background-color: #3a4370;
    border-color: #3a4370;
    color: white !important;
}

/* Button text size adjustments for header actions */
.header-actions .btn {
    font-size: 0.875rem;
}

.btn-outline-primary {
    color: #445082;
    border-color: #445082;
}

.btn-outline-primary:hover {
    background-color: #445082;
    border-color: #445082;
    color: white;
}

/* Contact Group View Modal Styles */
.contact-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.contact-card:hover {
    border-color: #445082;
    box-shadow: 0 2px 8px rgba(68, 80, 130, 0.1);
}

.contact-card:last-child {
    margin-bottom: 0;
}

.contact-name {
    font-weight: 600;
    color: #2B3C6B;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.contact-email {
    color: #445082;
    margin-bottom: 8px;
}

.contact-meta {
    font-size: 0.9rem;
    color: #6c757d;
}

.contact-group-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.contact-group-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.contact-actions .btn {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.contact-card:hover .contact-actions .btn {
    opacity: 1;
}

/* Action menu button styling */
.action-menu {
    color: #6c757d !important;
    border: none !important;
    background: none !important;
    padding: 5px !important;
}

.action-menu:hover {
    color: #495057 !important;
}

.action-menu:focus {
    box-shadow: none !important;
}

/* Loading spinner for contacts */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

/* Empty state for contacts */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Inline Add Existing Contact Section Styles */
.inline-add-contact-section {
    transition: all 0.3s ease;
}

.inline-add-contact-section .card {
    box-shadow: 0 2px 8px rgba(68, 80, 130, 0.15);
    border-width: 2px;
}

.inline-add-contact-section .card-header {
    background: linear-gradient(135deg, #445082 0%, #3a4370 100%);
    border-bottom: 2px solid #3a4370;
    padding: 12px 16px;
}

.inline-add-contact-section .card-header h6 {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.inline-add-contact-section .card-header .btn-light {
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.inline-add-contact-section .card-header .btn-light:hover {
    background-color: #f8f9fa;
    transform: scale(1.05);
}

.inline-search-results {
    min-height: 100px;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
}

.inline-contact-item {
    background-color: white;
    transition: all 0.2s ease;
    cursor: default;
}

.inline-contact-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.inline-contact-item .btn-success {
    background-color: #28a745;
    border-color: #28a745;
    padding: 4px 10px;
    transition: all 0.2s ease;
}

.inline-contact-item .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: scale(1.1);
}

.inline-contact-item .btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation for fade-out effect */
.inline-contact-item.removing {
    opacity: 0.3;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

/* Responsive adjustments for inline add section */
@media (max-width: 768px) {
    .inline-add-contact-section .card-header h6 {
        font-size: 0.9rem;
    }

    .inline-contact-item {
        font-size: 0.9rem;
    }

    .inline-contact-item .btn-success {
        padding: 2px 8px;
    }
}

/* Enhance the toggle button animation */
#toggleAddExistingBtn {
    transition: all 0.3s ease;
    font-weight: 500;
}

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

#toggleAddExistingBtn.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

#toggleAddExistingBtn.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Search input styling within inline section */
#inlineExistingContactSearch {
    border-left: none;
    padding-left: 0;
}

#inlineExistingContactSearch:focus {
    box-shadow: none;
    border-color: #445082;
}

.inline-add-contact-section .input-group-text {
    background-color: white;
    border-right: none;
}

/* Success alert within inline section */
.inline-search-results .alert-success {
    border-left: 4px solid #28a745;
    background-color: #d4edda;
    animation: slideInDown 0.3s ease;
}

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

/* Scrollbar styling for search results */
.inline-search-results > div {
    scrollbar-width: thin;
    scrollbar-color: #445082 #f1f1f1;
}

.inline-search-results > div::-webkit-scrollbar {
    width: 6px;
}

.inline-search-results > div::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.inline-search-results > div::-webkit-scrollbar-thumb {
    background: #445082;
    border-radius: 3px;
}

.inline-search-results > div::-webkit-scrollbar-thumb:hover {
    background: #3a4370;
}