/* ============================================================
   HELP ATTACHMENT WIDGET
   frontend/css/help-attachment.css
   Matches the existing help.css dark-card design language.
   ============================================================ */

/* ── Upload area ─────────────────────────────────── */

.ha-upload-area {
    border: 1.5px dashed rgba(255,255,255,0.13);
    border-radius: var(--radius-md);
    transition: border-color 0.2s, background 0.2s;
}

.ha-upload-area.ha-drag-over {
    border-color: var(--amber);
    background: rgba(201,122,58,0.07);
}

.ha-upload-btn {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
    transition: color 0.15s;
    touch-action: manipulation;
}

.ha-upload-btn:hover {
    color: var(--cream);
}

.ha-upload-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.ha-upload-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

/* ── Error message ───────────────────────────────── */

.ha-error {
    font-size: 0.82rem;
    color: #e0706a;
    min-height: 1.2em;
    padding: 0.3rem 0 0;
    line-height: 1.5;
}

/* ── Processing state ────────────────────────────── */

.ha-processing {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.ha-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: ha-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes ha-spin {
    to { transform: rotate(360deg); }
}

/* ── Preview card ────────────────────────────────── */

.ha-preview {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
}

.ha-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    background: var(--dark);
}

.ha-preview-meta {
    flex: 1;
    min-width: 0;
}

.ha-preview-name {
    font-size: 0.85rem;
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ha-preview-size {
    font-size: 0.76rem;
    color: var(--text-dim);
    margin-top: 0.15rem;
}

.ha-remove-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1rem;
    line-height: 1;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
    touch-action: manipulation;
}

.ha-remove-btn:hover {
    color: #e0706a;
    background: rgba(224,112,106,0.1);
}
