.wpstl-submit-wrapper {
	max-width: 760px;
	margin: 0 auto;
}

.wpstl-tool-help-bar {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 10px;
}

.wpstl-tool-help-trigger {
	width: 34px;
	height: 34px;
	border-radius: 999px;
	border: 1px solid #c6d2e6;
	background: #1f4f8a;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
}

.wpstl-tool-help-trigger:hover,
.wpstl-tool-help-trigger:focus {
	background: #173d6b;
}

.wpstl-tool-help-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.wpstl-tool-help-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 39, 0.48);
}

.wpstl-tool-help-dialog {
	position: relative;
	margin: 6vh auto 0;
	width: min(680px, calc(100% - 24px));
	max-height: 88vh;
	overflow: auto;
	padding: 20px 20px 18px;
	background: #fff;
	border-radius: 12px;
	border: 1px solid #d8d8d8;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
}

.wpstl-tool-help-dialog h3 {
	margin: 0 0 10px;
}

.wpstl-tool-help-list {
	margin: 8px 0 12px 18px;
}

.wpstl-tool-help-list li {
	margin: 0 0 6px;
}

.wpstl-tool-help-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}

.wpstl-tool-help-note {
	margin: 0;
	color: #4a4a4a;
}

.wpstl-submit-form {
	display: grid;
	gap: 16px;
	padding: 20px;
	border: 1px solid #d6d6d6;
	border-radius: 10px;
	background: #ffffff;
}

.wpstl-submit-form .wpstl-field {
	display: grid;
	gap: 8px;
}

.wpstl-submit-form .wpstl-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.wpstl-submit-form input[type='url'],
.wpstl-submit-form input[type='text'],
.wpstl-submit-form select,
.wpstl-submit-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #bfbfbf;
	border-radius: 8px;
}

.wpstl-submit-form .description {
	margin: 0;
	color: #505050;
	font-size: 13px;
}

.wpstl-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.wpstl-choice-row {
	display: grid;
	gap: 8px;
}

.wpstl-source-owner-field {
	display: flex !important;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.wpstl-source-owner-field > label {
	margin: 0;
	white-space: nowrap;
}

.wpstl-source-owner-field .wpstl-choice-row {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: nowrap;
}

.wpstl-source-owner-note {
	width: 100%;
	margin: 0;
	color: #b42318 !important;
	font-weight: 700;
}

.wpstl-description-mode-field {
	gap: 10px !important;
}

.wpstl-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
}

.wpstl-switch input[type='checkbox'] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.wpstl-switch-slider {
	position: relative;
	width: 46px;
	height: 24px;
	border-radius: 999px;
	background: #c5cbd6;
	transition: background 0.2s ease;
	flex: 0 0 auto;
}

.wpstl-switch-slider::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: transform 0.2s ease;
}

.wpstl-switch input[type='checkbox']:checked + .wpstl-switch-slider {
	background: #1f8f3b;
}

.wpstl-switch input[type='checkbox']:checked + .wpstl-switch-slider::after {
	transform: translateX(22px);
}

.wpstl-switch input[type='checkbox']:focus + .wpstl-switch-slider {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.wpstl-custom-description-input {
	min-height: 120px;
	resize: vertical;
}

.wpstl-help-tooltip {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #1f4f8a;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	cursor: help;
}

.wpstl-help-tooltip-text {
	position: absolute;
	left: 24px;
	top: 50%;
	transform: translateY(-50%);
	min-width: 220px;
	max-width: 280px;
	background: #1e1e1e;
	color: #fff;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 12px;
	line-height: 1.35;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease;
	z-index: 12;
	pointer-events: none;
}

.wpstl-help-tooltip:hover .wpstl-help-tooltip-text,
.wpstl-help-tooltip:focus .wpstl-help-tooltip-text {
	opacity: 1;
	visibility: visible;
}

.wpstl-keyword-editor {
	border: 1px solid #bfbfbf;
	border-radius: 8px;
	padding: 8px 10px;
	background: #fff;
}

.wpstl-keyword-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}

.wpstl-keyword-list:empty {
	margin-bottom: 0;
}

.wpstl-keyword-confirm-note {
	color: #b42318 !important;
	font-weight: 700;
}

.wpstl-keyword-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	background: #f0f3f8;
	color: #1d2b44;
	font-size: 12px;
	line-height: 1;
}

.wpstl-keyword-chip.is-pending {
	background: #eef2f7;
	color: #38475e;
}

.wpstl-keyword-chip.is-confirmed {
	background: #e9f8ec;
	color: #145a28;
	border: 1px solid #8ed19f;
}

.wpstl-keyword-confirm {
	border: 0;
	background: #1f8f3b;
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	line-height: 1;
	padding: 0;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wpstl-keyword-chip.is-pending .wpstl-keyword-confirm {
	background: #6f8f79;
}

.wpstl-keyword-confirm:hover,
.wpstl-keyword-confirm:focus {
	background: #0f6b28;
}

.wpstl-keyword-text {
	display: inline-block;
}

.wpstl-keyword-remove {
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 0;
	color: #7a1f1f;
}

.wpstl-submit-form .wpstl-keyword-input {
	width: 100%;
	border: 0;
	padding: 6px 2px 2px;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
}

.wpstl-submit-form .wpstl-keyword-input:focus {
	outline: none;
	box-shadow: none;
}

.wpstl-notice {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 14px;
}

.wpstl-notice-success {
	background: #e9f8ec;
	border: 1px solid #8ed19f;
	color: #145a28;
}

.wpstl-notice-error {
	background: #feefef;
	border: 1px solid #e5a6a6;
	color: #7b1a1a;
}

.wpstl-notice-warning {
	background: #fff8e7;
	border: 1px solid #f1cf84;
	color: #704e0f;
}

.wpstl-preview-loading {
	font-size: 14px;
	color: #404040;
}

.wpstl-preview-card {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	border: 1px solid #d5d5d5;
	border-radius: 8px;
	padding: 10px;
	background: #fafafa;
}

.wpstl-preview-image img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.wpstl-preview-title {
	font-weight: 600;
	margin: 0 0 6px;
}

.wpstl-preview-description {
	margin: 0;
	color: #4c4c4c;
	font-size: 14px;
	line-height: 1.4;
}

.wpstl-approved-group {
	margin-bottom: 24px;
}

.wpstl-approved-group h3 {
	margin-bottom: 10px;
	font-size: 1.7rem;
	line-height: 1.2;
}

.wpstl-approved-items {
	display: grid;
	gap: 8px;
}

.wpstl-item {
	display: grid;
	grid-template-columns: 58px 1fr;
	gap: 10px;
	padding: 8px 10px;
	border: 1px solid #e6e6e6;
	border-radius: 8px;
	background: #fff;
	align-items: center;
}

.wpstl-item-image {
	display: block;
}

.wpstl-item-image img {
	width: 58px;
	height: 58px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.wpstl-item-title {
	font-weight: 600;
	margin: 0;
}

.wpstl-item-title a {
	text-decoration: none;
	word-break: break-word;
}

.wpstl-item-meta-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 2px;
	font-size: 12px;
	color: #666;
	flex-wrap: wrap;
}

.wpstl-item-image-placeholder {
	width: 58px;
	height: 58px;
	border-radius: 6px;
	background: #f0f0f0;
	color: #555;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 640px) {
	.wpstl-tool-help-bar {
		margin-bottom: 8px;
	}

	.wpstl-preview-card {
		grid-template-columns: 1fr;
	}

	.wpstl-preview-image img {
		width: 100%;
		max-width: 240px;
		height: auto;
	}

	.wpstl-item-meta-row {
		margin-top: 4px;
	}

	.wpstl-help-tooltip-text {
		left: 0;
		top: calc(100% + 8px);
		transform: none;
		min-width: 180px;
		max-width: 240px;
	}

	.wpstl-portal-label-with-info .wpstl-help-tooltip-text {
		left: 0;
		right: auto;
		min-width: min(220px, calc(100vw - 32px));
		max-width: calc(100vw - 32px);
	}
}

.wpstl-portal {
	display: grid;
	gap: 22px;
	margin-bottom: 18px;
}

.wpstl-portal-intro {
	padding: 18px;
	border: 1px solid #d7d7d7;
	border-radius: 12px;
	background: #ffffff;
}

.wpstl-portal-intro-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
}

.wpstl-portal-intro-head h2 {
	margin: 0;
}

.wpstl-portal-help-trigger {
	flex: 0 0 auto;
	margin-top: 2px;
}

.wpstl-portal-intro p {
	margin: 0 0 14px;
	color: #3e3e3e;
	line-height: 1.5;
}

.wpstl-portal-open-btn {
	font-size: 16px;
	font-weight: 700;
	padding: 10px 18px;
}

.wpstl-portal-list-section {
	display: grid;
	gap: 12px;
}

.wpstl-portal-toolbar {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	flex-wrap: wrap;
	overflow: visible;
}

.wpstl-portal-control {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
	overflow: visible;
}

.wpstl-portal-control label {
	margin: 0;
	white-space: nowrap;
}

.wpstl-portal-label-with-info {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wpstl-portal-label-with-info .wpstl-help-tooltip-text {
	left: auto;
	right: 0;
	top: calc(100% + 8px);
	transform: none;
	min-width: 240px;
	max-width: min(360px, calc(100vw - 32px));
	white-space: normal;
	z-index: 40;
}

.wpstl-portal-control-search {
	flex: 1 1 320px;
}

.wpstl-portal-control-search-toggle {
	margin-left: auto;
}

.wpstl-portal-control-sort-toggle {
	position: relative;
	flex: 0 0 auto;
}

.wpstl-portal-control-reset {
	flex: 0 0 auto;
}

.wpstl-portal-reset {
	white-space: nowrap;
}

.wpstl-portal-search-wrap[hidden] {
	display: none !important;
}

.wpstl-portal-filter {
	min-width: 260px;
	padding: 8px 10px;
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	background: #fff;
}

.wpstl-portal-sort {
	min-width: 190px;
	padding: 8px 10px;
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	background: #fff;
}

.wpstl-portal-owner-filter {
	min-width: 190px;
	padding: 8px 10px;
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	background: #fff;
}

.wpstl-portal-print-filter {
	min-width: 190px;
	padding: 8px 10px;
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	background: #fff;
}

.wpstl-portal-search {
	min-width: 250px;
	padding: 8px 10px;
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	background: #fff;
}

.wpstl-portal-control-search .wpstl-portal-search {
	width: 100%;
}

.wpstl-portal-search-toggle,
.wpstl-portal-sort-toggle {
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	background: #fff;
	color: #1f2937;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.wpstl-portal-search-toggle:hover,
.wpstl-portal-search-toggle:focus,
.wpstl-portal-sort-toggle:hover,
.wpstl-portal-sort-toggle:focus {
	border-color: #a7b2c1;
	background: #f4f7fb;
}

.wpstl-portal-sort-popup {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 45;
	min-width: 240px;
	display: grid;
	gap: 6px;
	padding: 10px;
	border: 1px solid #c8c8c8;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.wpstl-portal-sort-popup[hidden] {
	display: none !important;
}

.wpstl-portal-sort-popup label {
	margin: 0;
}

.wpstl-portal-sort-popup .wpstl-portal-sort {
	min-width: 0;
	width: 100%;
}

.wpstl-portal-search-hint {
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid #ecd8a6;
	background: #fff9e9;
	color: #6c4c06;
	font-size: 13px;
}

.wpstl-portal-list {
	display: grid;
	gap: 8px;
}

.wpstl-portal-search-divider {
	margin: 6px 2px;
	border: 0;
	border-top: 1px solid #d7dce6;
}

.wpstl-portal-search-separator {
	margin: 4px 0;
}

.wpstl-portal-search-divider-note {
	margin: 0 2px;
	font-size: 12px;
	color: #5c5c5c;
}

.wpstl-portal-category-heading {
	margin: 10px 2px 2px;
	font-size: 1.05rem;
	line-height: 1.3;
	color: #1f1f1f;
}

.wpstl-portal-row {
	position: relative;
	border: 1px solid #e2e2e2;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
}

.wpstl-portal-row[data-source-owner="self"]::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 0;
	height: 0;
	border-top: 22px solid #2fa84f;
	border-left: 22px solid transparent;
	pointer-events: none;
}

.wpstl-portal-row-head {
	display: grid;
	grid-template-columns: 58px 1fr 20px;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	cursor: pointer;
}

.wpstl-portal-row-head:focus {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.wpstl-portal-thumb-link {
	display: block;
	width: 58px;
	height: 58px;
}

.wpstl-portal-thumb-link img {
	width: 58px;
	height: 58px;
	object-fit: cover;
	border-radius: 6px;
	display: block;
}

.wpstl-portal-summary {
	min-width: 0;
}

.wpstl-portal-title {
	margin: 0;
	font-weight: 600;
	word-break: break-word;
}

.wpstl-portal-meta {
	margin: 2px 0 0;
	font-size: 12px;
	color: #666;
	word-break: break-word;
}

.wpstl-portal-indicator {
	font-size: 20px;
	font-weight: 600;
	text-align: center;
	color: #4c4c4c;
}

.wpstl-portal-row-body {
	border-top: 1px solid #eeeeee;
	padding: 10px 12px 12px;
	background: #fcfcfc;
}

.wpstl-portal-description {
	margin: 0 0 8px;
	color: #3f3f3f;
	line-height: 1.45;
}

.wpstl-portal-meta-extra {
	margin: 0 0 10px;
	font-size: 13px;
	color: #5c5c5c;
}

.wpstl-portal-model-link {
	display: inline-block;
	font-weight: 600;
	text-decoration: none;
}

.wpstl-portal-empty {
	padding: 10px 12px;
	border: 1px dashed #cfcfcf;
	border-radius: 8px;
	color: #5a5a5a;
	background: #fafafa;
}

.wpstl-portal-load-more-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	padding-top: 2px;
}

.wpstl-portal-load-more-wrap[hidden] {
	display: none !important;
}

.wpstl-portal-load-more {
	white-space: nowrap;
}

.wpstl-portal-load-more-meta {
	font-size: 12px;
	color: #5f5f5f;
}

.wpstl-portal-stats-footer {
	border-top: 1px solid #e4e7ed;
	padding-top: 12px;
	display: grid;
	gap: 10px;
}

.wpstl-portal-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.wpstl-portal-stats-col {
	border: 1px solid #e4e4e4;
	border-radius: 10px;
	padding: 10px;
	background: #fff;
	min-width: 0;
}

.wpstl-portal-stats-col h4 {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.3;
}

.wpstl-portal-stats-thumb-link {
	display: block;
	width: 100%;
	margin: 0 0 8px;
	text-decoration: none;
}

.wpstl-portal-stats-thumb-img {
	display: block;
	width: 100%;
	height: 88px;
	object-fit: cover;
	border-radius: 8px;
}

.wpstl-portal-stats-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 88px;
	border-radius: 8px;
	background: #eef2f7;
	color: #3d4b60;
	font-weight: 700;
	font-size: 28px;
}

.wpstl-portal-stats-title {
	margin: 0 0 4px;
	font-weight: 600;
	font-size: 13px;
	word-break: break-word;
}

.wpstl-portal-stats-meta {
	margin: 0;
	font-size: 12px;
	color: #646464;
}

.wpstl-portal-stats-empty {
	margin: 0;
	font-size: 12px;
	color: #6b7280;
}

.wpstl-portal-stats-actions {
	display: flex;
	justify-content: flex-end;
}

.wpstl-portal-top30-trigger {
	white-space: nowrap;
}

.wpstl-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
}

.wpstl-modal.is-open {
	display: block;
}

.wpstl-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.wpstl-modal-dialog {
	position: relative;
	width: min(760px, calc(100% - 28px));
	max-height: calc(100vh - 40px);
	margin: 20px auto;
	border-radius: 12px;
	background: #ffffff;
	display: grid;
	grid-template-rows: auto 1fr;
	overflow: hidden;
}

.wpstl-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	border-bottom: 1px solid #e6e6e6;
}

.wpstl-modal-header h3 {
	margin: 0;
}

.wpstl-modal-close {
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #444;
	padding: 0 4px;
}

.wpstl-modal-content {
	overflow: auto;
	padding: 12px;
}

.wpstl-submit-wrapper-modal {
	max-width: none;
}

body.wpstl-modal-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.wpstl-portal-row-head {
		grid-template-columns: 48px 1fr 20px;
		gap: 8px;
	}

	.wpstl-portal-filter,
	.wpstl-portal-owner-filter,
	.wpstl-portal-print-filter,
	.wpstl-portal-sort,
	.wpstl-portal-search {
		min-width: 0;
		width: 100%;
	}

	.wpstl-portal-control {
		display: grid;
		gap: 6px;
		width: 100%;
	}

		.wpstl-portal-control-search-toggle {
			margin-left: 0;
			width: auto;
		}

		.wpstl-portal-control-sort-toggle {
			width: auto;
		}

		.wpstl-portal-control-reset {
			width: auto;
		}

		.wpstl-portal-sort-popup {
			right: auto;
			left: 0;
			width: min(280px, calc(100vw - 32px));
		}

	.wpstl-portal-control label {
		white-space: normal;
	}

	.wpstl-portal-thumb-link,
	.wpstl-portal-thumb-link img,
	.wpstl-portal-thumb-link .wpstl-item-image-placeholder {
		width: 48px;
		height: 48px;
	}

	.wpstl-portal-stats-grid {
		grid-template-columns: 1fr;
	}
}
