/* Seguimientos page (on top of recalls.css and automations.css) */

/* Hoy / Esta semana / Todas las fechas: same height as the date inputs */
.fu-range button { padding: 0 14px; min-height: 38px; }

/* Bar on top of the table: status tabs, reason and search */
.fu-tablebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.fu-tablebar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fu-reason-filter { width: 200px; }
.fu-search { position: relative; }
.fu-search svg {
    position: absolute;
    left: 10px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--text-subtle);
    pointer-events: none;
}
.fu-search input { width: 280px; padding-left: 34px; }
@media (max-width: 700px) {
    .fu-tablebar-right, .fu-reason-filter, .fu-search, .fu-search input { width: 100%; }
}

#fuTable tr.fu-selectable { cursor: pointer; }
.fu-date { white-space: nowrap; }
.fu-late { color: var(--warning); font-weight: 600; }
.fu-status .rc-sub { max-width: 320px; white-space: normal; }

/* Status pill that opens the status menu */
.fu-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.fu-status-pill svg { width: 12px; height: 12px; opacity: .6; }
.fu-status-pill:hover, .fu-status-pill[aria-expanded="true"] { border-color: currentColor; }
.fu-status-pill:hover svg { opacity: 1; }
.fu-status-menu {
    position: fixed;
    z-index: 1000;
    min-width: 160px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm), 0 8px 24px rgba(0, 0, 0, .1);
}
.fu-status-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}
.fu-status-menu button:hover, .fu-status-menu button:focus { background: var(--surface-2); outline: none; }
.fu-check { color: var(--brand-text); font-weight: 700; }
.fu-actions { white-space: nowrap; text-align: right; width: 1%; }
.fu-actions .icon-btn { display: inline-flex; vertical-align: middle; width: 30px; height: 30px; }
.fu-actions .icon-btn + .icon-btn { margin-left: 4px; }
.fu-actions .icon-btn svg { width: 16px; height: 16px; }
.fu-actions .icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.fu-actions .fu-danger:hover:not(:disabled) { color: var(--danger); }

/* Modal: patient search */
.fu-modal { max-width: 560px; }
/* The reason dropdown must overflow the modal body instead of being clipped */
.fu-modal .modal-body { overflow: visible; }
.fu-picked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
}
.fu-picked .rc-sub { display: block; }
.fu-results {
    margin-top: 6px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.fu-result {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}
.fu-result:last-child { border-bottom: 0; }
.fu-result:hover, .fu-result:focus { background: var(--brand-soft); outline: none; }
.fu-result.inactive { opacity: .6; }
.fu-result .rc-sub { display: block; }
/* Modal: reason combo (input + own dropdown; the native datalist looks wrong in Safari) */
.fu-combo { position: relative; }
.fu-combo input { width: 100%; padding-right: 40px; }
.fu-combo-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.fu-combo-toggle svg { width: 18px; height: 18px; }
.fu-options {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm), 0 8px 24px rgba(0, 0, 0, .08);
}
.fu-option { padding: 9px 12px; font-size: 14px; cursor: pointer; }
.fu-option:hover, .fu-option.active { background: var(--brand-soft); }
.fu-option.selected { font-weight: 600; }
.fu-option-create { color: var(--brand-text); border-top: 1px solid var(--border); }

.fu-result-empty { padding: 10px 12px; font-size: 13px; color: var(--text-muted); }

/* Modal: "Repetir" */
.fu-repeat { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.fu-repeat .rc-row { margin-top: 12px; }
.fu-repeat #fuRepeatPreview { margin-top: 4px; }

/* Selection bar: "Seleccionar los N pendientes" / "Quitar selección" as links */
.fu-link {
    border: 0;
    padding: 0;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-text);
    cursor: pointer;
}
.fu-link:hover { text-decoration: underline; }
.fu-link + .fu-link::before { content: '·'; margin-right: 8px; color: var(--text-subtle); font-weight: 400; }
.fu-selbar-actions { align-items: center; }
.fu-links { display: inline-flex; align-items: center; gap: 8px; margin-right: 6px; }
.fu-links:empty { display: none; }

/* Bulk "Repetir" modal: list of the selected follow-ups */
.fu-bulk-modal { max-width: 920px; width: calc(100% - 32px); }
.fu-bulk-table {
    max-height: 50vh;
    overflow-y: auto;
    margin: 4px 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.fu-bulk-table .rc-input { min-width: 0; width: 150px; }
.fu-bulk-dates { font-size: 13px; color: var(--text-secondary); }
.fu-bulk-reason .rc-input { width: 190px; }
.fu-bulk-new { display: inline-flex; align-items: center; gap: 6px; }
