/* Transaction Rules — templates/members/transactions/rules/*.html.twig */

.txr-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 24px; border-bottom: 1px solid #EEF1F6; flex-wrap: wrap;
}

.txr-table { min-width: 900px; overflow-x: auto; }
.txr-row {
    display: grid; grid-template-columns: 1.4fr 2.4fr 1.3fr .9fr .8fr .7fr;
    align-items: center; padding: 14px 24px; border-bottom: 1px solid #F1F4F9; gap: 10px;
}
.txr-row:hover { background: #F9FBFE; }
.txr-row-head {
    padding: 12px 24px; background: #F7F9FC; border-bottom: 1px solid #EEF1F6;
    font-size: 11px; font-weight: 700; letter-spacing: .06em; color: #7A869E;
}
.txr-row-head:hover { background: #F7F9FC; }

.txr-rule-name { font-size: 14px; font-weight: 700; color: #1C2540; }

.txr-cond { display: flex; align-items: center; gap: 8px; min-width: 0; }
.txr-if-pill { font-size: 11px; font-weight: 700; color: #5B6BD6; background: #EAECF6; padding: 3px 8px; border-radius: 5px; flex-shrink: 0; }
.txr-cond-text { font-size: 13px; color: #3D486A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.txr-cat { display: flex; align-items: center; gap: 8px; min-width: 0; }
.txr-cat-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.txr-cat-name { font-size: 13.5px; font-weight: 600; color: #1C2540; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.txr-applied { font-size: 13.5px; color: #8892A8; }
.txr-applied b { color: #1C2540; }

.txr-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.txr-actions-head { text-align: right; }

/* Modal: conditions builder */
.txr-cond-box { border: 1px solid #E6EBF3; border-radius: 13px; overflow: hidden; margin-bottom: 20px; }
.txr-cond-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #F7F9FC; border-bottom: 1px solid #EEF1F6; }
.txr-cond-box-head-left { display: flex; align-items: center; gap: 9px; }
.txr-cond-box-title { font-size: 13.5px; font-weight: 700; color: #2A3352; }

.txr-then-pill { font-size: 11px; font-weight: 800; color: #1FA463; background: #E4F6EC; padding: 4px 9px; border-radius: 6px; }

.txr-match-toggle { display: flex; align-items: center; background: #EAEEF6; border-radius: 9px; padding: 3px; }
.txr-match-opt { padding: 6px 14px; font-size: 12.5px; font-weight: 700; color: #59647E; border-radius: 7px; cursor: pointer; }
.txr-match-opt.active { background: #fff; color: #1C2540; box-shadow: 0 1px 3px rgba(20,30,70,.12); }

.txr-cond-rows { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.txr-cond-row { display: flex; align-items: center; gap: 8px; }
.txr-cond-connector { font-size: 11px; font-weight: 800; color: #8892A8; width: 34px; flex-shrink: 0; text-align: center; }
.txr-cond-remove {
    width: 38px; height: 38px; border-radius: 9px; background: #F5F7FB; color: #94A0B8;
    display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.txr-cond-remove:hover { background: #FDE9EC; color: #E5484D; }

.txr-add-cond {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; margin: 0 16px 14px;
    border: 1.5px dashed #C3D0E6; border-radius: 9px; font-size: 13px; font-weight: 700; color: #3B6EF6; cursor: pointer;
}
.txr-add-cond:hover { background: #F0F5FF; border-color: #3B6EF6; }

.txr-then-box { border: 1px solid #E6EBF3; border-radius: 13px; padding: 16px; margin-bottom: 20px; }

.txr-active-row { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; margin-bottom: 20px; }
.txr-active-check {
    width: 20px; height: 20px; border-radius: 5px; background: #fff; border: 1.5px solid #C7D0E0;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.txr-active-check.checked { background: #3B6EF6; border-color: #3B6EF6; }
.txr-active-check svg { display: none; }
.txr-active-check.checked svg { display: block; }
.txr-active-title { font-size: 14px; font-weight: 700; color: #1C2540; }
.txr-active-desc { font-size: 12.5px; color: #94A0B8; margin-top: 3px; line-height: 1.5; }

/* Success state (mirrors email-templates modal success) */
.txr-modal-success { padding: 32px 28px; text-align: center; }
.txr-modal-success-icon {
    width: 52px; height: 52px; border-radius: 50%; background: #E4F6EC; color: #1FA463;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.txr-modal-success-title { font-size: 17px; font-weight: 800; color: #1C2540; }
.txr-modal-success-text { font-size: 13.5px; color: #8892A8; margin-top: 6px; }
.txr-modal-success-footer { justify-content: center; border-top: none; margin-top: 22px; padding-top: 0; }
