/* saved-quotes.css — styles for save toast and personal quotes page */

/* ── Toast notification ────────────────────────────────────────────────── */
.sq-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: #1e293b;
    color: #fff;
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 200000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
}
.sq-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.sq-toast--success { background: #16a34a; }
.sq-toast--warn    { background: #d97706; }
.sq-toast--error   { background: #dc2626; }
.sq-toast--info    { background: #1e293b; }

/* ── My Quotes Page ─────────────────────────────────────────────────────── */
.sq-page-wrap {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px 80px;
}
.sq-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}
.sq-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color, #0f172a);
}

/* ── Collections sidebar ────────────────────────────────────────────────── */
.sq-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 640px) {
    .sq-layout { grid-template-columns: 1fr; }
}

.sq-collections-panel {
    background: #f8fafc;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e2e8f0;
}
.sq-collections-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
    margin-bottom: 12px;
}
.sq-collection-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
    transition: background 0.15s;
    margin-bottom: 2px;
    gap: 8px;
}
.sq-collection-item:hover,
.sq-collection-item.active {
    background: #e2e8f0;
    color: #0f172a;
}
.sq-collection-item .sq-col-name  { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-collection-item .sq-col-count { font-size: 0.78rem; color: #94a3b8; }
.sq-collection-item .sq-col-pub   { font-size: 0.72rem; color: #22c55e; }

.sq-new-collection-btn {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    color: #64748b;
    font-size: 0.85rem;
    transition: border-color 0.2s, color 0.2s;
}
.sq-new-collection-btn:hover { border-color: #60a5fa; color: #ffffff; }

/* ── Quotes list ────────────────────────────────────────────────────────── */
.sq-quote-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid #e2e8f0;
    margin-bottom: 14px;
    transition: box-shadow 0.2s;
}
.sq-quote-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }

.sq-quote-text {
    font-size: 1.05rem;
    line-height: 1.5;
    color: #1e293b;
    font-style: italic;
    padding-left: 14px;
    border-left: 3px solid #60a5fa;
    margin-bottom: 12px;
}
.sq-quote-text::before { content: '"'; }
.sq-quote-text::after  { content: '"'; }

.sq-quote-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.sq-quote-source {
    font-size: 0.8rem;
    color: #64748b;
}
.sq-quote-source a { color: #3b82f6; text-decoration: none; }
.sq-quote-source a:hover { text-decoration: underline; }

.sq-quote-note {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
}

.sq-quote-actions {
    display: flex;
    gap: 8px;
}
.sq-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}
.sq-btn-icon:hover { background: #f1f5f9; color: #0f172a; }
.sq-btn-icon.danger:hover { background: #fee2e2; color: #dc2626; }

/* ── Collection select dropdown ─────────────────────────────────────────── */
.sq-col-select-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px;
    min-width: 200px;
    z-index: 50000;
}
.sq-col-select-item {
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}
.sq-col-select-item:hover { background: #f1f5f9; }
.sq-col-select-item.checked { color: #3b82f6; }
.sq-col-select-item.checked i { color: #3b82f6; }

/* ── Public collection page ─────────────────────────────────────────────── */
.sq-public-hero {
    padding: 0 0 20px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-color, #0f172a);
}
.sq-public-hero h1 { font-size: 1.6rem; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.01em; }
.sq-public-hero p  { color: #64748b; margin: 0 0 16px; font-size: 0.95rem; line-height: 1.5; }
.sq-hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; color: #64748b; }
.sq-hero-meta span { display: flex; align-items: center; gap: 6px; }

/* ── Modern Toolbar ─────────────────────────────────────────────────────── */
.sq-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.sq-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sq-toolbar-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
}

/* Base button */
.sq-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sq-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}

.sq-btn:active {
    transform: translateY(0);
}

/* Secondary Button (Grey styling) */
.sq-btn-secondary {
    background: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.sq-btn-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Primary buttons */
.sq-btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.sq-btn-primary:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.sq-btn-lock {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.sq-btn-telegram {
    background: #0088cc;
    color: #fff;
}

.sq-btn-telegram:hover {
    background: #0077b5;
}

.sq-btn-twitter {
    background: #1da1f2;
    color: #fff;
}

.sq-btn-whatsapp {
    background: #25d366;
    color: #fff;
}

/* ── Empty state ────────────────────────────────────────────────────────── */
.sq-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.sq-empty i    { font-size: 3rem; margin-bottom: 16px; display: block; }
.sq-empty h3   { font-size: 1.1rem; color: #64748b; margin: 0 0 8px; }
.sq-empty p    { font-size: 0.9rem; }

/* ── Collection picker modal ────────────────────────────────────────────── */
.sq-picker {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 190000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.sq-picker-inner {
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    overflow: hidden;
}
.sq-picker-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
}
.sq-picker-header strong { flex: 1; font-size: 1rem; }
.sq-picker-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 1rem;
}
.sq-picker-preview {
    margin: 16px 20px 0;
    font-style: italic;
    font-size: 0.88rem;
    color: #475569;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
    line-height: 1.4;
}
.sq-picker-label {
    padding: 14px 20px 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sq-picker-cols {
    max-height: 200px;
    overflow-y: auto;
    padding: 0 14px;
}
.sq-picker-col-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #334155;
    transition: background 0.12s;
}
.sq-picker-col-item:hover { background: #f1f5f9; }
.sq-picker-col-item input { accent-color: #8b5cf6; width: 16px; height: 16px; cursor: pointer; }
.sq-picker-no-cols { padding: 12px 6px; font-size: 0.88rem; color: #94a3b8; }
.sq-picker-no-cols a { color: #8b5cf6; }
.sq-picker-dup {
    margin: 8px 20px 0;
    padding: 8px 12px;
    background: #fef9c3;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #a16207;
}
.sq-picker-footer {
    padding: 16px 20px;
}
.sq-picker-save-btn {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}
.sq-picker-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.sq-picker-save-btn:not(:disabled):hover { opacity: 0.9; }

/* ── Article saved-quote highlight ──────────────────────────────────────── */
mark.sq-saved-highlight {
    background: linear-gradient(to right, rgba(139,92,246,0.18), rgba(139,92,246,0.10));
    color: inherit;
    border-bottom: 2px solid #8b5cf6;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0 1px;
}
mark.sq-saved-highlight:hover {
    background: rgba(139,92,246,0.28);
}

/* ── Highlight hover tooltip ────────────────────────────────────────────── */
.sq-hl-tip {
    position: absolute;
    background: #1e293b;
    color: #fff;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 0.82rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    z-index: 180000;
    display: none;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}
.sq-hl-tip a       { color: #93c5fd; text-decoration: none; }
.sq-hl-tip a:hover { text-decoration: underline; }
.sq-hl-del {
    color: #f87171;
    cursor: pointer;
    font-size: 0.8rem;
    border-left: 1px solid rgba(255,255,255,0.15);
    padding-left: 10px;
}
.sq-hl-del:hover { text-decoration: underline; }
