/*!
 * Algeback Application
 * Content Stylesheet
 *
 * @version 2.0
 * @date 2018-08-08
 */

/* Variables */

:root {
	--headerWidth: 220px;
	--userZoneHeight: 70px;
	--fontSize: 14px;
	
	/* CAPA System brand colors */
	--steelBlue: #a6bbc8;
	--cloudyBlue: #7a99ac;
	--paleBlue: #d9e1e2;
	--actionBlue: #005aa0;
	--paleGray: #d9d9d6;

	--white: #ffffff;
	--black: #000000;
	--neutral: var(--paleGray);
	--neutralHover: var(--paleBlue);
	--border: var(--steelBlue);
	--primary: var(--actionBlue);
	--primaryHover: var(--cloudyBlue);
	--primaryTransparent: rgba(217, 217, 214, .5);
	--success: var(--actionBlue);
	--successHover: var(--cloudyBlue);
	--muted: #a9a9a9;
	

	--valid: #2e9157;
	--warning: #ffa502;
	--expired: #ff4757;

	/* Border Radius Scale */
	--radius-xs: 4px;
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-xl: 24px;
	--radius-full: 9999px;
	--borderRadius: var(--radius-sm);

	/* Soft Shadow System */
	--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
	--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.06);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10), 0 4px 8px rgba(0, 0, 0, 0.06);
	--shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);

	/* Primary colored shadows */
	--shadow-primary-sm: 0 2px 8px rgba(0, 90, 160, 0.15);
	--shadow-primary-md: 0 4px 16px rgba(0, 90, 160, 0.20);
	--shadow-primary-lg: 0 8px 32px rgba(0, 90, 160, 0.25);

	/* Glassmorphism */
	--glass-bg: rgba(255, 255, 255, 0.70);
	--glass-bg-strong: rgba(255, 255, 255, 0.85);
	--glass-bg-dark: rgba(0, 0, 0, 0.65);
	--glass-blur: blur(16px);
	--glass-blur-strong: blur(24px);
	--glass-border: rgba(255, 255, 255, 0.25);
	--glass-border-dark: rgba(0, 0, 0, 0.08);

	/* Transitions */
	--ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
	--transition-fast: 0.15s var(--ease-smooth);
	--transition-normal: 0.25s var(--ease-smooth);

	/* Soft border */
	--border-light: rgba(166, 187, 200, 0.4);
}

/* Box sizing */

*, *:before, *:after {
	box-sizing: border-box;
}

/* Body */

* {
	margin: 0;
	padding: 0;
}

html, body {
	height: 100%;
}

body {
	font-family: 'Mona Sans', serif;
	font-weight: 400;
	font-size: var(--fontSize);
	color: var(--black);
	line-height: normal;
	-webkit-font-smoothing: antialiased;
	font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	-moz-osx-font-smoothing: grayscale;
}

/* Messages */

.page-messages {
	position: relative;
	background-color: var(--white);
	list-style: none;
	font-weight: 700;
	border: 2px solid;
	border-radius: var(--radius-md);
	padding: 12px 12px 12px 60px;
	margin: 0 0 16px 0;
	box-shadow: var(--shadow-md);
	overflow: hidden;
}

.page-messages:before {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--white);
	font-family: 'Font Awesome 6 Pro';
	font-size: 18px;
	font-weight: 900;
	padding-inline: 14px 16px;
	height: 100%;
}

#success_messages {
	border-color: var(--success);
}

#success_messages:before {
	content: '\f00c';
	background-color: var(--success);
}

#error_messages {
	border-color: var(--primary);
}

#error_messages:before {
	content: '\f071';
	background-color: var(--primary);
}

.invalid {
	border-color: var(--expired);
}

.hidden {
	display: none;
}

#document-upload-dialog {
	max-height: 90vh;
	overflow-y: auto;
}

.category-dialog {
	border: 1px solid #ccc;
	background-color: #fff;
	max-height: 100px;
	overflow-y: auto;
	position: relative;
	z-index: 100;
	width: 100%
}

.category-list > ul {
	display: block;
	margin: 0 10px 10px 10px;
	padding: 15px;
}

.category-list ul ul {
	display: none;
	margin-left: 10px;
}

.category-list li {
	list-style: none;
}

.category-list > ul > li {
	margin-bottom: 4px;
}

#category-button {
	margin-bottom: 7px;
}

.has-children-icon {
	margin-left: 5px;
	color: #000;
	font-size: 14px;
}

.depth-icon::before {
	content: '\e3d6';
	font-family: 'Font Awesome 6 Pro';
	font-weight: 900;
	color: var(--muted);
	margin-right: 8px;
}

/* Logo banner */

.wrapper img {
	max-height: 65px;
	width: auto;
	padding-top: 5px;
}

@media (max-width: 1024px) {
	#site_name img {
		max-height: 55px;
	}
}

/* Text */

h1, h2, h3 {
	font-family: 'Sora', serif;
}

h1 {
	font-size: 18px;
	font-weight: 800;
}

h2 {
	font-size: 16px;
	font-weight: 700;
	margin-bottom: 16px;
}

h2 + p {
	margin-top: -8px;
}

h3 {
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 8px;
}

p {
	font-size: var(--fontSize);
	line-height: 20px;
	margin-bottom: 16px;
}

small {
	font-size: 12px;
}

strong {
	font-weight: 700;
}


#content:not(.bare-layout) dl {
	display: flex;
	flex-flow: row wrap;
	flex: 1 0 100%;
	margin-bottom: 16px;
}

#content:not(.bare-layout) dt,
#content:not(.bare-layout) dd {
	display: inline-block;
	width: auto;
	flex: 1 1 50%;
	padding-block: 8px;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	margin-top: -1px;
}

#content:not(.bare-layout) dd {
	text-align: right;
}

a {
	color: var(--black);
	font-weight: 700;
	text-decoration: none;
	transition: .25s;
}

a:hover, a:focus {
	color: var(--primaryHover);
	text-decoration: none;
}

.disabled {
	cursor: not-allowed;
}

a img {
	border: 0;
}

img {
	max-width: 100%;
	height: auto;
}

.badge {
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	background-color: var(--neutral);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	white-space: nowrap;
	padding: 4px 10px;
	border-radius: var(--radius-full);
}

.badge:after {
	content: '';
	position: absolute;
	inset: 0;
}

.badge-success {
	background-color: #688f6a;
	color: var(--white);
}

.badge-danger {
    background-color: #a86464;
    color: var(--white);
}

.badge-warning {
    background-color: #6a8fa0;
    color: var(--black);
}

.badge-pending {
    background-color: #d9a76a;
    color: var(--black);
}

.text-center {
	text-align: center;
}

.text-right {
	text-align: right;
}

.text-uppercase {
	text-transform: uppercase;
}

.ml-auto {
	margin-left: auto;
}

.off-screen {
	position: absolute;
	font-size: 0;
	z-index: -1;
}

/* Header */

#menu_open {
	display: none;
}

.user-zone-info {
	font-weight: 700;
}

.user-zone-info small {
	display: block;
	font-weight: 400;
	text-align: right;
}

#user_zone nav a {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 36px;
	height: 36px;
	background-color: var(--neutral);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-xs);
	transition: transform var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast);
}

#user_zone nav a:hover,
#user_zone nav a.current {
	color: var(--primary);
	transform: translateY(-1px);
	box-shadow: var(--shadow-primary-sm);
}

#user_zone nav a:active {
	transform: translateY(0);
	box-shadow: var(--shadow-xs);
	transition-duration: 0.05s;
}

#user_zone nav a > i {
	transition: transform 0.15s ease;
}

#user_zone nav a:hover > i {
	transform: rotate(-10deg);
}

/* Logout button - red hover effect */
#user_zone nav a.logout-link:hover {
	background-color: #ac3232 !important;
	color: var(--white) !important;
	box-shadow: 0 4px 12px rgba(172, 50, 50, 0.3);
}

#user_zone nav a.logout-link:active {
	background-color: #d83e3e !important;
	color: var(--white) !important;
}

/* Content */

.required-asterisk {
	color: red;
}

.admin-form {
	background-color: var(--white);
	border-radius: var(--radius-md);
	padding: 16px 16px 1px 16px;
	margin-bottom: 16px;
	border: 1px solid var(--border-light);
	box-shadow: var(--shadow-sm);
}

.admin-form img {
	max-height: none;
	width: auto;
	padding-top: 0;
}

.inline-1-4.inline-r-block .news-item img {
	max-width: 100%;
	max-height: 250px;
	width: auto;
	height: auto;
}

.admin-form-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: var(--white);
	padding: 12px 12px 12px 16px;
	margin-bottom: 16px;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-xs);
}

.admin-table-buttons {
	display: flex;
	gap: 8px;
}

.admin-table-filtering {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	flex-wrap: wrap;
	background-color: var(--white);
	margin-bottom: 16px;
	border-radius: var(--radius-sm);
	padding: 12px;
	border: 1px solid var(--border-light);
}

.admin-table-filtering .form-group {
	min-width: 175px;
	margin: 0;
}

.admin-table-filtering .form-group label {
	font-size: 11px;
	margin-bottom: 0;
}

.old-comment {
	border: 1px solid #ccc;
	padding: 10px;
	margin-bottom: 10px;
}

.comment-author {
	font-weight: bold;
}

.comment-text {
	margin-top: 5px;
	word-wrap: break-word;
	overflow-wrap: break-word;
	overflow-x: auto;
}

.comment-time {
	font-size: smaller;
	text-align: right;
}

.trimmed-content {
	overflow: hidden;
	height: 269px;
	position: relative;
}

.trimmed-content::after {
	content: "";
	position: absolute;
	bottom: 0;
    left: 0;
    width: 100%;
    height: 30px; /* Adjust the height of the fade effect */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

.news-item-link {
    text-decoration: none;
	font-weight: inherit;
    display: block; 
    border: 1px solid transparent;
    transition: border-color 0.3s ease;
	padding: 1px;
}

.news-item-link:hover {
	color: inherit;
	background-color: var(--paleBlue);
	border-color: var(--actionBlue);
	transition: background-color 0.3s ease;
}

/* Deviation */
.button-container {
	display: flex;
	gap: 15px;
	background-color: #d9d9d6; /* You can adjust this to match the background color of the container in your image. */
	padding: 20px;
	justify-content: space-between;
	margin-bottom: 15px;
}

.custom-button {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background-color: #7a99ac;
	padding: 10px 25px;
	border: none;
	width: 250px;
	height: 80px;
	transition: 0.3s;
	box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
}

.custom-button:hover {
	box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.25);
}

.count {
	font-size: 28px;
	font-weight: bold;
	margin-bottom: 5px;
	color: #333;
}

.label {
	font-size: 12px;
	text-align: center;
	color: #555;
}

.charts-container {
	display: flex;
	justify-content: space-between;
	padding: 20px 0;
}

.chart-wrapper {
	flex: 1;
	margin: 0 10px;
}

.comment-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.comment-left-panel {
    flex: 1;
}

.comment-right-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}
/* Tables */

table {
	table-layout: fixed;
	border-collapse: collapse;
	width: 100%;
	margin-bottom: 16px;
}

th, td {
	vertical-align: top;
	padding: 10px 8px;
}

.js-use-dynamic-table td {
	vertical-align: middle;
}

th {
	text-align: left;
	border-bottom: 2px solid var(--steelBlue);
}

.sort-column {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--black);
}

td {
	border-bottom: 1px solid var(--border-light);
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-word;
	white-space: normal;
}

tfoot td {
	padding-bottom: 0;
	border-bottom: 0;
}

.empty-result td, .empty-result {
	text-align: center;
	font-style: italic;
}

.sort-column:after {
	font-family: 'Font Awesome 6 Pro';
	font-weight: 900;
	content: '\f0dc';
	font-size: 10px;
}

.sort-column-up:after {
	content: '\f0d8';
}

.sort-column-down:after {
	content: '\f0d7';
}

.admin-table-pagination,
.customer-table-pagination {
	display: flex;
	gap: 8px;
	margin-bottom: 16px;
}

.pagination-link {
	background-color: var(--neutralHover);
	color: var(--black);
	font-weight: 700;
	padding: 9px 12px;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-sm);
	transition: box-shadow var(--transition-fast), background-color var(--transition-fast);
}

.pagination-link.current {
	background-color: var(--primary);
	color: var(--white);
	border: 1px solid var(--primary);
	box-shadow: var(--shadow-primary-sm);
}

.pagination-link:hover {
	border-color: var(--steelBlue);
	color: var(--black);
	box-shadow: var(--shadow-sm);
}

.pagination-link.disabled {
	color: var(--muted);
	cursor: not-allowed;
}

.striped-table tr:nth-child(odd) {
    background-color: #ffffff;
}

.striped-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.striped-table tbody tr {
	transition: background-color 0.15s ease;
}

.striped-table tbody tr:hover {
	background-color: var(--paleBlue);
}

.striped-table tr:has(th):hover {
	background-color: inherit;
}

.striped-table td {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Action links */

.admin-table-actions,
.customer-table-actions {
	text-align: right;
}

.action-link,
.button-seamless.action-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--muted);
	padding: 4px 8px;
	transform: scale(1);
	transition: transform 0.15s ease, color 0.15s ease;
}

.action-link > i {
	transition: transform 0.15s ease;
}

.action-link:hover {
	color: var(--primary);
	transform: scale(1.2);
}

.action-link:hover > i {
	transform: rotate(-15deg);
}

.action-link:active {
	transform: scale(0.9);
	transition-duration: 0.05s;
}

.action-link.t-danger:hover {
	color: var(--expired);
}

.action-link.t-danger:active {
	color: var(--expired);
}

/* Grids */

.wrapper {
	max-width: 1200px;
	margin-inline: auto;
}

.spread-grid {
	display: table;
	table-layout: fixed;
	width: 960px;
	height: 100%;
}

.spread-row {
	display: table-row;
}

.spread-img {
	width: 100%;
}

.spread-1-2, .spread-1-3, .spread-1-4, .spread-2-3, .spread-3-4, .spread-a {
	display: table-cell;
	vertical-align: top;
	height: 100%;
}

.inline, .inline-1-2, .inline-1-3, .inline-1-4, .inline-2-3, .inline-3-4 {
	display: inline-block;
	vertical-align: top;
	width: 100%;
	box-sizing: border-box;
}

.inline-1-2, .spread-1-2, .block-1-2 {
	width: 50%;
}

.inline-1-3, .spread-1-3, .block-1-3 {
	width: 33.33%;
}

.inline-1-4, .spread-1-4, .block-1-4 {
	width: 25%;
}

.inline-2-3, .spread-2-3, .block-2-3 {
	width: 66.66%;
}

.inline-3-4, .spread-3-4, .block-3-4 {
	width: 75%;
}

.inline-left > * {
	margin-right: 10px;
}

.inline-right > * {
	margin-left: 10px;
}

.inline-wrapper {
	letter-spacing: -0.32em;
}

.inline-wrapper > * {
	letter-spacing: normal;
}

.grid-gutter {
	margin-left: -8px;
	margin-right: -8px;
}

.grid-gutter > [class*='inline-'] {
	margin-left: 8px;
	margin-right: 8px;
}

.grid-gutter .inline-1-2 {
	width: calc(100% / 2 - 16px);
}

.grid-gutter .inline-1-3 {
	width: calc(100% / 3 - 16px);
}

.grid-gutter .inline-1-4 {
	width: calc(100% / 4 - 16px);
}

.grid-gutter .inline-2-3 {
	width: calc(100% / 3 * 2 - 16px)
}

.grid-gutter .inline-3-4 {
	width: calc(100% / 4 * 3 - 16px);
}

.spread-content {
	height: 100%;
	background: #fff;
}

.spread-content h2, .spread-content h3 {
	margin: 15px 10px;
}

.spread-content p, .spread-content dl, .spread-content ul {
	margin: 15px 10px;
}

.flex {
	display: flex;
	align-items: center;
	column-gap: 16px;
}

.justify-content-center {
	justify-content: center;
}

.align-items-center {
	align-items: center;
}

.flex-space-between {
	justify-content: space-between;
}

.flex-grow {
	flex-grow: 1;
}

.flex-wrap {
	flex-wrap: wrap;
}

.gap-sm {
	gap: 8px;
}

.no-gap {
	gap: 0;
}

/* Tabs */

.tab-list li a {
	color: var(--muted) !important;
	font-size: var(--fontSize) !important;
	font-weight: 600 !important;
	padding: 16px !important;
	border-top: 4px solid var(--white);
	border-radius: var(--radius-sm) var(--radius-sm) 0 0;
	background-color: var(--neutralHover);
	transition: color var(--transition-fast), border-color var(--transition-fast);
}

.tab-list li a:is(:hover, :focus) {
	color: var(--black) !important;
	text-decoration: none !important;
	border-color: var(--primary);
}

.tab-list li a[aria-selected='true'] {
	color: var(--black) !important;
	font-size: var(--fontSize) !important;
	border-color: var(--primary);
}

.tab-list li a > i {
	transition: transform 0.15s ease;
}

.tab-list li a:hover > i {
	transform: rotate(-10deg);
}

/* Forms */

fieldset {
	display: contents;
}

.form-group, .form-control-group {
	position: relative;
	margin-bottom: 16px;
}

.form-control-group {
	display: flex;
	gap: 6px;
	align-items: center;
}

.form-group label {
	display: block;
	font-weight: 700;
	margin-bottom: 2px;
}

.hide-label, .form-no-labels label {
	position: absolute;
	height: 0;
	overflow: hidden;
}

.input-help {
	display: block;
	color: var(--muted);
	font-size: 12px;
	font-style: italic;
}

input,
textarea,
select {
	appearance: none;
	display: block;
	width: 100%;
	background-color: #005ba017;
	font-family: 'Mona Sans', serif;
	font-size: 14px;
	line-height: 1;
	padding: 7px 8px;
	border: 1px solid var(--steelBlue);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-xs);
	transition: box-shadow var(--transition-fast),
		border-color var(--transition-fast), background-color var(--transition-fast);
}

select {
	padding: 9px 8px;
}

input:hover,
textarea:hover,
select:hover {
	border-color: var(--cloudyBlue);
	box-shadow: var(--shadow-sm);
}

input:focus,
textarea:focus,
select:focus {
	background-color: var(--white);
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(0, 90, 160, 0.12);
	outline: none;
}

input[type="radio"],
input[type="checkbox"],
input[type="file"] {
	display: unset;
	width: auto;
	background-color: transparent;
	padding: 0;
	border: 0;
	accent-color: var(--primary);
}

input[type="search"] {
	background-image: url("../images/icon-search.svg");
	background-size: 14px 14px;
	background-position: top 50% left 8px;
	background-repeat: no-repeat;
	padding-left: 30px !important;
}

input[type=radio] {
	appearance: none;
	width: 18px;
	height: 18px;
	border: 2px solid var(--cloudyBlue);
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	background: var(--white);
}

input[type=radio]:hover {
	border-color: var(--actionBlue);
	box-shadow: 0 0 0 3px rgba(0, 90, 160, 0.1);
}

input[type=radio]:checked {
	border-color: var(--actionBlue);
	background: var(--actionBlue);
	box-shadow: 0 0 0 3px rgba(0, 90, 160, 0.15);
}

input[type=radio]:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--white);
}

input[type="checkbox"] {
	appearance: none;
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid var(--cloudyBlue);
	border-radius: var(--radius-xs);
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	background: var(--white);
}

input[type="checkbox"]:hover {
	border-color: var(--actionBlue);
	box-shadow: 0 0 0 3px rgba(0, 90, 160, 0.1);
}

input[type="checkbox"]:checked {
	border-color: var(--actionBlue);
	background: var(--actionBlue);
	box-shadow: 0 0 0 3px rgba(0, 90, 160, 0.15);
}

input[type="checkbox"]:checked::after {
	content: '\f00c';
	font-family: 'Font Awesome 6 Pro';
	font-weight: 900;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--white);
	font-size: 10px;
}

input[type=date] {
	width: 175px;
}

.dialog input[type="date"],
input[type="date"].input-fullwidth {
	width: 100%;
}

/* Custom date input wrapper styles (to handle faster keyboard input of qualification dates) */
.custom-date-input-wrapper {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.custom-date-input-wrapper input {
	padding: 6px 4px;
	border: 1px solid var(--border);
	font-size: inherit;
	font-family: inherit;
}

.custom-date-input-wrapper input:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.custom-date-input-wrapper .custom-date-year {
	width: 55px;
	text-align: center;
}

.custom-date-input-wrapper .custom-date-month,
.custom-date-input-wrapper .custom-date-day {
	width: 38px;
	text-align: center;
}

.custom-date-input-wrapper .custom-date-sep {
	color: var(--text-muted, #666);
	font-weight: 500;
}

/* Calendar picker button for custom date inputs with picker */
.custom-date-input-wrapper .custom-date-picker-btn {
	padding: 6px 10px;
	margin-right: 6px;
	cursor: pointer;
	border: 1px solid var(--border);
	background: var(--white);
	color: var(--text-muted, #666);
	transition: all 0.15s ease;
}

.custom-date-input-wrapper .custom-date-picker-btn:hover {
	background: var(--gray-100, #f5f5f5);
	border-color: var(--primary);
	color: var(--primary);
}

.custom-date-input-wrapper .custom-date-picker-btn:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.custom-date-input-wrapper .custom-date-picker-btn:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

/* Hide the hidden date input used for picker popup */
.custom-date-input-wrapper .custom-date-picker-hidden {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

input[type="color"] {
	background-color: var(--white);
	border: 1px solid var(--border);
	height: 36px;
}

input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
}

input[type="color"]::-webkit-color-swatch {
	border: 1px solid var(--border);
}

input[type="file"] {
	width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.custom-file-input label {
	position: absolute;
	right: 6px;
	bottom: 6px;
	display: inline-block;
	background-color: var(--muted);
	color: var(--white);
	font-size: 12px;
	padding: 4px 8px;
	margin: 0;
	cursor: pointer;
}

.custom-file-input input[type="file"] {
	display: none;
}

textarea {
	min-height: 72px;
	resize: vertical;
}

select {
	background-image: url('../images/select-arrow.svg');
	background-size: 8px 5px;
	background-position: top 50% right 8px;
	background-repeat: no-repeat;
}

input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0px 1000px var(--neutral) inset;
}

input[disabled],
textarea[disabled] {
	color: var(--muted);
	cursor: not-allowed;
}

input[disabled] + label {
	color: var(--muted);
}

input[readonly],
textarea[readonly] {
	background-color: transparent;
	padding: 0;
	border: 0;
}

/* Styles för placeholders måste vara enskilda för varje renderingsmotor! */
::-webkit-input-placeholder {
	color: var(--muted);
	opacity: 1;
}

:-moz-placeholder {
	color: var(--muted);
	opacity: 1;
}

::-moz-placeholder {
	color: var(--muted);
	opacity: 1;
}

:-ms-input-placeholder {
	color: var(--muted);
	opacity: 1;
}

button,
.button {
	appearance: none;
	position: relative;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	text-align: center;
	gap: 8px;
	background-color: var(--primary);
	color: var(--white);
	font-family: 'Mona Sans', serif;
	font-size: var(--fontSize);
	font-weight: 700;
	line-height: 1;
	padding: 11px 16px;
	border: 1px solid var(--primary);
	border-radius: var(--radius-sm);
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: transform var(--transition-fast), box-shadow var(--transition-fast),
		background-color var(--transition-fast), color var(--transition-fast),
		border-color var(--transition-fast);
}

.button-ghost {
	background-color: transparent;
	color: var(--primaryHover);
}

.button-ghost:after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background-color: var(--primary);
	opacity: .2;
}

button:hover,
.button:hover,
button:focus,
.button:focus {
	background-color: var(--primaryHover);
	color: var(--black);
	outline: none;
	transform: translateY(-1px);
	box-shadow: var(--shadow-primary-md);
}

button:active,
.button:active {
	transform: translateY(0);
	box-shadow: var(--shadow-xs);
	transition-duration: 0.05s;
}

button > i,
.button > i {
	transition: transform 0.15s ease;
}

button:hover > i,
.button:hover > i {
	transform: rotate(-10deg);
}

.button-block {
	display: flex;
	width: 100%;
}

.button-block + .button-block {
	margin-top: 8px;
}

.button-seamless {
	background-color: transparent;
	color: var(--primary);
	padding: 0;
	border: 0;
	box-shadow: none;
	transform: none;
}

.button-seamless:hover,
.button-seamless:focus {
	background-color: transparent;
	color: var(--primaryHover);
	box-shadow: none;
	transform: none;
}

.inline-right > .button-block, .inline-right > .button-block {
    width: calc(100% - 10px);
}

button[disabled], button[disabled]:hover, button[disabled]:focus {
	cursor: not-allowed;
	background: #666;
	box-shadow: none;
	transform: none;
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.form-buttons {
	overflow: hidden;
}

.form-buttons .button-secondary {
	float: left;
}

.form-buttons .button-primary {
	float: right;
}

.uploaded-file {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-block: 4px;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	margin-top: -1px;
}

.uploaded-file:first-of-type {
	margin-top: 16px;
}

/* Fix for Firefox rendering buttons wrong */
button::-moz-focus-inner {
	margin-top: 0;
	margin-bottom: -1px;
	padding: 0;
	border: 0
}

/* Theme (colors) */

.t-primary {
	color: var(--primary);
}

.t-success {
	color: var(--success);
}

.t-success:hover,
.t-success:focus {
	color: var(--successHover);
}

.button.t-success {
	background-color: var(--success);
	color: var(--white);
	border-color: var(--success);
}

.button.t-success:hover,
.button.t-success:focus {
	background-color: var(--successHover);
	color: var(--black);
}

.button-ghost.t-success {
	background-color: transparent;
	color: var(--successHover);
}

.button-ghost.t-success:after {
	background-color: var(--success);
}

.button-ghost.t-success:hover,
.button-ghost.t-success:focus {
	color: var(--white);
}

.button.t-neutral {
	background-color: var(--neutral);
	color: var(--black);
	border-color: var(--border);
	box-shadow: var(--shadow-xs);
}

.button.t-neutral:hover,
.button.t-neutral:focus {
	background-color: var(--neutralHover);
	border-color: var(--primary);
	box-shadow: var(--shadow-primary-md);
}

.button.t-danger {
	background-color: #ac3232;
	color: var(--white);
	border-color: #ac3232;
}

.button.t-danger:hover,
.button.t-danger:focus {
	background-color: #d83e3e;
	color: var(--white);
}

.t-muted {
	color: var(--muted);
}

.bordered {
	padding-block: 8px;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	margin-top: -1px;
}

.date-stamp {
	color: var(--muted);
	font-size: 12px;
	font-style: italic;
}

.valid {
	color: var(--valid);
}

.warning {
	color: var(--warning);
}

.expired,
.t-danger {
	color: var(--expired);
}

/* Color-themes for document categories authorization levels. (in admin view, "authorization_level_READ") */
.access-level-legend {
    display: flex;
    justify-content: left;
    padding: 10px 0;
}

.access-level-legend span {
    padding: 5px 10px;
	margin: 0 5px;
}
.access-level-1 { 
	border-right: 5px solid #2e9157; 
	border-left: 5px solid #2e9157;
	border-bottom: 1px solid #2e9157;
	border-top: 1px solid #2e9157;
}

.access-level-2 { 
	border-right: 5px solid #7a99ac;
	border-left: 5px solid #7a99ac;
	border-bottom: 1px solid #7a99ac;
	border-top: 1px solid #7a99ac;
}

.access-level-3 { 
	border-right: 5px solid #db962d;
	border-left: 5px solid #db962d;
	border-bottom: 1px solid #db962d;
	border-top: 1px solid #db962d;
}

.access-level-4 {
	border-right: 5px solid #c71e3a;
	border-left: 5px solid #c71e3a;
	border-bottom: 1px solid #c71e3a;
	border-top: 1px solid #c71e3a;
}

/* Startpage grid */

.startpage-item-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0 16px;
}

.startpage-item {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: 0;
	min-height: 0;
	aspect-ratio: 1 / 1;
	background-size: cover;
	background-position: center center;
	padding: 16px;
	margin-bottom: 16px;
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.js-selected-display {
	border: 2px solid var(--white);
	outline: 2px solid var(--black);
}

.startpage-item:hover {
	transform: scale(1.025);
	box-shadow: var(--shadow-lg);
}

.startpage-item-actions {
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	width: 100%;
	background: rgba(0,0,0,.25);
	color: var(--white);
	padding: 4px;
}

.startpage-item-actions > * {
	display: block;
	padding: 4px;
	cursor: pointer;
}

.startpage-item-content {
	font-weight: 900;
	line-height: 1.1;
	text-align: center;
	padding: 16px;
}

.startpage-item-auth-level {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	margin-left: auto;
}

/* Startpage Hero (Greeting + News side by side) */

.startpage-hero {
	display: flex;
	gap: 24px;
	padding: 24px 0;
	position: relative;
	min-height: 340px;
}

.startpage-hero-left {
	flex: 0 0 320px;
	display: flex;
	flex-direction: column;
}

.startpage-hero-right {
	position: absolute;
	left: 344px; /* 320px + 24px gap */
	top: 24px;
	right: 0;
	bottom: 24px;
	overflow: hidden;
}

/* Startpage Greeting */

.startpage-greeting {
	margin-bottom: 20px;
}

.startpage-greeting-text {
	font-size: 26px;
	font-weight: 800;
	color: var(--black);
	margin: 0;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.startpage-greeting-date {
	font-size: 13px;
	color: var(--muted);
	margin-top: 6px;
	font-weight: 500;
}

/* Startpage Quick Links */

.startpage-quick-links {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
}

.startpage-quick-link {
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: var(--white);
	color: var(--black);
	font-family: 'Mona Sans', serif;
	font-size: 13px;
	font-weight: 600;
	padding: 10px 18px;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-sm);
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: var(--shadow-xs);
	transition: transform var(--transition-fast), box-shadow var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.startpage-quick-link:hover,
.startpage-quick-link:focus {
	color: var(--primary);
	background-color: var(--white);
	transform: translateY(-1px);
	box-shadow: var(--shadow-primary-sm);
	border-color: var(--primary);
}

.startpage-quick-link:active {
	transform: translateY(0);
	box-shadow: var(--shadow-xs);
	transition-duration: 0.05s;
}

.startpage-quick-link i {
	font-size: 14px;
	color: var(--actionBlue);
}

/* Startpage Quick Links Groups */

.startpage-quick-links-group {
	display: flex;
	flex-direction: column;
	background-color: var(--white);
	border-radius: var(--radius-md);
	overflow: hidden;
	padding: 0 8px 8px;
	gap: 4px;
}

.startpage-quick-links-group-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	background-color: var(--white);
	color: var(--muted);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 1px;
}

.startpage-quick-links-group-header i {
	font-size: 12px;
}

.startpage-quick-links-info-link {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	line-height: 1;
	color: var(--cloudyBlue);
	cursor: pointer;
	padding: 0;
	transition: color 0.2s ease;
}

.startpage-quick-links-info-link i {
	font-size: 14px;
}

.startpage-quick-links-info-link:hover,
.startpage-quick-links-info-link:focus {
	color: var(--actionBlue);
	outline: none;
}

.startpage-submit-info-text {
	font-size: 14px;
	line-height: 1.5;
	color: var(--black);
}

.startpage-submit-info-text p {
	margin-bottom: 10px;
}

.startpage-submit-info-text p:last-child {
	margin-bottom: 0;
}

.startpage-submit-info-icon {
	font-size: 13px;
	margin-right: 6px;
}

.startpage-quick-links-row {
	display: flex;
	gap: 8px;
	width: 100%;
}

.startpage-quick-links-row .startpage-quick-link {
	flex: 1;
	justify-content: center;
	padding: 12px 18px;
}

.startpage-quick-link--small {
	padding: 12px 16px;
	font-size: 13px;
}

/* Startpage News Carousel */

.startpage-news-carousel {
	display: flex;
	flex-direction: column;
	background-color: var(--white);
	overflow: hidden;
	height: 100%;
	min-height: 290px;
}

.startpage-news-carousel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px 12px;
	background-color: transparent;
	color: var(--cloudyBlue);
	position: relative;
}

@keyframes dot-progress-fill {
	from { width: 0%; }
	to { width: 100%; }
}

.startpage-news-carousel-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
}

.startpage-news-carousel-label i {
	font-size: 12px;
}

.startpage-news-carousel-nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.startpage-news-carousel-all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none;
	padding: 0;
	border: none;
	transition: color 0.2s ease;
}

.startpage-news-carousel-all:hover {
	color: var(--cloudyBlue);
}

.startpage-news-carousel-all i {
	font-size: 9px;
	transition: transform 0.2s ease;
}

.startpage-news-carousel-all:hover i {
	transform: translateX(3px);
}

.startpage-news-carousel-btn {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background-color: transparent;
	border: 1px solid var(--border);
	color: var(--cloudyBlue);
	font-size: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.startpage-news-carousel-btn:hover {
	background-color: white;
	border-color: var(--primaryHover);
}

.startpage-news-carousel-btn:hover > i {
	transform: none;
}

.startpage-news-carousel-counter {
	font-size: 12px;
	font-weight: 600;
	min-width: 40px;
	text-align: center;
}

.startpage-news-carousel-viewport {
	position: relative;
	overflow: hidden;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.startpage-news-carousel-track {
	display: flex;
	transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
	flex: 1;
	min-height: 0;
}

.startpage-news-slide {
	flex: 0 0 100%;
	display: flex;
	flex-direction: row;
	cursor: pointer;
	align-items: stretch;
	position: relative;
	padding-left: 1px; /* Fix for subpixel rendering gaps in carousel */
}

.startpage-news-slide::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 50px;
	background: linear-gradient(
		to bottom,
		transparent 0%,
		rgba(255, 255, 255, 0.4) 30%,
		rgba(255, 255, 255, 0.85) 70%,
		var(--white) 100%
	);
	pointer-events: none;
	z-index: 1;
	transition: opacity 0.25s ease;
}

.startpage-news-slide--placeholder {
	cursor: default;
}

.startpage-news-slide--placeholder .startpage-news-slide-content {
	justify-content: center;
	padding: 20px;
}

.startpage-news-slide--placeholder .startpage-news-slide-head {
	margin-bottom: 8px;
}

.startpage-news-slide--placeholder .startpage-news-slide-excerpt {
	flex: 0 0 auto;
	opacity: 0.7;
}

.startpage-news-slide:hover::after,
.startpage-news-slide.is-fade-hidden::after {
	opacity: 0;
}

.startpage-news-slide-image {
	flex: 0 0 33%;
	overflow: hidden;
	position: relative;
}

.startpage-news-slide-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	padding-top: 0px;
}

.startpage-news-slide-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 16px 20px 0px 16px;
}

.startpage-news-slide-head {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}

.startpage-news-slide-date {
	display: inline-block;
	align-self: flex-start;
	font-size: 11px;
	color: var(--muted);
	font-weight: 500;
	padding: 4px 8px;
	border: 1px solid var(--steelBlue);
	border-radius: var(--radius-sm);
	margin-bottom: 0;
}

.startpage-news-slide-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--black);
	margin: 0;
	line-height: 1.3;
}

.startpage-news-slide-excerpt {
	font-size: 12px;
	font-weight: 400;
	color: var(--black);
	line-height: 1.5;
	margin: 0;
	opacity: 0.8;
	overflow: hidden;
	flex: 1;
}

.startpage-news-slide-readmore {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 600;
	color: var(--cloudyBlue);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 0;
	background-color: transparent;
	text-decoration: none;
	transition: color 0.2s ease;
	border: none;
	margin-right: auto;
}

.startpage-news-slide-readmore:hover,
.startpage-news-slide-readmore.is-hovered {
	color: var(--actionBlue);
}

.startpage-news-slide-readmore i {
	font-size: 9px;
	transition: transform 0.2s ease;
}

.startpage-news-slide-readmore:hover i,
.startpage-news-slide-readmore.is-hovered i {
	transform: translateX(3px);
}

.startpage-news-carousel-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 10px 20px;
	background-color: transparent;
}

.startpage-news-carousel-footer .startpage-news-carousel-btn {
	flex-shrink: 0;
}

.startpage-news-carousel-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
}

.startpage-news-carousel-dot {
	width: 6px;
	height: 6px;
	background-color: var(--steelBlue);
	cursor: pointer;
	transition: width 0.3s ease, height 0.3s ease, background-color 0.2s ease;
	position: relative;
	overflow: hidden;
}

.startpage-news-carousel-dot:hover {
	background-color: var(--cloudyBlue);
}

.startpage-news-carousel-dot.is-active {
	width: 28px;
	height: 6px;
	background-color: var(--steelBlue);
}

.startpage-news-carousel-dot-progress {
	position: absolute;
	top: 0;
	left: 0;
	width: 0%;
	height: 100%;
	background-color: var(--cloudyBlue);
}

.startpage-news-carousel-dot.is-active .startpage-news-carousel-dot-progress.is-animating {
	animation: dot-progress-fill 10s linear forwards;
}

.startpage-news-carousel-dot.is-active .startpage-news-carousel-dot-progress.is-paused {
	animation-play-state: paused;
}

/* Startpage Main Grid */

.startpage-main {
	padding-bottom: 32px;
}

.startpage-main .startpage-item-grid {
	grid-template-columns: repeat(4, 1fr);
}

/*
 * Dialog
 */

#dialog_overlay {
	display: none;
	position: fixed;
	z-index: 19999;
	top: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.4);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	width: 100%;
	height: 100%;
}

.dialog {
	display: none;
	position: fixed;
	left: 50%;
	top: 50%;
	min-width: 450px;
	background: var(--white);
	padding: 24px 24px 0 24px;
	border-radius: var(--radius-lg);
	border: 1px solid var(--glass-border);
	box-shadow: var(--shadow-xl);
	z-index: 20000;
	-ms-transform: translate(-50%, -50%);
	-webkit-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
}
.dialog-content {
	height: 100%;
	overflow: auto;
	font-size: 15px;
}

.dialog-content h1 {
	margin-bottom: 16px;
}

.dialog-buttons {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 16px;
	margin-bottom: 24px;
}

.dialog-close-button {
	position: absolute;
	top: 0;
	right: 0;
	width: 28px;
	height: 28px;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(0, 0, 0, 0.7);
	border-radius: var(--radius-full);
	transform: translate(50%, -50%);
	cursor: pointer;
	transition: background-color var(--transition-fast);
}

.dialog-close-button:after {
	content: '\f00d';
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
	color: var(--white);
	transition: transform 0.3s ease;
}

.dialog-close-button:hover:after {
	transform: rotate(90deg);
}

/* Form copy dialog */

.dialog-padding-left {
	padding-left: 20px;
}

/*
 * Tipsy Tooltips
 */

.tipsy {
	position: absolute;
	font-size: 12px;
	padding-bottom: 5px;
	z-index: 100000;
	pointer-events: none;
}

.tipsy-inner {
	max-width: 200px;
	padding: 8px 12px;
	background-color: var(--black);
	color: var(--white);
	text-align: center;
	border-radius: var(--radius-xs);
	box-shadow: var(--shadow-md);
}

.tipsy-arrow {
	position: absolute;
	width: 0;
	height: 0;
	line-height: 0;
	border: 3px dashed var(--black);
}

.tipsy-arrow-n {
	border-bottom-color: var(--black);
}

.tipsy-arrow-s {
	border-top-color: var(--black);
}

.tipsy-arrow-e {
	border-left-color: var(--black);
}

.tipsy-arrow-w {
	border-right-color: var(--black);
}

.tipsy-n .tipsy-arrow {
	top: 0;
	left: 50%;
	margin-left: -3px;
	border-bottom-style: solid;
	border-top: none;
	border-left-color: transparent;
	border-right-color: transparent;
}

.tipsy-nw .tipsy-arrow {
	top: 0;
	left: 10px;
	border-bottom-style: solid;
	border-top: none;
	border-left-color: transparent;
	border-right-color: transparent;
}

.tipsy-ne .tipsy-arrow {
	top: 0;
	right: 10px;
	border-bottom-style: solid;
	border-top: none;
	border-left-color: transparent;
	border-right-color: transparent;
}

.tipsy-s .tipsy-arrow {
	bottom: 2px;
	left: 50%;
	margin-left: -3px;
	border-top-style: solid;
	border-bottom: none;
	border-left-color: transparent;
	border-right-color: transparent;
}

.tipsy-sw .tipsy-arrow {
	bottom: 0;
	left: 10px;
	border-top-style: solid;
	border-bottom: none;
	border-left-color: transparent;
	border-right-color: transparent;
}

.tipsy-se .tipsy-arrow {
	bottom: 0;
	right: 10px;
	border-top-style: solid;
	border-bottom: none;
	border-left-color: transparent;
	border-right-color: transparent;
}

.tipsy-e .tipsy-arrow {
	right: 0;
	top: 50%;
	margin-top: -3px;
	border-left-style: solid;
	border-right: none;
	border-top-color: transparent;
	border-bottom-color: transparent;
}

.tipsy-w .tipsy-arrow {
	left: 0;
	top: 50%;
	margin-top: -3px;
	border-right-style: solid;
	border-left: none;
	border-top-color: transparent;
	border-bottom-color: transparent;
}

/* Select2 */

.select2-container .select2-selection--single {
	height: 36px;
	background-color: var(--neutral);
	border: 1px solid var(--neutral);
}

.select2-container--open .select2-selection--single {
	border-color: var(--border);
	border-bottom: 1px solid var(--neutral);
}

.select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	width: 24px;
	height: 34px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: var(--black) transparent transparent transparent
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent var(--black) transparent;
}

.select2-dropdown {
	background-color: var(--neutral);
	border: 1px solid var(--border);
}

.select2-search--dropdown {
	background-color: var(--neutral);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
	background-color: var(--white);
	border: 0;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: var(--border);
	color: var(--black);
}

.select2-container--default .select2-results__option[aria-selected=true] {
	background-color: var(--border);
}

.select2-container--open {
	z-index: 20000;
}

.select2-search__field {
	min-width: 150px;
}

/* Thank you page */

#thank_you_page {
	position: fixed;
	inset: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	background-image: url("../images/bg-login.jpg");
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

#thank_you_page header {
	background-color: var(--black);
	color: var(--white);
	text-transform: uppercase;
	text-align: center;
	padding: 16px;
}

#thank_you_page .wrapper {
	width: 85%;
	max-width: 500px;
}

#thank_you_page .content {
	background-color: var(--white);
	padding: 16px 16px 1px 16px;
}

@media screen and (max-width: 1024px) {
	/* Type */

	h2 {
		margin-bottom: 12px;
	}

	/* Grids */

	.wrapper {
		padding-inline: 0 !important;
	}

	.inline-r-block {
		display: block;
		width: auto !important;
	}

	.inline-wrapper {
		display: flex;
		flex-direction: column;
	}

	.inline-wrapper > .inline-1-4.inline-r-block {
		order: -1;
	}

	.startpage-item-grid {
		grid-template-columns: 1fr;
	}

	.startpage-main .startpage-item-grid {
		grid-template-columns: 1fr;
	}

	.startpage-hero {
		flex-direction: column;
		padding: 16px 12px;
		gap: 16px;
	}

	.startpage-hero-left {
		flex: none;
	}

	.startpage-hero-right {
		position: static;
		height: auto;
		min-height: 280px;
	}

	.startpage-greeting-text {
		font-size: 22px;
	}

	.startpage-quick-links {
		flex-direction: row;
		flex-wrap: wrap;
		margin-top: 12px;
	}

	.startpage-quick-links-group {
		flex: 1 1 100%;
	}

	.startpage-news-carousel-header {
		padding: 10px 14px 8px;
	}

	.startpage-news-slide {
		flex-direction: column;
	}

	.startpage-news-slide::after {
		display: none;
	}

	.startpage-news-slide-image {
		flex: 0 0 auto;
		width: 100%;
		max-height: 200px;
	}

	.startpage-news-slide-image img {
		position: static;
		width: 100%;
		height: 100%;
		object-fit: cover;
	}

	.startpage-news-slide-content {
		padding: 10px 14px 8px;
	}

	.startpage-news-slide-title {
		font-size: 14px;
	}

	.startpage-news-slide-excerpt {
		display: -webkit-box;
		-webkit-line-clamp: 5;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}


	.startpage-main {
		padding: 0 12px 24px;
	}

	/* Header */

	#header {
		position: fixed !important;
		top: 30px !important;
		bottom: auto !important;
		left: 0 !important;
		display: flex;
		align-items: center;
		gap: 12px;
		width: 100% !important;
		height: 60px !important;
		padding: 12px;
		z-index: 2;
	}

	#menu_open {
		display: flex;
		justify-content: center;
		align-items: center;
		min-width: 36px;
		height: 36px;
		background-color: var(--primaryTransparent);
		color: var(--white);
		font-size: 18px;
		z-index: 1;
	}

	.is-menu-open .open-menu:before {
		content: '\f00d';
		color: var(--primary);
	}

	#menu {
		display: block;
		position: fixed;
		top: 90px;
		left: -100%;
		bottom: 0;
		width: 100%;
		background: var(--black);
		padding-inline: 12px;
		overflow-y: auto;
		opacity: 0;
		transition: .25s;
		pointer-events: none;
	}

	.is-menu-open #menu {
		pointer-events: auto;
		opacity: 1;
		left: 0;
	}

	#user_zone {
		display: flex;
		align-items: center;
		top: 30px !important;
		right: 0;
		height: 60px !important;
		z-index: 3;
		background-color: transparent !important;
	}

	.user-zone-info {
		position: fixed;
		top: 0;
		left: 0;
		display: flex;
		align-items: center;
		gap: 4px;
		width: 100%;
		height: 30px;
		background-color: var(--black);
		color: var(--white) !important;
		font-size: 12px;
		padding-inline: 12px;
		border-bottom: 1px solid rgba(255,255,255,.1);
	}

	.user-zone-info small:before {
		content: '–';
		margin-right: 4px;
	}

	#user_zone nav a {
		background-color: var(--primaryTransparent);
		color: var(--white) !important;
	}

	#user_zone nav a.current {
		color: var(--primary) !important;
	}

	/* Content */

	#content {
		top: 90px !important;
		left: 0 !important;
		padding: 8px 8px 52px 8px !important;
	}

	.admin-form-header {
		padding: 12px;
		margin-bottom: 8px;
	}

	.admin-table-buttons {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		background-color: var(--white);
		padding: 8px;
		border-radius: var(--radius-md) var(--radius-md) 0 0;
		box-shadow: var(--shadow-lg);
		z-index: 1;
	}

	.admin-table-buttons > * {
		flex: 1;
	}

	.admin-form {
		padding: 12px 12px 1px 12px;
		margin-bottom: 8px;
	}

	.admin-table-filtering {
		margin-bottom: 12px;
	}

	.admin-table-filtering .form-group,
	.admin-table-filtering button {
		width: 100%;
	}

	/* Startpage */

	.startpage-item {
		margin-bottom: 12px;
		width: 100%;
		height: 100px;
		display: flex;
		justify-content: center;
		align-items: center;
		background-size: cover;
		background-position: center;
		overflow: hidden;
	}

	/* Forms */

	.form-group {
		margin-bottom: 12px;
	}

	textarea {
		min-height: 108px;
	}

	/* Tables */

	table {
		margin-bottom: 12px;
	}

	.admin-table-pagination {
		margin-bottom: 12px;
	}

	.responsive-table {
		overflow-x: auto;
	}

	.responsive-table table {
		table-layout: auto;
	}

	.responsive-table th,
	.responsive-table td {
		white-space: nowrap;
	}

	/* Dialogs */

	.dialog {
		min-width: auto;
		width: calc(100% - 32px);
		padding: 16px 16px 1px 16px;
	}

	.delete-dialog-question {
		margin-bottom: 16px;
	}

	.delete-dialog-question br {
		display: none;
	}

	.dialog-buttons {
		margin-bottom: 16px;
	}
}

/*
 * Drag drop file upload
 */

.multifile-dropdrag {
	position: relative;
}

.multifile-dropdrag:after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	padding-top: 50%;
	background: #000;
	opacity: 0.6;
	font-size: 16px;
	text-align: center;
	color: #fff;
}

.js .multifile-dropdrag-target {
	padding: 20px;
	background: #eee;
	border: 1px dotted #a4a4a4;
	text-align: center;
}

.js .multifile-dropdrag-target:before {
	content: '';
	display: block;
	font-weight: 400;
	font-size: 18px;
}

.js .multifile-dropdrag-target label {
	display: block;
	overflow: hidden;
	height: 23px;
	color: transparent;
}

.js .multifile-dropdrag-target label:before {
	content: '';
	display: block;
	font-style: italic;
	color: #555;
}

.section-divider {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid #e5e5e5;
}

.input-help.error-message {
    color: #dc3545;
    font-weight: 500;
    margin-top: 4px;
    display: block;
}

#personal_number.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/*
 * Unsaved Changes Detection
 * Highlights modified form fields and rows
 */

/* Input fields, textareas, and selects that have been modified */
.is-changed {
    border-color: var(--warning) !important;
    box-shadow: 0 0 0 3px rgba(255, 165, 2, 0.25) !important;
    background-color: rgba(255, 165, 2, 0.03);
}

/* New rows added via dynamic CRUD */
tr.is-new-row {
    background: rgba(255, 165, 2, 0.12) !important;
}

tr.is-new-row td {
    position: relative;
}

/* Modified existing rows */
tr.is-modified-row {
    background: rgba(255, 165, 2, 0.06) !important;
}

/* Deleted rows (marked for deletion) */
tr.is-deleted-row {
    background: rgba(255, 71, 87, 0.12) !important;
    opacity: 0.7;
}

tr.is-deleted-row td {
    text-decoration: line-through;
    color: var(--muted);
}

tr.is-deleted-row td.admin-table-actions {
    text-decoration: none;
}

tr.is-deleted-row .js-dynamic-crud-undo-delete {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

tr.is-deleted-row .js-dynamic-crud-undo-delete:hover {
    color: var(--muted);
}

/* Unsaved changes notice badge */
.unsaved-changes-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--warning);
    color: var(--white);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.3s ease-in-out, max-width 0.3s ease-in-out, padding 0.3s ease-in-out, margin-right 0.3s ease-in-out;
    padding: 0;
    margin-right: 0;
}

.unsaved-changes-notice i {
    font-size: 14px;
}

/* Show notice when form has changes */
.form-has-changes .unsaved-changes-notice {
    opacity: 1;
    max-width: 250px;
    padding: 6px 12px;
    animation: pulse-warning 2s ease-in-out infinite;
}

/* Pulse animation for save button when changes exist */
.form-has-changes .button.t-success {
    animation: pulse-save 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(0, 90, 160, 0.5);
}

@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes pulse-save {
    0% {
        box-shadow: 0 0 0 0 var(--warning);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(160, 136, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(144, 160, 0, 0);
    }
}

/* Tab indicator for tabs with unsaved changes */
.tab-list li a.has-changes::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--warning);
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}
