/* 弹窗相关样式 */
.tc-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.3s;
}

.tc-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: none;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s;
}

.tc-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.tc-close:hover,
.tc-close:focus {
    color: #000;
    text-decoration: none;
}

/* 动画效果 */
@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

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

/* 弹窗内容样式 */
.tc-modal-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.tc-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.tc-modal-body {
    margin-bottom: 20px;
}

.tc-modal-footer {
    text-align: right;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* 按钮样式 */
.tc-btn {
    display: inline-block;
    padding: 8px 16px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.tc-btn-primary {
    background-color: #007bff;
    color: white;
}

.tc-btn-primary:hover {
    background-color: #0056b3;
}

.tc-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.tc-btn-secondary:hover {
    background-color: #545b62;
}

.tc-btn-success {
    background-color: #28a745;
    color: white;
}

.tc-btn-success:hover {
    background-color: #1e7e34;
}

/* 响应式弹窗 */
@media (max-width: 768px) {
    .tc-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .tc-modal-title {
        font-size: 16px;
    }
    
    .tc-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* 弹窗覆盖层样式 */
.tc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

/* 弹窗内容区域 */
.tc-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: none;
}

/* 弹窗动画 */
.tc-popup.show {
    display: block;
    animation: popupShow 0.3s ease-out;
}

@keyframes popupShow {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 弹窗关闭按钮 */
.tc-popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.tc-popup-close:hover {
    color: #333;
}

/* 弹窗内容样式 */
.tc-popup-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.tc-popup-content {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.tc-popup-actions {
    text-align: center;
}

/* 特殊弹窗样式 */
.tc-warning {
    border-left: 4px solid #ffc107;
}

.tc-error {
    border-left: 4px solid #dc3545;
}

.tc-success {
    border-left: 4px solid #28a745;
}

.tc-info {
    border-left: 4px solid #17a2b8;
}

/* 弹窗图标 */
.tc-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.tc-icon-warning {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffc107"><path d="M12 2L1 21h22L12 2zm0 3.17L19.83 19H4.17L12 5.17zM11 16h2v2h-2zm0-6h2v4h-2z"/></svg>') no-repeat center;
    background-size: contain;
}

.tc-icon-error {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23dc3545"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>') no-repeat center;
    background-size: contain;
}

.tc-icon-success {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2328a745"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>') no-repeat center;
    background-size: contain;
}

.tc-icon-info {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2317a2b8"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>') no-repeat center;
    background-size: contain;
}
