/*
 * Ticket Approvals panel styles (rendered into the ticket detail Approvals tab).
 * (c) Adrian Ranta. All rights reserved. Unauthorised use, reproduction and or distribution is strictly prohibited.
 * Palette matches css/ticket-detail.css (slate scale).
 */

.tap-approvals {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- Add control --- */
.tap-add {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
}
.tap-add-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.tap-select {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    min-width: 150px;
}
.tap-add-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.tap-add-btn:hover { background: #1d4ed8; }
.tap-add-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- List --- */
.tap-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tap-loading,
.tap-empty {
    color: #64748b;
    font-size: 14px;
    padding: 6px 2px;
}

.tap-row {
    border: 1px solid #e2e8f0;
    border-left-width: 3px;
    border-radius: 10px;
    background: #fff;
    padding: 12px 14px;
}
.tap-row-pending { border-left-color: #f59e0b; }
.tap-row-approved { border-left-color: #16a34a; }
.tap-row-rejected { border-left-color: #dc2626; }

.tap-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.tap-row-target {
    font-size: 14px;
    color: #0f172a;
    font-weight: 600;
}
.tap-row-kind {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    font-weight: 700;
}
.tap-row-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}
.tap-row-resolved {
    margin-top: 6px;
    font-size: 13px;
    color: #334155;
}
.tap-row-note {
    margin-top: 6px;
    font-size: 13px;
    color: #475569;
    font-style: italic;
    border-left: 2px solid #e2e8f0;
    padding-left: 8px;
}

/* --- Status badge --- */
.tap-badge {
    flex: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.tap-badge-pending { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.tap-badge-approved { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tap-badge-rejected { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* --- Respond controls --- */
.tap-respond {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}
.tap-respond-note {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}
.tap-respond-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.tap-respond-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.tap-respond-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.tap-approve { background: #16a34a; color: #fff; }
.tap-approve:hover { background: #15803d; }
.tap-reject { background: #fff; color: #dc2626; border-color: #fecaca; }
.tap-reject:hover { background: #fef2f2; }

/* --- Dark mode --- */
body.dark-mode .tap-add { background: #1e293b; border-color: #334155; }
body.dark-mode .tap-select { background: #0f172a; color: #e2e8f0; border-color: #334155; }
body.dark-mode .tap-row { background: #1e293b; border-color: #334155; }
body.dark-mode .tap-row-target { color: #e2e8f0; }
body.dark-mode .tap-row-resolved { color: #cbd5e1; }
body.dark-mode .tap-row-note { color: #cbd5e1; border-left-color: #334155; }
body.dark-mode .tap-respond { border-top-color: #334155; }
body.dark-mode .tap-respond-note { background: #0f172a; color: #e2e8f0; border-color: #334155; }
body.dark-mode .tap-reject { background: #1e293b; }
