/* ================================================================
   feedback.css  –  Module 29: User Feedback
   CSS namespace: .fb-*
   ================================================================ */

/* ── Layout ──────────────────────────────────────────────────── */
.fb-layout {
    max-width: 780px;
    margin: 24px auto 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

/* ── Hero banner ─────────────────────────────────────────────── */
.fb-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 32px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.fb-hero-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fb-hero-icon .material-symbols-outlined {
    font-size: 28px;
    color: #818cf8;
}

.fb-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 4px;
}

.fb-hero-sub {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

/* ── Card ────────────────────────────────────────────────────── */
.fb-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 28px;
}

.fb-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.fb-card-icon {
    font-size: 22px;
    color: #6366f1;
}

.fb-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}

/* ── Form ────────────────────────────────────────────────────── */
.fb-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fb-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fb-input,
.fb-textarea {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
    padding: 10px 14px;
    transition: border-color 0.15s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.fb-input:focus,
.fb-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.fb-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.6;
}

.fb-char-count {
    font-size: 0.75rem;
    color: #475569;
    text-align: right;
    margin-top: 2px;
}

.fb-char-count.fb-char-count--warn {
    color: #f59e0b;
}

/* ── Category grid ───────────────────────────────────────────── */
.fb-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.fb-cat-btn {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    color: #94a3b8;
}

.fb-cat-btn:hover {
    border-color: #6366f1;
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.08);
}

.fb-cat-btn--active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.14);
    color: #a5b4fc;
}

.fb-cat-btn--active .fb-cat-icon {
    color: #818cf8;
}

.fb-cat-icon {
    font-size: 20px;
}

.fb-cat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

/* ── Star rating ─────────────────────────────────────────────── */
.fb-stars {
    display: flex;
    gap: 6px;
}

.fb-star {
    font-size: 28px;
    cursor: pointer;
    color: #334155;
    transition: color 0.12s, transform 0.12s;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.fb-star:hover {
    transform: scale(1.15);
    color: #f59e0b;
}

.fb-star--filled {
    color: #f59e0b;
}

.fb-star-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: 4px;
    align-self: center;
}

/* ── Anonymous toggle ────────────────────────────────────────── */
.fb-anon {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.fb-anon-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fb-anon-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e2e8f0;
}

.fb-anon-desc {
    font-size: 0.78rem;
    color: #64748b;
}

/* ── Inline checkbox row (anonymous field) ───────────────────── */
.fb-field--inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.fb-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: #6366f1;
    cursor: pointer;
}

.fb-checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #e2e8f0;
}

.fb-checkbox-hint {
    font-size: 0.78rem;
    color: #64748b;
}

/* ── Submit button ───────────────────────────────────────────── */
.fb-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    width: 100%;
}

.fb-btn-submit:hover:not(:disabled) {
    background: #4f46e5;
}

.fb-btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ── Feedback status badges ──────────────────────────────────── */
.fb-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fb-status--new { background: rgba(100, 116, 139, 0.18); color: #94a3b8; }
.fb-status--review { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.fb-status--planned { background: rgba(99, 102, 241, 0.18); color: #818cf8; }
.fb-status--implemented { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.fb-status--declined { background: rgba(239, 68, 68, 0.18); color: #f87171; }

/* ── Success / Error banners ─────────────────────────────────── */
.fb-success-banner {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4ade80;
    font-size: 0.875rem;
    font-weight: 500;
}

.fb-success-banner .material-symbols-outlined {
    color: #22c55e;
    font-size: 20px;
}

.fb-error-banner {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f87171;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.fb-error-banner .material-symbols-outlined {
    font-size: 18px;
    flex-shrink: 0;
}

/* ── History list ────────────────────────────────────────────── */
.fb-history-empty {
    padding: 40px 0;
    text-align: center;
}

.fb-history-empty-icon {
    font-size: 48px;
    color: #334155;
    display: block;
    margin-bottom: 12px;
}

.fb-history-empty p {
    color: #475569;
    font-size: 0.875rem;
}

.fb-history-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fb-history-item {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 16px 18px;
}

.fb-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.fb-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fb-item-subject {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
}

.fb-item-date {
    font-size: 0.75rem;
    color: #475569;
}

.fb-item-message {
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
    overflow-wrap: break-word;
}

.fb-item-rating {
    display: flex;
    gap: 2px;
    margin-top: 8px;
}

.fb-item-star {
    font-size: 14px;
    color: #f59e0b;
}

.fb-item-star--empty {
    color: #334155;
}

/* ── Admin response ──────────────────────────────────────────── */
.fb-admin-response {
    margin-top: 12px;
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid #6366f1;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
}

.fb-admin-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.fb-admin-notes {
    font-size: 0.85rem;
    color: #cbd5e1;
    line-height: 1.55;
    margin: 0;
}

/* ── Spinner ─────────────────────────────────────────────────── */
.fb-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fb-spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes fb-spin {
    to { transform: rotate(360deg); }
}

/* ── Pagination ──────────────────────────────────────────────── */
.fb-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.fb-page-btn {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #94a3b8;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.fb-page-btn:hover:not(:disabled) {
    background: #334155;
    color: #e2e8f0;
}

.fb-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.fb-page-info {
    font-size: 0.825rem;
    color: #94a3b8;
}
