/* =====================
   前端编辑器弹窗样式（版块页 + 文章详情页共用）
   ===================== */
.frontend-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.frontend-editor-overlay.show {
    display: flex;
}

.frontend-editor-modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.frontend-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    color: var(--white);
}

/* taxonomy-play_category.php 用蓝色渐变 */
#frontend-editor-overlay .frontend-editor-header,
.frontend-editor-overlay.taxonomy .frontend-editor-header {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* single-mc_play.php 用橙红渐变 */
.frontend-editor-overlay:not(.taxonomy) .frontend-editor-header {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
}

.frontend-editor-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.frontend-editor-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.frontend-editor-close:hover {
    opacity: 1;
}

.frontend-editor-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.frontend-editor-form .form-group {
    margin-bottom: 1.25rem;
}

.frontend-editor-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.frontend-editor-form input[type="text"],
.frontend-editor-form select,
.frontend-editor-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.frontend-editor-form input[type="text"]:focus,
.frontend-editor-form select:focus,
.frontend-editor-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.frontend-editor-form .wp-editor-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.frontend-editor-form .wp-editor-container {
    border: none !important;
}

.frontend-editor-form .quicktags-toolbar {
    background: var(--gray-bg) !important;
    border-bottom: 1px solid var(--border) !important;
}

.frontend-editor-form .mce-toolbar-grp {
    background: var(--gray-bg) !important;
    border-bottom: 1px solid var(--border) !important;
}

.frontend-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--gray-bg);
}

.frontend-editor-status {
    font-size: 0.85rem;
    color: var(--gray);
}

.frontend-editor-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-editor-cancel,
.btn-editor-save {
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-editor-cancel {
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--gray);
}

.btn-editor-cancel:hover {
    background: var(--gray-bg);
}

.btn-editor-save {
    background: var(--primary);
    border: none;
    color: var(--white);
}

.btn-editor-save:hover {
    opacity: 0.85;
}

.btn-editor-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.frontend-editor-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
}

.frontend-editor-message.show {
    display: block;
}

.frontend-editor-message.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.frontend-editor-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
