/* FB Bot Detector – Front-end styles */

#fbbd-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
}

#fbbd-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 28px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

/* Header */
#fbbd-header {
    text-align: center;
    margin-bottom: 24px;
}
#fbbd-header svg {
    width: 48px;
    height: 48px;
    color: #6366f1;
    margin-bottom: 10px;
}
#fbbd-header h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
    color: #111;
}
#fbbd-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95em;
}

/* Form */
.fbbd-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
#fbbd-url {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color .2s;
}
#fbbd-url:focus {
    outline: none;
    border-color: #6366f1;
}
#fbbd-submit {
    padding: 10px 20px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
#fbbd-submit:hover {
    background: #4f46e5;
}
.fbbd-hint {
    font-size: 0.82em;
    color: #9ca3af;
    margin: 4px 0 0;
}

/* Comments section */
.fbbd-comments-section {
    margin: 16px 0 8px;
}
.fbbd-comments-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95em;
    color: #374151;
}
.fbbd-optional {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.88em;
}
#fbbd-comments {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.88em;
    font-family: inherit;
    resize: vertical;
    color: #374151;
    background: #f9fafb;
    transition: border-color .2s;
}
#fbbd-comments:focus {
    outline: none;
    border-color: #6366f1;
    background: #fff;
}
.fbbd-comments-hint {
    margin-top: 4px !important;
    color: #6b7280;
}

/* Loading */
#fbbd-loading {
    text-align: center;
    padding: 32px 0;
    color: #6b7280;
}
.fbbd-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: fbbd-spin .7s linear infinite;
    margin: 0 auto 12px;
}
@keyframes fbbd-spin { to { transform: rotate(360deg); } }

/* Error */
#fbbd-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 0.95em;
}

/* Result */
#fbbd-profile-url {
    margin-bottom: 18px;
    font-size: 0.9em;
    color: #6b7280;
    word-break: break-all;
}
#fbbd-profile-url a {
    color: #6366f1;
}

#fbbd-score-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Gauge */
#fbbd-gauge-wrap {
    text-align: center;
    min-width: 130px;
}
#fbbd-gauge {
    width: 130px;
    height: auto;
}

/* Verdict */
#fbbd-verdict {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.88em;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: .02em;
}
.fbbd-verdict-danger  { background:#fef2f2; color:#dc2626; }
.fbbd-verdict-warning { background:#fff7ed; color:#ea580c; }
.fbbd-verdict-neutral { background:#fefce8; color:#ca8a04; }
.fbbd-verdict-ok      { background:#f0fdf4; color:#16a34a; }
.fbbd-verdict-safe    { background:#eff6ff; color:#2563eb; }

/* Signals */
#fbbd-signals {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fbbd-signal {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85em;
    background: #f9fafb;
    border-left: 3px solid #d1d5db;
}
.fbbd-signal-high   { border-left-color: #ef4444; background: #fef2f2; }
.fbbd-signal-medium { border-left-color: #f97316; background: #fff7ed; }
.fbbd-signal-low    { border-left-color: #22c55e; background: #f0fdf4; }
.fbbd-signal-label  { font-weight: 600; color: #374151; }
.fbbd-signal-value  { color: #6b7280; text-align: right; }

/* Meta cards */
#fbbd-meta-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.fbbd-meta-card {
    flex: 1;
    min-width: 200px;
    display: flex;
    gap: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}
.fbbd-meta-icon { font-size: 1.4em; line-height: 1; }
.fbbd-meta-label {
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9ca3af;
    margin-bottom: 2px;
}
.fbbd-meta-value {
    font-size: 1em;
    font-weight: 700;
    color: #111;
}
.fbbd-meta-confidence {
    font-size: 0.8em;
    color: #6b7280;
    margin-top: 2px;
}
.fbbd-meta-reason {
    font-size: 0.8em;
    color: #9ca3af;
    margin-top: 4px;
    font-style: italic;
}

/* Comment analysis */
#fbbd-comment-analysis {
    background: #f0f4ff;
    border-left: 4px solid #6366f1;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 0 0 18px;
}
#fbbd-comment-analysis h4 {
    margin: 0 0 8px;
    font-size: 0.95em;
    color: #4338ca;
}
#fbbd-comment-analysis-text {
    font-size: 0.9em;
    line-height: 1.6;
    color: #374151;
}

/* Summary */
#fbbd-summary {
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 0.9em;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Reset button */
#fbbd-reset {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9em;
    color: #6b7280;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}
#fbbd-reset:hover {
    border-color: #6366f1;
    color: #6366f1;
}

/* Responsive */
@media (max-width: 480px) {
    #fbbd-card { padding: 20px 16px; }
    #fbbd-score-row { flex-direction: column; align-items: center; }
    .fbbd-input-row { flex-direction: column; }
}
