/* 通话页面专用样式 */

/* 通话容器 */
.calls-container {
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* 通话头部 */
.calls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}

.calls-header h2 {
    font-size: 28px;
    color: #075e54;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calls-header h2 i {
    color: #25d366;
    font-size: 24px;
}

.call-actions {
    display: flex;
    gap: 15px;
}

.btn-call-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#btn-new-call {
    background-color: #25d366;
    color: white;
}

#btn-new-call:hover {
    background-color: #1da851;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

#btn-new-video {
    background-color: #075e54;
    color: white;
}

#btn-new-video:hover {
    background-color: #054c43;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(7, 94, 84, 0.3);
}

/* 快速拨号 */
.quick-dial {
    margin-bottom: 40px;
}

.quick-contacts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.quick-contact {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-contact:hover {
    border-color: #25d366;
    background-color: #f0f9f0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.quick-avatar {
    position: relative;
}

.quick-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.quick-avatar.group {
    width: 60px;
    height: 60px;
    background-color: #075e54;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.online-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #ddd;
    border: 2px solid white;
}

.online-status.online {
    background-color: #25d366;
}

.quick-info {
    flex: 1;
}

.quick-info h4 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 600;
}

.quick-info p {
    font-size: 14px;
    color: #666;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.btn-quick-call, .btn-quick-video {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-quick-call {
    background-color: #25d366;
    color: white;
}

.btn-quick-call:hover {
    background-color: #1da851;
    transform: scale(1.1);
}

.btn-quick-video {
    background-color: #075e54;
    color: white;
}

.btn-quick-video:hover {
    background-color: #054c43;
    transform: scale(1.1);
}

/* 最近通话 */
.recent-calls {
    margin-bottom: 40px;
}

.calls-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.call-filters {
    display: flex;
    gap: 10px;
}

.btn-filter {
    padding: 8px 16px;
    background-color: #f0f2f5;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-filter:hover, .btn-filter.active {
    background-color: #25d366;
    color: white;
    border-color: #25d366;
}

/* 通话列表 */
.calls-list {
    background-color: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
}

.call-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: white;
    transition: background-color 0.3s ease;
}

.call-item:hover {
    background-color: #f5f5f5;
}

.call-item.missed {
    background-color: #fff5f5;
}

.call-avatar {
    margin-right: 15px;
}

.call-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.call-avatar.group {
    width: 50px;
    height: 50px;
    background-color: #075e54;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.call-info {
    flex: 1;
}

.call-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.call-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.call-type {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.call-time {
    font-size: 13px;
    color: #999;
}

.call-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.call-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.call-status.missed {
    background-color: #ffebee;
    color: #f44336;
}

.call-status.outgoing {
    background-color: #e8f5e9;
    color: #4caf50;
}

.call-status.incoming {
    background-color: #e3f2fd;
    color: #2196f3;
}

.call-duration {
    font-size: 13px;
    color: #666;
}

.call-actions {
    display: flex;
    gap: 10px;
}

.btn-call-back, .btn-call-video {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-call-back {
    background-color: #25d366;
    color: white;
}

.btn-call-back:hover {
    background-color: #1da851;
    transform: scale(1.1);
}

.btn-call-video {
    background-color: #075e54;
    color: white;
}

.btn-call-video:hover {
    background-color: #054c43;
    transform: scale(1.1);
}

/* 通话统计 */
.call-stats {
    margin-bottom: 40px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 15px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background-color: #f0f9f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #25d366;
    font-size: 20px;
}

.stat-info h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #075e54;
    margin-bottom: 5px;
}

.stat-detail {
    font-size: 12px;
    color: #999;
}

/* 通话设置 */
.call-settings {
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 15px;
}

.settings-options {
    margin-bottom: 25px;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.setting-option.active {
    border-color: #25d366;
    background-color: #f0f9f0;
}

.setting-option i {
    font-size: 20px;
    color: #075e54;
    width: 40px;
}

.option-info {
    flex: 1;
}

.option-info h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.option-info p {
    font-size: 14px;
    color: #666;
}

.option-toggle {
    width: 50px;
}

.toggle-switch {
    display: block;
    width: 44px;
    height: 24px;
    background-color: #ddd;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch:after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-switch.active {
    background-color: #25d366;
}

.toggle-switch.active:after {
    transform: translateX(20px);
}

.btn-advanced-settings {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: #075e54;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-advanced-settings:hover {
    background-color: #054c43;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #075e54;
    color: white;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.btn-close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-search {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-search:focus {
    outline: none;
    border-color: #25d366;
}

.modal-contacts {
    max-height: 300px;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-modal-cancel, .btn-modal-call {
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-cancel {
    background-color: #f0f2f5;
    color: #333;
}

.btn-modal-cancel:hover {
    background-color: #e0e0e0;
}

.btn-modal-call {
    background-color: #25d366;
    color: white;
}

.btn-modal-call:hover {
    background-color: #1da851;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .calls-container {
        padding: 20px;
    }
    
    .quick-contacts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .calls-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .call-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .calls-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .call-filters {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .call-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .call-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .quick-contacts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calls-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .call-actions {
        flex-direction: column;
    }
    
    .btn-call-action {
        width: 100%;
        justify-content: center;
    }
    
    .setting-option {
        flex-direction: column;
        text-align: center;
    }
    
    .option-toggle {
        align-self: flex-end;
    }
    
    .modal-content {
        width: 95%;
    }
}