/* ============================
   我的调色板 - 通用样式
   ============================ */

/* ---------- 卡片列表（插件自带模板） ---------- */
.palette-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.palette-card {
    width: calc(25% - 15px);
    min-width: 200px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

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

.palette-card-header {
    padding: 12px 15px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.palette-card .palette-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.palette-card-actions {
    display: flex;
    gap: 6px;
}

.palette-card-actions a {
    color: #999;
    font-size: 16px;
    transition: color 0.2s;
}

.palette-card-actions a:hover {
    color: #ff6565;
}

.palette-card .palette-colors {
    padding: 0 15px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.palette-card .color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.2s;
}

.palette-card .color-swatch:hover {
    transform: scale(1.15);
}

.palette-card-footer {
    padding: 0 15px 12px;
}

.palette-time {
    font-size: 12px;
    color: #999;
}

.palette-empty {
    padding: 40px 0;
}

.palette-empty img {
    max-width: 200px;
}

/* ---------- 编辑/新建模态框（插件自带模板） ---------- */
.palette-mytable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.palette-mytable th {
    background: #f5f7fa;
    color: #606266;
    font-weight: 600;
    padding: 12px 10px;
    border: 1px solid #ebeef5;
    white-space: nowrap;
}

.palette-mytable td {
    padding: 14px 10px;
    border: 1px solid #ebeef5;
    vertical-align: middle;
}

.palette-mytable tbody tr:hover {
    background-color: #f9fafc;
}

/* 序号 */
.palette-row .row-index {
    color: #999;
    font-size: 12px;
}

/* 调色板名称 */
.palette-name-text {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    color: #333;
}

/* 时间 */
.row-time {
    color: #999;
    font-size: 12px;
}

/* 颜色预览行 */
.palette-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.p-swatch {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    transition: box-shadow 0.2s;
}

.p-swatch:hover {
    box-shadow: 0 0 0 2px #ff6565, 0 2px 8px rgba(0,0,0,.2);
    z-index: 1;
}

/* 操作按钮 */
.palette-download-btn {
    color: #409eff !important;
    font-size: 13px;
}

.palette-download-btn:hover {
    color: #66b1ff !important;
}

.palette-del-btn:hover {
    color: #ff6565 !important;
}

/* 删除按钮 hover */
.el-button--text.palette-del-btn:hover {
    color: #ff6565 !important;
}

/* 空状态 */
.eyoucms-empty p {
    font-size: 14px;
    color: #999;
}

/* 调色板名称最大宽度 */
.palette-name-text {
    max-width: 120px;
}

/* ============================
   编辑弹窗中的色块
   ============================ */
.cp-sw {
    display: inline-block;
}
.cp-sw:hover {
    border-color: #ff6565;
}

/* ============================
   响应式适配
   ============================ */
@media screen and (max-width: 900px) {
    .palette-mytable th:nth-child(4),
    .palette-mytable td:nth-child(4) {
        display: none;
    }
}

@media screen and (max-width: 600px) {
    .palette-mytable th:nth-child(3),
    .palette-mytable td:nth-child(3) {
        display: none;
    }

    .ey-con {
        width: 100% !important;
    }

    .palette-mytable {
        font-size: 12px;
    }
}
