/* Customer Service Interface Styles */

/* Main Layout */
.customer-service-interface {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    height: 900px;
}

.chat-layout {
    display: flex;
    height: 100%;
}

.main-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0; /* Prevent flex items from overflowing */
}

/* Chat Header with Customer Service Branding */
.chat-header {
    background: rgba(0, 212, 255, 0.1);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 600;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 12px;
    font-size: 0.85rem;
}

.agent-info i {
    color: #00d4ff;
}

/* AI Status Bar */
.ai-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 0.75rem;
}

.model-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.model-status i {
    color: #00d4ff;
}

.model-status .status-indicator.active {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s infinite;
}

.consultation-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #b0b0b0;
}

.consultation-status i {
    color: #00d4ff;
}

.consultation-status.active {
    color: #4ade80;
}

.consultation-status.active i {
    color: #4ade80;
}

/* Consultation Panel */
.consultation-panel {
    width: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
}

.consultation-panel.collapsed {
    width: 50px;
}

.consultation-header {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.panel-title i {
    color: #00d4ff;
}

.panel-toggle {
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.panel-toggle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.consultation-panel.collapsed .panel-toggle i {
    transform: rotate(180deg);
}

.consultation-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.consultation-status-display {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.status-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #b0b0b0;
    font-size: 0.85rem;
}

.status-message i {
    color: #00d4ff;
}

.status-message.active {
    color: #4ade80;
}

.status-message.active i {
    color: #4ade80;
}

.consultation-conversation {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.consultation-message {
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.85rem;
}

.consultation-message.customer {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.2);
}

.consultation-message.specialist {
    background: rgba(74, 222, 128, 0.1);
    border-color: rgba(74, 222, 128, 0.2);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: #888;
}

.message-sender {
    font-weight: 600;
    color: #00d4ff;
}

.message-sender.specialist {
    color: #4ade80;
}

.consultation-message.customer .message-sender {
    color: #00d4ff;
}

.consultation-message.specialist .message-sender {
    color: #4ade80;
}

/* Available Specialists */
.available-specialists {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.available-specialists h4 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.specialist-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.specialist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.specialist-item:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.2);
}

.specialist-item i {
    color: #00d4ff;
    width: 20px;
    text-align: center;
}

.specialist-item span {
    flex: 1;
}

.specialist-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
}

.specialist-status.offline {
    background: #888;
}

.specialist-status.busy {
    background: #f59e0b;
}

/* Responsive Design */
@media (max-width: 992px) {
    .chat-layout {
        flex-direction: column;
    }
    
    .consultation-panel {
        width: 100%;
        height: 300px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .consultation-panel.collapsed {
        height: 50px;
        width: 100%;
    }
    
    .panel-toggle i {
        transform: rotate(90deg);
    }
    
    .consultation-panel.collapsed .panel-toggle i {
        transform: rotate(270deg);
    }
}

@media (max-width: 768px) {
    .customer-service-interface {
        height: 750px;
    }
    
    .chat-header {
        padding: 0.75rem;
    }
    
    .agent-info {
        display: none;
    }
    
    .consultation-panel {
        height: 250px;
    }
}

/* Animation for active consultation */
@keyframes highlight {
    0% { background-color: rgba(0, 212, 255, 0.1); }
    50% { background-color: rgba(0, 212, 255, 0.2); }
    100% { background-color: rgba(0, 212, 255, 0.1); }
}

.consultation-active {
    animation: highlight 2s infinite;
}

/* Contact Information Section */
.contact-info-section {
    margin-top: 2rem;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.contact-card h3 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Model Selection Modal Styles */
.model-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.model-selection-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.modal-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 1rem;
}

.modal-content {
    padding: 2rem;
}

.provider-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.provider-section h4 {
    color: #fff;
    margin: 0 0 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.model-select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.model-select option {
    background: #1a1a2e;
    color: #fff;
}

.select-model-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.select-model-btn:hover {
    background: linear-gradient(135deg, #0099cc 0%, #007399 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.select-model-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.provider-divider {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    margin: 1rem 0;
    position: relative;
}

.provider-divider::before,
.provider-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.provider-divider::before {
    left: 0;
}

.provider-divider::after {
    right: 0;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-footer p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Model Settings Button */
.model-settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.model-settings-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.4);
    color: #00d4ff;
    transform: scale(1.05);
}

.model-settings-btn:active {
    transform: scale(0.95);
}

/* Responsive Design for Model Selection */
@media (max-width: 768px) {
    .model-selection-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-content,
    .modal-footer {
        padding: 1.5rem 1rem;
    }
    
    .provider-section {
        padding: 1rem;
    }
    
    .model-settings-btn {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
}