/* Corrective Action modal + trigger icon. Self-contained (no dependency on
 * frontend.css's CSS variables) so it renders correctly whether it's loaded
 * in wp-admin or on the front end. */

.ims-ca-open-btn {
	border: 1px solid #c9beae;
	background: #f1ece1;
	border-radius: 4px;
	width: 30px; height: 30px;
	font-size: 1rem;
	cursor: pointer;
	line-height: 1;
}
.ims-ca-open-btn:disabled {
	opacity: .35;
	cursor: not-allowed;
}

.ims-computed-status {
	display: inline-block;
	padding: .2em .6em;
	border-radius: 10px;
	font-size: .8rem;
	font-weight: 600;
	white-space: nowrap;
}
.ims-computed-status-open { background: #fbe8dd; color: #a1481f; }
.ims-computed-status-closed { background: #e2f2e8; color: #2f6f4e; }
.ims-computed-status-complete { background: #e2f2e8; color: #2f6f4e; }
.ims-computed-status-overdue { background: #fbe0e0; color: #b3261e; }
.ims-ca-badge-none { background: #f1ece1; }
.ims-ca-badge-open { background: #fbe8dd; border-color: #c9825a; }
.ims-ca-badge-in_progress { background: #fdf3d0; border-color: #c9a63a; }
.ims-ca-badge-closed { background: #e2f2e8; border-color: #4f9d6e; }
.ims-ca-badge-verified { background: #d9ecff; border-color: #4a86c9; }

.ims-ca-modal-overlay {
	position: fixed; inset: 0; background: rgba(20, 16, 10, .55);
	display: flex; align-items: flex-start; justify-content: center;
	z-index: 100000; padding: 3rem 1rem; overflow-y: auto;
}
/* Higher specificity than the bare class rule above, so the native
   [hidden] behavior (display:none) actually wins when JS sets/removes
   the hidden attribute -- without this, the unconditional display:flex
   above overrides [hidden] and the modal never actually hides. */
.ims-ca-modal-overlay[hidden] {
	display: none;
}
.ims-ca-modal-box {
	background: #fff; max-width: 720px; width: 100%;
	border-radius: 6px; padding: 1.75rem 2rem; position: relative;
	font-family: Arial, Helvetica, sans-serif;
}
.ims-ca-modal-box h2 { margin-top: 0; color: #6c2419; }
.ims-ca-modal-box h3 { color: #6c2419; font-size: 1rem; margin: 1.25rem 0 .5rem; }
.ims-ca-modal-close {
	position: absolute; top: .75rem; right: 1rem; border: none; background: none;
	font-size: 1.5rem; cursor: pointer; color: #7a7266; line-height: 1;
}
.ims-ca-field { margin-bottom: 1rem; }
.ims-ca-field label { display: block; font-weight: 700; margin-bottom: .3em; font-size: .9rem; }
.ims-ca-finding-readonly {
	background: #faf7f2; border: 1px solid #c9beae;
	border-radius: 3px; padding: .6em .8em; font-size: .92rem;
}
#ims-ca-due-date { padding: .4em; border: 1px solid #c9beae; width: 180px; }
.ims-ca-modal-footer { display: flex; align-items: center; gap: .75rem; margin-top: 1.5rem; justify-content: flex-end; }
.ims-ca-save-status { margin-right: auto; color: #7a7266; font-size: .9rem; }
#ims-ca-followup-table textarea, #ims-ca-followup-table input, #ims-ca-followup-table select {
	width: 100%; font-family: inherit; font-size: .88rem; border: 1px solid #c9beae; padding: .3em;
}
.ims-ca-modal-box .sopdoc-richtext-editable { min-height: 60px; }

@media (max-width: 640px) {
	.ims-ca-modal-box { padding: 1.25rem 1.25rem; }
}
