/* Feedback widget — floating button + slide-up panel. Self-contained;
   isolated CSS via #sc-feedback prefixes so it doesn't collide with concept
   page styles. */

#sc-feedback {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #0f172a;
}

#sc-fb-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    border: none;
    background: #4f46e5;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}
#sc-fb-toggle:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(79, 70, 229, 0.45); }
#sc-fb-toggle svg { width: 24px; height: 24px; }

#sc-fb-toggle .sc-fb-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f43f5e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

#sc-fb-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 3rem);
    max-height: calc(100vh - 8rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}
#sc-fb-panel[hidden] { display: none; }

#sc-fb-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
#sc-fb-panel header strong { font-size: 0.875rem; }
#sc-fb-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}
#sc-fb-close:hover { color: #0f172a; }

#sc-fb-comments {
    list-style: none;
    margin: 0;
    padding: 0.5rem 1rem;
    overflow-y: auto;
    flex: 1;
    min-height: 80px;
    max-height: 280px;
}
#sc-fb-comments li {
    padding: 0.625rem 0;
    border-bottom: 1px solid #f1f5f9;
}
#sc-fb-comments li:last-child { border-bottom: none; }
#sc-fb-comments .sc-fb-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.125rem;
}
#sc-fb-comments .sc-fb-meta strong { color: #0f172a; }
#sc-fb-comments .sc-fb-body {
    font-size: 0.875rem;
    color: #1e293b;
    white-space: pre-wrap;
    word-wrap: break-word;
}
#sc-fb-comments .sc-fb-empty,
#sc-fb-comments .sc-fb-loading,
#sc-fb-comments .sc-fb-error {
    color: #64748b;
    font-size: 0.8125rem;
    padding: 0.5rem 0;
    text-align: center;
    border: none;
}
#sc-fb-comments .sc-fb-error { color: #f43f5e; }

#sc-fb-form {
    border-top: 1px solid #e2e8f0;
    padding: 0.75rem 1rem 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
#sc-fb-form input,
#sc-fb-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
    color: #0f172a;
    background: #fff;
    box-sizing: border-box;
}
#sc-fb-form textarea { resize: vertical; min-height: 60px; }
#sc-fb-form input:focus,
#sc-fb-form textarea:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
#sc-fb-form button {
    background: #4f46e5;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-end;
}
#sc-fb-form button:hover { background: #4338ca; }
#sc-fb-form button:disabled { opacity: 0.5; cursor: not-allowed; }
