/* ============================================
   EDITOR CSS — Styles for the Editing Tool mode
   ============================================ */

/* --- Editor Toolbar --- */
.editor-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px; background: #252525;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0; flex-wrap: wrap;
}
.editor-toolbar .tool-group {
    display: flex; align-items: center; gap: 4px;
    padding-right: 10px; margin-right: 8px;
    border-right: 1px solid #444;
}
.editor-toolbar .tool-group:last-child { border-right: none; }

.editor-btn {
    padding: 6px 12px; border: 1px solid #555;
    border-radius: 4px; cursor: pointer; font-size: 12px;
    background: #333; color: #ddd;
    transition: all 0.15s; white-space: nowrap;
    display: flex; align-items: center; gap: 4px;
}
.editor-btn:hover { background: #444; border-color: #888; }
.editor-btn.primary { background: #e8733a; border-color: #e8733a; color: #fff; }
.editor-btn.primary:hover { background: #d1622a; }
.editor-btn.danger { background: transparent; border-color: #e74c3c; color: #e74c3c; }
.editor-btn.danger:hover { background: rgba(231,76,60,0.15); }
.editor-btn:disabled { opacity: 0.4; cursor: default; }

.editor-btn .icon { font-size: 14px; }

/* --- Gemini Scan Status --- */
.gemini-status {
    font-size: 11px; color: #888;
    padding: 4px 10px; background: #1a1a1a;
    border-radius: 4px; display: flex; align-items: center; gap: 6px;
}
.gemini-status .spinner {
    width: 12px; height: 12px; border: 2px solid #555;
    border-top-color: #e8733a; border-radius: 50%;
    animation: spin 0.8s linear infinite; display: none;
}
.gemini-status.scanning .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Mode Badge --- */
.mode-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 2px 8px; border-radius: 3px; letter-spacing: 0.5px;
}
.mode-badge.edit { background: #e8733a; color: #fff; }
.mode-badge.preview { background: #2ecc71; color: #fff; }

/* --- Page scan progress --- */
.scan-progress {
    position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%);
    background: #1e1e1e; color: #ddd; padding: 8px 16px;
    border-radius: 8px; font-size: 12px; z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex; align-items: center; gap: 8px;
}
.scan-progress .bar {
    width: 120px; height: 4px; background: #444; border-radius: 2px;
}
.scan-progress .bar-fill {
    height: 100%; background: #e8733a; border-radius: 2px;
    width: 0%; transition: width 0.3s;
}

/* --- Final product mode: hide editor elements --- */
body:not(.editor-mode) .editor-toolbar { display: none !important; }
body:not(.editor-mode) .mode-badge.edit { display: none; }
body:not(.editor-mode) .hotspot-delete-btn { display: none !important; }
body:not(.editor-mode) .edit-mode .interactive-hotspot { cursor: pointer !important; }
body:not(.editor-mode) .edit-mode .interactive-hotspot:hover { box-shadow: none !important; }
body:not(.editor-mode) #btnEditToggle { display: none !important; }

/* --- Batch scan modal --- */
.batch-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    z-index: 300; display: flex; align-items: center; justify-content: center;
}
.batch-modal-content {
    background: #1e1e1e; color: #ddd; border-radius: 12px;
    padding: 24px; max-width: 450px; width: 90%;
}
.batch-modal-content h3 { margin: 0 0 12px; }
.batch-modal-content .page-list {
    max-height: 200px; overflow-y: auto; margin: 12px 0;
}
.batch-modal-content .page-item {
    padding: 6px 10px; font-size: 13px; border-bottom: 1px solid #333;
    display: flex; justify-content: space-between; align-items: center;
}
.batch-modal-content .page-item .status { font-size: 11px; }
.batch-modal-content .page-item .status.done { color: #2ecc71; }
.batch-modal-content .page-item .status.error { color: #e74c3c; }
.batch-modal-content .page-item .status.pending { color: #888; }
.batch-modal-buttons { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }

/* --- Quick info tip --- */
.editor-tip {
    font-size: 10px; color: #666; padding: 4px 14px;
    background: #1a1a1a; border-top: 1px solid #111;
    text-align: center;
}
