/* Agent Registry Styles */

.agent-registry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.agent-registry-controls {
    display: flex;
    gap: 10px;
}

.agent-registry-list {
    margin-top: 20px;
}

.agent-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.agent-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: box-shadow 0.2s;
}

.agent-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.agent-card.inactive {
    opacity: 0.7;
    background: #f8f9fa;
}

.agent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.agent-name {
    font-weight: bold;
    font-size: 1.1em;
}

.agent-card-body {
    margin-bottom: 15px;
}

.agent-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
}

.agent-detail i {
    width: 16px;
    text-align: center;
    color: #999;
}

.agent-card-footer {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.agent-card-footer .btn {
    flex: 1;
    min-width: 80px;
    font-size: 0.85em;
}

/* Agent Modal Styles */
#agentModal .modal-content {
    max-width: 500px;
}

#agentModal .form-group {
    margin-bottom: 15px;
}

#agentModal label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#agentModal input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#agentModal input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Agent Selector Modal */
#agentSelectorModal .modal-content {
    max-width: 600px;
}

.agent-selector-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#agentSearchInput {
    margin-bottom: 15px;
}

.agent-selector-items {
    padding: 10px;
}

.agent-selector-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.agent-selector-item:hover {
    background: #f5f5f5;
}

.agent-selector-item.selected {
    background: #e3f2fd;
    border-color: #2196F3;
}

.agent-selector-item input[type="checkbox"],
.agent-selector-item input[type="radio"] {
    margin-right: 10px;
}

.agent-selector-item label {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.agent-selector-item .agent-name {
    font-weight: 500;
}

.agent-selector-item .agent-phone {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
}

/* Agent Dropdown */
.agent-dropdown {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.agent-dropdown option {
    padding: 5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Status Icons */
.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-danger {
    color: #dc3545;
}

.text-info {
    color: #17a2b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .agent-cards {
        grid-template-columns: 1fr;
    }
    
    .agent-registry-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .agent-registry-controls {
        margin-top: 10px;
        width: 100%;
        flex-direction: column;
    }
    
    .agent-registry-controls button {
        width: 100%;
    }
    
    .agent-card-footer {
        flex-direction: column;
    }
    
    .agent-card-footer .btn {
        width: 100%;
    }
}