/* ===== SUGGESTIONS SYSTEM ===== */

/* ── Floating suggestion button (used in chat header + CRM) ── */
.suggest-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1;
}
.suggest-btn:hover {
    border-color: #a78bfa;
    color: #7c3aed;
    background: #f5f3ff;
}
.suggest-btn i {
    font-size: 11px;
}

/* ── Submit modal ── */
.suggest-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: suggestFadeIn 0.2s ease-out;
}
.suggest-modal-overlay.hidden { display: none !important; }

.suggest-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.suggest-modal-card {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 28px 24px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    animation: suggestSlideUp 0.25s ease-out;
}

.suggest-modal-close {
    position: absolute;
    top: 10px; right: 14px;
    background: none; border: none;
    font-size: 22px; color: #94a3b8;
    cursor: pointer; border-radius: 6px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.suggest-modal-close:hover { background: #f1f5f9; color: #475569; }

.suggest-modal-title {
    font-size: 18px; font-weight: 700; color: #0f172a;
    margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px;
}
.suggest-modal-title i { color: #7c3aed; font-size: 16px; }

.suggest-modal-subtitle {
    font-size: 13px; color: #94a3b8; margin-bottom: 18px;
}

.suggest-field { margin-bottom: 14px; }
.suggest-field label {
    display: block; font-size: 12px; font-weight: 600;
    color: #475569; margin-bottom: 5px;
}
.suggest-field input,
.suggest-field textarea,
.suggest-field select {
    width: 100%; padding: 10px 12px;
    border: 1px solid #e2e8f0; border-radius: 10px;
    font-size: 14px; color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}
.suggest-field input:focus,
.suggest-field textarea:focus,
.suggest-field select:focus {
    outline: none; border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.suggest-field textarea { resize: vertical; min-height: 70px; }

.suggest-submit-btn {
    width: 100%; padding: 12px;
    border-radius: 10px; border: none;
    font-weight: 600; font-size: 14px;
    color: white;
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(124,58,237,0.3);
}
.suggest-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,0.4);
}
.suggest-submit-btn:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
}

.suggest-board-link {
    display: block; text-align: center;
    margin-top: 10px; font-size: 12px; color: #7c3aed;
    text-decoration: none; transition: color 0.15s;
}
.suggest-board-link:hover { color: #5b21b6; text-decoration: underline; }

/* ── Board page ── */
.board-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px;
}
.board-header {
    text-align: center;
    margin-bottom: 32px;
}
.board-header h1 {
    font-size: 26px; font-weight: 800; color: #0f172a;
    margin-bottom: 6px;
}
.board-header p {
    font-size: 14px; color: #64748b; max-width: 480px;
    margin: 0 auto;
}
.board-filters {
    display: flex; gap: 8px; flex-wrap: wrap;
    justify-content: center; margin-bottom: 24px;
}
.board-filter-btn {
    padding: 6px 14px; border-radius: 20px;
    border: 1px solid #e2e8f0; background: white;
    font-size: 13px; color: #64748b;
    cursor: pointer; transition: all 0.15s;
}
.board-filter-btn:hover { border-color: #a78bfa; color: #7c3aed; }
.board-filter-btn.active {
    background: #7c3aed; color: white; border-color: #7c3aed;
}

/* ── Suggestion card ── */
.suggestion-card {
    display: flex; gap: 14px;
    background: white; border: 1px solid #e2e8f0;
    border-radius: 14px; padding: 16px;
    margin-bottom: 10px;
    transition: all 0.15s;
}
.suggestion-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.suggestion-vote {
    display: flex; flex-direction: column;
    align-items: center; gap: 2px; flex-shrink: 0;
    min-width: 48px;
}
.suggestion-vote-btn {
    width: 42px; height: 42px; border-radius: 10px;
    border: 1.5px solid #e2e8f0; background: #f8fafc;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s;
    gap: 1px;
}
.suggestion-vote-btn i { font-size: 12px; color: #94a3b8; transition: color 0.15s; }
.suggestion-vote-btn .vote-count {
    font-size: 14px; font-weight: 700; color: #475569;
    line-height: 1;
}
.suggestion-vote-btn:hover {
    border-color: #7c3aed; background: #f5f3ff;
}
.suggestion-vote-btn:hover i { color: #7c3aed; }
.suggestion-vote-btn.voted {
    border-color: #7c3aed; background: #ede9fe;
}
.suggestion-vote-btn.voted i { color: #7c3aed; }
.suggestion-vote-btn.voted .vote-count { color: #7c3aed; }

.suggestion-body { flex: 1; min-width: 0; }
.suggestion-title {
    font-size: 15px; font-weight: 600; color: #0f172a;
    margin-bottom: 4px; line-height: 1.35;
}
.suggestion-desc {
    font-size: 13px; color: #64748b; line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.suggestion-meta {
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
}
.suggestion-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 6px;
    font-size: 11px; font-weight: 600;
}
.badge-nueva { background: #dbeafe; color: #1e40af; }
.badge-en-desarrollo { background: #fef3c7; color: #92400e; }
.badge-completada { background: #d1fae5; color: #065f46; }
.badge-planificada { background: #ede9fe; color: #5b21b6; }
.badge-general { background: #f1f5f9; color: #475569; }
.badge-chat { background: #dbeafe; color: #1e40af; }
.badge-crm { background: #fce7f3; color: #9d174d; }
.badge-voz { background: #ccfbf1; color: #115e59; }
.badge-documentos { background: #fef9c3; color: #854d0e; }
.badge-imagenes { background: #fae8ff; color: #6b21a8; }
.badge-valoraciones { background: #ffedd5; color: #9a3412; }

.suggestion-meta-text {
    font-size: 11px; color: #94a3b8;
}

.board-empty {
    text-align: center; padding: 48px 20px; color: #94a3b8;
}
.board-empty i { font-size: 40px; margin-bottom: 12px; opacity: 0.4; }
.board-empty p { font-size: 14px; }

.board-loading {
    text-align: center; padding: 48px; color: #94a3b8;
}

@keyframes suggestFadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes suggestSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile tweaks */
@media (max-width: 640px) {
    .suggest-btn span { display: none; }
    .suggest-btn { padding: 5px 8px; }
    .suggestion-card { padding: 12px; gap: 10px; }
    .suggestion-vote-btn { width: 36px; height: 36px; }
    .suggestion-vote-btn .vote-count { font-size: 13px; }
    .board-header h1 { font-size: 22px; }
}
