/* ===== 原有 AI 相关样式保留 ===== */
.pmst-ai-cell .pmst-status {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.pmst-ai-cell .pmst-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.pmst-ai-cell .button {
    margin: 2px 0;
}

/* 特色图片列样式（来自 AFI，改为 pmst- 前缀） */
.pmst-action-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.pmst-thumbnail {
    max-height: 80px; /* 会被内联样式覆盖，保留默认 */
    width: auto;
    border: 1px solid #ddd;
    border-radius: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.pmst-no-thumbnail {
    width: 80px;
    height: 80px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    border: 1px dashed #ddd;
    border-radius: 3px;
    flex-shrink: 0;
}

.pmst-actions-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 100px;
}

.pmst-status.has-thumbnail {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    white-space: nowrap;
    background-color: #f0f0f0;
    color: #666;
}

.pmst-status.success {
    background-color: #d4edda;
    color: #155724;
}

.pmst-auto-match {
    white-space: nowrap;
    min-width: 80px;
}

.pmst-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: pmst-spin 1s linear infinite;
    margin-right: 5px;
    vertical-align: middle;
}

.pmst-keyword-badge {
    display: inline-block;
    background: #f0ad4e;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 5px;
}

@keyframes pmst-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 图片选择对话框（来自 AFI，改为 pmst- 前缀） */
.pmst-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pmst-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.pmst-modal-content {
    position: relative;
    background: #fff;
    border-radius: 4px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.pmst-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background: #f8f9fa;
    flex-shrink: 0;
}

.pmst-modal-header h3 {
    margin: 0;
    font-size: 1.3em;
    color: #23282d;
}

.pmst-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
}

.pmst-modal-close:hover {
    background: #f0f0f0;
    color: #000;
}

.pmst-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.pmst-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.pmst-image-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.pmst-image-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-color: #007cba;
    transform: translateY(-2px);
}

.pmst-image-preview {
    height: 150px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pmst-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pmst-image-info {
    padding: 15px;
    border-top: 1px solid #eee;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pmst-image-title {
    font-size: 12px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.pmst-image-similarity {
    font-size: 11px;
    color: #666;
    margin-bottom: 12px;
}

.pmst-select-image {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    margin-top: auto;
}

.pmst-modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
    background: #f8f9fa;
    flex-shrink: 0;
}

/* 通知样式 */
.notice {
    padding: 10px 15px;
    margin: 0 0 15px 0;
    border-radius: 4px;
    border-left: 4px solid #fff;
}

.notice.notice-info {
    background-color: #f0f9ff;
    border-left-color: #007cba;
}

.notice.notice-warning {
    background-color: #fff8e5;
    border-left-color: #ffb900;
}

.notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .pmst-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .pmst-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .pmst-image-preview {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .pmst-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pmst-action-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* 图片SEO列布局（原有） */
.pmst-seo-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pmst-seo-view .button {
    background: #f3a90a;
    color: #000;
    border-color: #d48c00;
}
.pmst-seo-view .button:hover {
    background: #e09e09;
}

/* 特色图片列按钮样式（原有） */
.pmst-featured-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* 进度条（原有） */
.pmst-progress-bar {
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
}
.pmst-progress-fill {
    height: 100%;
    background-color: #f3a90a;
    width: 0%;
    transition: width 0.3s;
}

/* AI简介内容框（原有） */
.pmst-ai-box {
    border: 2px solid #f3a90a;
    padding: 20px;
    margin: 20px 0;
    background-color: #f9f9f9;
    color: #333;
    border-radius: 5px;
}
.pmst-ai-box p {
    margin: 0 0 10px 0;
}
.pmst-ai-box p:last-child {
    margin-bottom: 0;
}