/* Cuttles quality-of-life fixes (29/9-2026, doc Cuttles/25). Loaded after app.css. */

/* Editor popups (link, image, table) were clipped by the editor box (overflow: hidden) */
.cuttles-froala-editor.fr-box:has(.fr-popup.fr-active) { overflow: visible !important; }

/* Icons: the app uses Font Awesome Duotone ("fad", a Pro font that is never loaded), so pitch cards and other
   spots had empty icon slots. Draw the same icons from the free solid set (Font Awesome 6, already loaded). */
.fad, .fa-duotone {
	font-family: "Font Awesome 6 Free" !important;
	font-weight: 900 !important;
	font-style: normal;
	line-height: 1;
	text-rendering: auto;
	-webkit-font-smoothing: antialiased;
}
.fad::before, .fa-duotone::before { content: var(--fa) !important; }
.fad::after, .fa-duotone::after { content: none !important; }
.decker-header-icon .fad { color: #124AFF; }
/* Pro-only icon names used by the app, mapped to the closest free icon */
.fad.fa-bullseye-pointer { --fa: "\f140"; }   /* bullseye */
.fad.fa-chimney { --fa: "\e3af"; }            /* house-chimney */
.fad.fa-narwhal { --fa: "\f578"; }            /* fish */
.fad.fa-megaphone { --fa: "\f0a1"; }          /* bullhorn */
.fad.fa-eye-evil { --fa: "\f06e"; }           /* eye */
.fad.fa-chart-line-down { --fa: "\e097"; }    /* arrow-trend-down */
.fad.fa-hands-usd { --fa: "\f4c0"; }          /* hand-holding-dollar */
.fad.fa-sack { --fa: "\f81d"; }               /* sack-dollar */

/* ---------- Shared preview + PDF export: look like the pitch in the app ---------- */
/* Answers sit in the same light panel as in the editor, aligned with the card content */
body:not(.cut-auth) .decker .decker-body .cuttles-froala-editor.fr-view {
	background: #F6F8FE !important;
	border: 1px solid #E4EAFA !important;
	border-radius: 12px !important;
	padding: 12px 14px !important;
	margin-top: 10px;
	-webkit-print-color-adjust: exact; print-color-adjust: exact;
}
body:not(.cut-auth) .decker .decker-body .cuttles-froala-editor.fr-view:empty,
body:not(.cut-auth) .decker .decker-body .cuttles-froala-editor.fr-view:not(:has(*:not(br))):not(:has(p:not(:empty))) { display: none; }
body:not(.cut-auth) .decker .decker-body .cuttles-froala-editor.fr-view > p:last-child { margin-bottom: 0; }

/* PDF: crisp card edges instead of a wide soft shadow (Chrome's PDF renderer turns large blurs into a grey-violet haze) */
html.cut-print body:not(.cut-auth) .decker,
html.cut-print body:not(.cut-auth) .mushy-row {
	box-shadow: none !important;
	border: 1px solid #DCE3F5 !important;
	-webkit-print-color-adjust: exact; print-color-adjust: exact;
}
@media print {
	body:not(.cut-auth) .decker,
	body:not(.cut-auth) .mushy-row { box-shadow: none !important; border-color: #DCE3F5 !important; }
}

/* Chart data editor (#10, see qol.js): top row = x-axis labels, first column = series names */
.cut-chart-hint { margin: 0; padding: 10px 16px; font-size: 13.5px; color: #4A5680; background: #F6F8FE; border-bottom: 1px solid #E4EAFA; }
.modal-content .ag-theme-alpine .ag-row[row-index="0"] .ag-cell,
.modal-content .ag-theme-alpine .cut-chart-label { font-weight: 800; color: #10214F; background: #F6F8FE; }

/* ---------- v5 (30/9-2026) ---------- */
/* PDF: a pitch section title ("Funding", "Legal") never sits alone at the bottom of a page */
html.cut-print .row:has(> h3) { break-after: avoid; page-break-after: avoid; }
html.cut-print .plan-widget-header { break-after: avoid; page-break-after: avoid; }
@media print {
	.row:has(> h3), .plan-widget-header { break-after: avoid; page-break-after: avoid; }
}

/* Risk Analysis widget (#62): score badge = likelihood x impact */
.cut-risk-score { display: inline-block; min-width: 34px; padding: 3px 8px; border-radius: 8px; font-weight: 800; font-size: 13px; text-align: center; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cut-risk-score.cut-risk-low { background: #E7F7EE; color: #1C7A45; }
.cut-risk-score.cut-risk-medium { background: #FFF3DC; color: #8A5A00; }
.cut-risk-score.cut-risk-high { background: #FDE8E8; color: #B42318; }
.cut-risk-scroll { overflow-x: auto; margin-bottom: 24px; }
.cut-risk-table { min-width: 720px; }
.cut-risk-row { display: grid; grid-template-columns: minmax(170px, 1.3fr) 150px 150px 64px minmax(220px, 2fr); align-items: start; border-bottom: 1px solid #E4EAFA; }
.cut-risk-editable .cut-risk-row { grid-template-columns: 26px 26px minmax(170px, 1.3fr) 150px 150px 64px minmax(220px, 2fr); }
.cut-risk-cell { padding: 10px 8px; min-width: 0; font-size: 14px; }
.cut-risk-head { background: #F6F8FE; border-radius: 10px 10px 0 0; border-bottom: 1px solid #E4EAFA; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cut-risk-head .cut-risk-cell { font-weight: 800; font-size: 13px; color: #10214F; }
.cut-risk-name { font-weight: 700; }
.cut-risk-action { cursor: pointer; color: #98A2C3; padding-left: 4px; padding-right: 0; }
.cut-risk-row:hover .cut-risk-action .show-on-hover { opacity: 1; }
.cut-risk-mitigation textarea { width: 100%; min-height: 40px; resize: vertical; }
.cut-risk-text { white-space: pre-wrap; }
.cut-risk-add { border-bottom: 0; }
.cut-risk-row .cuttlebone-input input, .cut-risk-row .cuttlebone-input textarea { width: 100%; }
html.cut-print .cut-risk-table { min-width: 0; }

/* Startups list: sort control (#22) */
.cut-startups-sort-label { font-size: 13px; color: var(--moon-3, #6B7599); }
