/* ============================================================
   feedback.css — Feedback world styles
   All colors via CSS custom properties — zero hardcoded hex.
   ============================================================ */

/* ── Semantic tokens ──────────────────────────────────────── */
:root {
    --fb-accent: var(--accent-color);
    --fb-warn:   var(--accent-secondary, #FF9F0A);
    --fb-ok:     var(--accent-secondary, #30D158);
    --fb-error:  #FF375F;
}

/* ── Main — full width, no max-width cap ─────────────────── */

.fb-main {
    max-width: 100%;
}

/* ── Panel: two columns, full width ──────────────────────── */

.fb-panel {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
}

/* ── Column label ─────────────────────────────────────────── */

.fb-col-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin: 0 0 10px;
}

/* ── LEFT: Category list ──────────────────────────────────── */

.fb-col-type {
    display: flex;
    flex-direction: column;
}

.fb-cat-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fb-cat-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
}

.fb-cat-item:hover {
    background: var(--hover-bg);
    border-color: var(--border-color);
}

/* Suggestion highlighted as natural default */
.fb-cat-item--default:not(.active) {
    border-color: color-mix(in srgb, var(--fb-accent) 28%, transparent);
    background: color-mix(in srgb, var(--fb-accent) 5%, transparent);
}

.fb-cat-item.active {
    border-color: var(--fb-accent);
    background: color-mix(in srgb, var(--fb-accent) 10%, var(--surface-primary));
}

/* Left accent bar */
.fb-cat-item.active::before {
    content: '';
    position: absolute;
    left: -1.5px;
    top: 22%;
    bottom: 22%;
    width: 3px;
    border-radius: 2px;
    background: var(--fb-accent);
}

    font-size: 1.05rem;
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1;
}

.fb-cat-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.3;
    transition: color 0.15s, font-weight 0.15s;
}

.fb-cat-item.active .fb-cat-name {
    color: var(--text-primary);
    font-weight: 600;
}

/* ── RIGHT: Compose column ────────────────────────────────── */

.fb-col-compose {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Message card */
.fb-card {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-secondary);
}

.fb-card .fb-col-label {
    margin-bottom: 8px;
}

/* ── Textarea ─────────────────────────────────────────────── */

.fb-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.93rem;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.6;
    display: block;
}

.fb-textarea::placeholder {
    color: var(--text-tertiary);
}

/* ── Char counter ─────────────────────────────────────────── */

.fb-char-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 18px;
    margin-top: 8px;
}

.fb-char-counter {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-left: auto;
    transition: color 0.15s;
}

.fb-char-counter--warn {
    color: var(--fb-warn);
}

/* ── Email + send row ─────────────────────────────────────── */

.fb-email-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.fb-email-field {
    flex: 1;
    min-width: 0;
}

.fb-email-field .fb-col-label {
    margin-bottom: 6px;
}

/* ── Text input ───────────────────────────────────────────── */

.fb-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 13px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--surface-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}

.fb-input:focus {
    border-color: var(--fb-accent);
}

.fb-input::placeholder {
    color: var(--text-tertiary);
}

/* ── Send column ──────────────────────────────────────────── */

.fb-send-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    flex-shrink: 0;
}

.fb-status {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-align: center;
    min-height: 16px;
    white-space: nowrap;
}

.fb-status--ok    { color: var(--fb-ok); }
.fb-status--error { color: var(--fb-error); }

.fb-submit-btn {
    padding: 10px 28px;
    border-radius: 12px;
    border: none;
    background: var(--fb-accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    white-space: nowrap;
}

.fb-submit-btn:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
}

.fb-submit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ── Markers ──────────────────────────────────────────────── */

.fb-required { color: var(--fb-accent); }

.fb-optional {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-tertiary);
    text-transform: none;
    letter-spacing: 0;
}

/* ── Errors ───────────────────────────────────────────────── */

.fb-error {
    font-size: 0.75rem;
    color: var(--fb-error);
    margin: 4px 0 0;
    min-height: 16px;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 700px) {
    .fb-header { padding: 36px 24px 28px; }

    .fb-panel {
        grid-template-columns: 1fr;
    }

    .fb-cat-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .fb-cat-item {
        flex: 1 1 calc(50% - 4px);
        min-width: 130px;
    }

    .fb-cat-item.active::before {
        left: 20%;
        right: 20%;
        top: -1.5px;
        bottom: auto;
        width: auto;
        height: 3px;
    }

    .fb-email-row {
        flex-direction: column;
        align-items: stretch;
    }

    .fb-send-col {
        flex-direction: row-reverse;
        align-items: center;
        gap: 12px;
    }
}
