.wp-block-openai-spoiler-table {
	--spoiler-table-border: #9ca3af;
	--spoiler-table-border-width: 2px;
	--spoiler-table-stripe: rgba(127, 127, 127, 0.08);
	--spoiler-table-header-bg: #f3f4f6;
	--spoiler-table-header-text: #111827;
	--spoiler-table-spoiler-bg: #1f2937;
	--spoiler-table-spoiler-text: #ffffff;
	--spoiler-table-font-size: inherit;
	--spoiler-table-vertical-align: top;
}

.wp-block-openai-spoiler-table .spoiler-table__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.wp-block-openai-spoiler-table .spoiler-table__table {
	border-collapse: collapse;
	font-size: var(--spoiler-table-font-size);
	table-layout: fixed;
	width: 100%;
}

.wp-block-openai-spoiler-table .spoiler-table__table.has-custom-widths {
	min-width: 0;
	width: max-content;
}

.wp-block-openai-spoiler-table .spoiler-table__table.has-custom-widths.is-responsive-fit {
	width: 100%;
}

.wp-block-openai-spoiler-table caption {
	caption-side: top;
	font-weight: 600;
	padding: 0.5rem;
	text-align: left;
}

.wp-block-openai-spoiler-table th.has-text-align-center .spoiler-table__sort {
	justify-content: center;
	width: 100%;
}

.wp-block-openai-spoiler-table th.has-text-align-right .spoiler-table__sort {
	justify-content: flex-end;
	width: 100%;
}

.wp-block-openai-spoiler-table th,
.wp-block-openai-spoiler-table td {
	border: var(--spoiler-table-border-width) solid var(--spoiler-table-border);
	overflow-wrap: anywhere;
	padding: 0.65rem 0.75rem;
	text-align: left;
	vertical-align: var(--spoiler-table-vertical-align);
}

.wp-block-openai-spoiler-table td {
	font-size: var(--spoiler-table-cell-font-size, inherit);
}

.wp-block-openai-spoiler-table th.has-text-align-center,
.wp-block-openai-spoiler-table td.has-text-align-center {
	text-align: center;
}

.wp-block-openai-spoiler-table th.has-text-align-right,
.wp-block-openai-spoiler-table td.has-text-align-right {
	text-align: right;
}

.wp-block-openai-spoiler-table th {
	background: var(--spoiler-table-header-bg);
	color: var(--spoiler-table-header-text);
	font-weight: 600;
}

.wp-block-openai-spoiler-table.is-striped tbody tr:nth-child(even) {
	background: var(--spoiler-table-stripe);
}

.wp-block-openai-spoiler-table .spoiler-table__sort {
	align-items: center;
	appearance: none;
	background: transparent;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: inherit;
	gap: 0.4rem;
	margin: -0.25rem;
	max-width: 100%;
	padding: 0.25rem;
	text-align: left;
}

.wp-block-openai-spoiler-table .spoiler-table__sort:hover,
.wp-block-openai-spoiler-table .spoiler-table__sort:focus-visible {
	text-decoration: underline;
}

.wp-block-openai-spoiler-table .spoiler-table__heading-label {
	min-width: 0;
	overflow-wrap: anywhere;
}

.wp-block-openai-spoiler-table .spoiler-table__sort-icon {
	flex: 0 0 auto;
	font-size: 0.85em;
	line-height: 1;
}

.wp-block-openai-spoiler-table th[aria-sort="ascending"] .spoiler-table__sort-icon::after {
	content: " ↑";
}

.wp-block-openai-spoiler-table th[aria-sort="descending"] .spoiler-table__sort-icon::after {
	content: " ↓";
}

.wp-block-openai-spoiler-table .spoiler-table__reveal {
	appearance: none;
	background: var(--spoiler-table-spoiler-bg);
	border: 1px solid transparent;
	border-radius: 0.25rem;
	color: var(--spoiler-table-spoiler-text);
	cursor: pointer;
	font: inherit;
	max-width: 100%;
	overflow-wrap: anywhere;
	padding: 0.35rem 0.6rem;
	white-space: normal;
}

.wp-block-openai-spoiler-table .spoiler-table__reveal:hover {
	filter: brightness(1.1);
}

.wp-block-openai-spoiler-table .spoiler-table__reveal:focus-visible,
.wp-block-openai-spoiler-table .spoiler-table__sort:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.wp-block-openai-spoiler-table .spoiler-table__content {
	display: block;
	margin: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.wp-block-openai-spoiler-table .spoiler-table__thumbnail {
	display: block;
	height: auto;
	margin: 0 0 0.4rem;
	max-height: 120px;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.wp-block-openai-spoiler-table td.has-text-align-center .spoiler-table__thumbnail {
	margin-left: auto;
	margin-right: auto;
}

.wp-block-openai-spoiler-table td.has-text-align-right .spoiler-table__thumbnail {
	margin-left: auto;
	margin-right: 0;
}

.wp-block-openai-spoiler-table [hidden] {
	display: none !important;
}

.wp-block-openai-spoiler-table .spoiler-table__search {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin-bottom: 0.75rem;
}

.wp-block-openai-spoiler-table .spoiler-table__search-field {
	display: grid;
	flex: 1 1 18rem;
	gap: 0.25rem;
	max-width: 32rem;
}

.wp-block-openai-spoiler-table .spoiler-table__search-label {
	font-weight: 600;
}

.wp-block-openai-spoiler-table .spoiler-table__search-input {
	appearance: none;
	background: #ffffff;
	border: 1px solid var(--spoiler-table-border);
	border-radius: 0.25rem;
	box-sizing: border-box;
	color: #111827;
	font: inherit;
	line-height: 1.4;
	padding: 0.5rem 0.65rem;
	width: 100%;
}

.wp-block-openai-spoiler-table .spoiler-table__search-input:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.wp-block-openai-spoiler-table .spoiler-table__search-status {
	font-size: 0.9em;
	margin: 0 0 0.55rem;
}


@media (max-width: 600px) {
	.wp-block-openai-spoiler-table th,
	.wp-block-openai-spoiler-table td {
		padding: 0.45rem 0.5rem;
	}

	.wp-block-openai-spoiler-table .spoiler-table__search-field {
		flex-basis: 100%;
		max-width: none;
	}

	.wp-block-openai-spoiler-table .spoiler-table__thumbnail {
		max-height: 96px;
	}
}
