/* Copyright (C) 2026 Quantum Data Labs
 *
 * Styles for the bilingual clause editor and the contract card.
 */

.contractsmodule-clause {
	border: 1px solid var(--colortopbordertitle1, #ddd);
	border-radius: 6px;
	margin-bottom: 18px;
	padding: 10px 14px 14px 14px;
}

.contractsmodule-clause-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--colortopbordertitle1, #eee);
}

.contractsmodule-clause-num {
	font-weight: bold;
	opacity: 0.7;
}

.contractsmodule-clause-actions a {
	margin-left: 6px;
}

.contractsmodule-lang-block {
	margin-top: 10px;
}

.contractsmodule-lang-label {
	font-weight: bold;
	font-size: 0.9em;
	opacity: 0.75;
	display: block;
	margin-bottom: 4px;
}

/* Arabic input: right to left, and a slightly larger line height because
   Arabic diacritics get cramped at the default one.

   The !important is deliberate. Arabic is pasted in from Word or a browser and
   arrives wrapped in elements carrying their own text-align:left; those inline
   values outrank a normal rule, so the paragraph would sit left aligned inside
   an otherwise right-aligned block. */
.contractsmodule-rtl,
.contractsmodule-rtl input,
.contractsmodule-rtl textarea,
.contractsmodule-rtl .contractsmodule-readonly-body,
.contractsmodule-rtl .contractsmodule-readonly-body * {
	direction: rtl !important;
	text-align: right !important;
	line-height: 1.9;
}

/* Tables inside pasted Arabic still need their cells to read right to left */
.contractsmodule-rtl table {
	margin-left: auto;
	margin-right: 0;
}

.contractsmodule-readonly-body {
	border: 1px dashed var(--colortopbordertitle1, #ddd);
	border-radius: 4px;
	padding: 8px 10px;
	min-height: 32px;
}

.contractsmodule-diff-old {
	background-color: rgba(220, 53, 69, 0.10);
	text-decoration: line-through;
}

.contractsmodule-diff-new {
	background-color: rgba(25, 135, 84, 0.12);
}

.contractsmodule-diff-table td {
	vertical-align: top;
}
