.inthea-history-modal[hidden] {
	display: none !important;
}

body.inthea-history-modal-open {
	overflow: hidden;
}

.inthea-history-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.inthea-history-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.45);
}

.inthea-history-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(760px, 100%);
	max-height: min(90vh, 860px);
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
	overflow: hidden;
}

.inthea-history-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px 16px;
	border-bottom: 1px solid #e2e8f0;
}

.inthea-history-modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #0f172a;
}

.inthea-history-modal__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #64748b;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.inthea-history-modal__close:hover {
	background: #f1f5f9;
	color: #0f172a;
}

.inthea-history-modal__body {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 16px 24px;
	scrollbar-width: thin;
	scrollbar-color: rgba(100, 116, 139, 0.45) transparent;
}

.inthea-history-modal__body::-webkit-scrollbar {
	width: 6px;
}

.inthea-history-modal__body::-webkit-scrollbar-track {
	background: transparent;
}

.inthea-history-modal__body::-webkit-scrollbar-thumb {
	border-radius: 999px;
	background: rgba(100, 116, 139, 0.35);
}

.inthea-history-modal__body .inthea-history-entries {
	gap: 12px;
}

.inthea-history-modal__body .inthea-history-empty {
	padding: 32px 16px;
}

.inthea-history-modal__footer {
	display: flex;
	justify-content: flex-end;
	padding: 14px 24px 20px;
	border-top: 1px solid #e2e8f0;
}

.inthea-history-modal__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 8px 16px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #334155;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.inthea-history-modal__button:hover {
	background: #f8fafc;
	border-color: #94a3b8;
}

.inthea-history-entry__change--horizontal {
	flex-wrap: wrap;
	align-items: center;
}

.inthea-history-entry__change--horizontal .inthea-history-entry__arrow {
	font-weight: 700;
	color: #94a3b8;
}
