/*
 * App-wide button shape: 6px rounded corners on every button, matching the
 * Projects page "New project" button.
 *
 * Loaded from index.html AFTER bootstrap.css / main.css / adminlte.css so it
 * wins over their .btn radii. Deliberately not !important, so:
 *  - Bootstrap's input-group / btn-group rules (more specific) still square
 *    off the inner, joined corners;
 *  - utilities such as .rounded-pill / .rounded-circle (which are !important)
 *    still win where a page asks for a pill or circle.
 */

:root {
	--app-btn-radius: 6px;

	/* Angular Material (v19+ token names, plus the older MDC names). */
	--mat-button-filled-container-shape: var(--app-btn-radius);
	--mat-button-protected-container-shape: var(--app-btn-radius);
	--mat-button-outlined-container-shape: var(--app-btn-radius);
	--mat-button-text-container-shape: var(--app-btn-radius);
	--mat-button-tonal-container-shape: var(--app-btn-radius);
	--mdc-filled-button-container-shape: var(--app-btn-radius);
	--mdc-protected-button-container-shape: var(--app-btn-radius);
	--mdc-outlined-button-container-shape: var(--app-btn-radius);
	--mdc-text-button-container-shape: var(--app-btn-radius);
}

/* Bootstrap buttons, every size. */
.btn,
.btn-xs,
.btn-sm,
.btn-lg,
.btn-group-sm > .btn,
.btn-group-lg > .btn {
	border-radius: var(--app-btn-radius);
}

/* adminlte.css forces `.btn-primary { border-radius: 2px !important }`, so a
   matching !important is needed here... */
.btn.btn-primary {
	border-radius: var(--app-btn-radius) !important;
}

/* ...but keep primary buttons that are joined to an input or to other buttons
   as they were, so the joined edges stay flush. */
.input-group .btn.btn-primary,
.btn-group > .btn.btn-primary {
	border-radius: 2px !important;
}

/* No resize grip (the three diagonal lines) in the corner of any text box.
   !important so it also wins over components that set their own resize. */
textarea {
	resize: none !important;
}

/* Native radio dots and checkbox ticks in the theme's dark blue (same as the
   primary buttons) instead of the browser's default bright blue. */
input[type='radio'],
input[type='checkbox'] {
	accent-color: #1f3a8a;
}

/* PrimeNG buttons. */
.p-button {
	border-radius: var(--app-btn-radius);
}

/* Confirmation dialog ("Are you sure…?"): Yes first, then No, both in the
   theme's dark blue. PrimeNG renders No before Yes; row-reverse flips them
   visually (justify-content: flex-start keeps them on the right). */
.p-confirmdialog .p-dialog-footer {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-start;
	gap: 8px;
}

.p-confirmdialog .p-dialog-footer .p-button {
	margin: 0;
	background: #1f3a8a;
	border-color: #1f3a8a;
	color: #fff;
}

.p-confirmdialog .p-dialog-footer .p-button:not(:disabled):hover,
.p-confirmdialog .p-dialog-footer .p-button:not(:disabled):active {
	background: #2c43b0;
	border-color: #2c43b0;
	color: #fff;
}

.p-confirmdialog .p-dialog-footer .p-button:focus-visible {
	outline: 2px solid #2c43b0;
	outline-offset: 2px;
	box-shadow: none;
}
