/* Already Included (Recurring > Already Included, AlreadyIncludedPage.razor and its two dialogs).
   Built on the Recurring area's cards, rows, tags and buttons (recurring-area.css) and the popups' field box
   (tx-field-box); this file only adds the layout those don't have. Colors come from the area's variables, so light and
   dark follow the site theme. */

.ai-area .rc-card + .rc-card { margin-top: 0; }
.ai-item { display: flex; flex-direction: column; gap: 10px; }
.ai-notice { margin-bottom: 12px; }
.ai-footnote { margin: 12px 2px 0; font-size: 12px; line-height: 1.45; }

.ai-unknowns,
.ai-tiers {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--rc-muted, inherit);
}

.ai-tiers { list-style: none; padding-left: 0; }

/* Dialogs */
.ai-form { display: flex; flex-direction: column; gap: 14px; }
.ai-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 180px; }
.ai-field-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ai-grow { flex: 1 1 260px; }

.ai-dialog-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--rc-card-border);
    background: var(--rc-card);
}

.ai-plans { display: flex; flex-direction: column; gap: 10px; }
.ai-plans-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ai-plan { display: flex; flex-direction: column; gap: 10px; }
.ai-plan-remove { align-self: flex-end; }

.ai-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    line-height: 1.35;
    cursor: pointer;
}

.ai-check input,
.ai-option-head input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--ci-act-accent, #5b4ee6);
}

.ai-checks { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.ai-needs { display: flex; flex-direction: column; }

.ai-reco { display: flex; flex-direction: column; gap: 6px; }
.ai-reco-text { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 600; }

.ai-option { display: flex; flex-direction: column; gap: 8px; }
.ai-option-selected { border-color: var(--ci-act-accent, #5b4ee6); box-shadow: 0 0 0 1px var(--ci-act-accent, #5b4ee6) inset; }
.ai-option-out { opacity: .82; }
.ai-option-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; cursor: pointer; }
.ai-option-out .ai-option-head { cursor: default; }
.ai-option-title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.ai-condition { display: flex; align-items: flex-start; gap: 6px; }

.ai-steps { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.ai-steps li { display: flex; flex-direction: column; gap: 2px; padding-left: 4px; }
.ai-step-title { font-size: 13.5px; font-weight: 600; }
.ai-step-who { font-size: 11.5px; color: var(--rc-muted, inherit); opacity: .85; }

.ai-kept {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--rc-card-border);
    background: var(--rc-card);
    font-size: 13.5px;
    line-height: 1.4;
}

.ai-kept-muted { opacity: .85; }
.ai-check-list { display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 520px) {
    .ai-dialog-foot { justify-content: stretch; }
    .ai-dialog-foot .rc-task-btn { flex: 1 1 0; justify-content: center; }
}
