/* ========== CCConfirm 确认弹窗组件 - 独立样式文件 ========== */
/* 使用方式: <link href="${base}/theme/classic/dist/css/cc-confirm.css?v=${site.version}" rel="stylesheet"/> */

.cc-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    animation: ccFadeIn 0.2s ease;
}

.cc-confirm-modal.show {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

@keyframes ccFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 透明遮罩 - 保留DOM用于点击外部关闭，但视觉不可见 */
.cc-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
}

/* 弹窗内容容器 */
.cc-confirm-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 260px;
    max-width: calc(100% - 48px);
    margin: 0;
    animation: ccSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 2;
}

@keyframes ccSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 弹窗头部 */
.cc-confirm-header {
    padding: 14px 16px 0;
    text-align: center;
}

/* 图标圆形背景 - 默认红色（error/danger） */
.cc-confirm-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(238, 90, 111, 0.3);
}

/* warning 类型 - 橙色 */
.cc-confirm-icon.warning {
    background: linear-gradient(135deg, #ffa726 0%, #fb8c00 100%);
    box-shadow: 0 4px 16px rgba(255, 167, 38, 0.3);
}

/* info / success 类型 - 蓝色 */
.cc-confirm-icon.info {
    background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
    box-shadow: 0 4px 16px rgba(66, 165, 245, 0.3);
}

.cc-confirm-icon i {
    font-size: 16px;
    color: white;
}

.cc-confirm-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px;
}

/* 弹窗主体 */
.cc-confirm-body {
    padding: 0 16px 14px;
    text-align: center;
}

.cc-confirm-message {
    font-size: 13px;
    line-height: 1.6;
    color: #666666;
    margin: 0;
}

/* 弹窗底部按钮区域 */
.cc-confirm-footer {
    padding: 12px 16px 16px;
    background: #fff;
    display: flex;
    justify-content: center;
    gap: 12px;
    border-top: none;
}

/* 确定按钮 - 主按钮样式 */
.cc-confirm-footer .cc-btn-primary {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.cc-confirm-footer .cc-btn-primary:hover {
    background: #16213e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.3);
}

/* 取消按钮 - 次要按钮样式 */
.cc-confirm-footer .cc-btn-secondary {
    background: #fff;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.cc-confirm-footer .cc-btn-secondary:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* 兼容旧版 cc-btn class */
.cc-confirm-footer .cc-btn {
    margin: 0;
}

/* ========== 响应式 - 移动端 ========== */
@media (max-width: 576px) {
    .cc-confirm-content {
        width: calc(100% - 48px);
        max-width: 260px;
        margin: 0;
    }

    .cc-confirm-header {
        padding: 14px 16px 0;
    }

    .cc-confirm-body {
        padding: 0 16px 14px;
    }

    .cc-confirm-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 10px;
    }

    .cc-confirm-icon i {
        font-size: 17px;
    }

    .cc-confirm-title {
        font-size: 14px;
    }

    .cc-confirm-message {
        font-size: 14px;
    }

    .cc-confirm-footer {
        padding: 8px 12px;
        flex-direction: column-reverse;
    }

    .cc-confirm-footer .cc-btn {
        width: 100%;
    }
}
