/* ============ Quick Replies (səhifə) ============ */
/* Chrome (settings-card, page-header, setting-label, auto-reply-save-btn,
   loading-spinner) settings.css-dən gəlir — bu fayl yalnız qr-* elementləri. */

.qr-add-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qr-form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.qr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 200px;
    min-width: 0;
}

.qr-field .setting-label { margin: 0; }

.qr-field textarea.form-control { resize: vertical; min-height: 64px; }

.qr-shortcut-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 10px;
    overflow: hidden;
    background: var(--input-bg, #fff);
}

.qr-shortcut-prefix {
    padding: 0 10px;
    color: var(--text-muted, #6b7280);
    font-weight: 600;
    border-right: 1px solid var(--border-light, #eee);
    align-self: stretch;
    display: flex;
    align-items: center;
}

.qr-shortcut-wrap .form-control {
    border: none;
    border-radius: 0;
    flex: 1;
}

.qr-add-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.qr-platform-hint {
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    flex: 1 1 auto;
}

.qr-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.qr-filter-select { width: auto; min-width: 160px; }

.qr-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qr-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: var(--card-bg, #fff);
}

.qr-item-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.qr-item-text {
    color: var(--text-primary, #111827);
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.qr-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
}

.qr-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
}

.qr-tag-platform {
    background: var(--primary-soft, #eef2ff);
    color: var(--primary, #4f46e5);
    text-transform: capitalize;
}

.qr-tag-shortcut {
    background: var(--border-light, #f3f4f6);
    color: var(--text-primary, #374151);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.qr-item-author { display: inline-flex; align-items: center; gap: 4px; }

.qr-delete-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: transparent;
    color: var(--danger, #ef4444);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.qr-delete-btn:hover {
    background: var(--danger-soft, #fef2f2);
    border-color: var(--danger, #ef4444);
}

.qr-loading,
.qr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    text-align: center;
    color: var(--text-muted, #6b7280);
}

.qr-empty i { font-size: 28px; opacity: 0.6; }
.qr-empty p { margin: 0; font-weight: 600; color: var(--text-primary, #374151); }

/* ---- Email üçün zəngin redaktor ---- */
.qr-rich-wrap {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.qr-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.qr-tool-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #475569;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: all .12s;
}
.qr-tool-btn:hover { background: #eef2ff; color: #4338ca; }
.qr-tool-btn.active {
    background: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.qr-tool-divider {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    margin: 0 4px;
}

.qr-tool-select {
    height: 28px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0 6px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
    outline: 0;
    transition: border-color .12s;
}
.qr-tool-select:hover { border-color: #c7d2fe; }
.qr-tool-select:focus { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.18); }

.qr-tool-color {
    position: relative;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    font-size: 15px;
    transition: background .12s;
}
.qr-tool-color:hover { background: #eef2ff; color: #4338ca; }
.qr-tool-color-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
}

.qr-editor {
    background: #fff;
    border: 0;
    padding: 14px 16px;
    line-height: 1.6;
    font-size: 14px;
    color: #0f172a;
    min-height: 160px;
    max-height: 360px;
    overflow: auto;
}
.qr-editor:focus { outline: 0; }
.qr-editor:empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    pointer-events: none;
}
.qr-editor img { max-width: 100%; height: auto; border-radius: 6px; }

/* Siyahıda email HTML preview */
.qr-item-html {
    color: var(--text-primary, #111827);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    overflow: hidden;
}
.qr-item-html img { max-width: 160px; max-height: 90px; height: auto; border-radius: 6px; vertical-align: middle; }
.qr-item-html a { color: var(--primary, #4f46e5); }
.qr-item-html * { max-width: 100%; }

@media (max-width: 560px) {
    .qr-form-row { flex-direction: column; }
    .qr-list-header { flex-direction: column; align-items: stretch; }
    .qr-filter-select { width: 100%; }
}
