/**
 * Light-theme overrides for the bundled Swagger UI used on the playground page.
 *
 * Scoped under .sd-playground so it only affects the plugin's playground and
 * never the rest of the site. Base Swagger UI CSS is loaded first; this file
 * recolors it to match the Routeon Dev Portal palette.
 */

.sd-playground {
	color: var(--sd-text-soft);
}

.sd-playground .swagger-ui {
	font-family: var(--sd-font);
	color: var(--sd-text-soft);
}

/* Hide the top bar (URL/explore) — the spec is fixed. */
.sd-playground .swagger-ui .topbar {
	display: none;
}

.sd-playground .swagger-ui .info,
.sd-playground .swagger-ui .scheme-container {
	margin: 0;
	padding: 16px 0;
	background: transparent;
	box-shadow: none;
}

.sd-playground .swagger-ui .info .title,
.sd-playground .swagger-ui .info h1,
.sd-playground .swagger-ui .info h2,
.sd-playground .swagger-ui .opblock-tag,
.sd-playground .swagger-ui .opblock .opblock-summary-path,
.sd-playground .swagger-ui .opblock .opblock-summary-description,
.sd-playground .swagger-ui table thead tr td,
.sd-playground .swagger-ui table thead tr th,
.sd-playground .swagger-ui .parameter__name,
.sd-playground .swagger-ui .response-col_status,
.sd-playground .swagger-ui label,
.sd-playground .swagger-ui .tab li,
.sd-playground .swagger-ui .opblock-description-wrapper p,
.sd-playground .swagger-ui .opblock-external-docs-wrapper p,
.sd-playground .swagger-ui .renderedMarkdown p {
	font-family: var(--sd-font) !important;
	color: var(--sd-text-soft) !important;
}

.sd-playground .swagger-ui .opblock-tag {
	border-bottom-color: var(--sd-border);
}

.sd-playground .swagger-ui .opblock-tag .nostyle {
	font-size: 20px;
}

.sd-playground .swagger-ui .opblock-tag small {
	color: var(--sd-text-muted);
}

/* Operation blocks */
.sd-playground .swagger-ui .opblock {
	margin: 0 0 12px;
	border-color: var(--sd-border);
	border-radius: var(--sd-radius-sm);
	background: var(--sd-surface);
	box-shadow: none;
}

.sd-playground .swagger-ui .opblock .opblock-summary {
	border-color: var(--sd-border);
}

.sd-playground .swagger-ui .opblock .opblock-summary * {
	font-family: var(--sd-font) !important;
}

.sd-playground .swagger-ui .opblock.opblock-get {
	border-color: rgba(56, 168, 244, 0.4);
	background: rgba(56, 168, 244, 0.08);
}

.sd-playground .swagger-ui .opblock.opblock-post {
	border-color: rgba(34, 197, 94, 0.4);
	background: rgba(34, 197, 94, 0.08);
}

.sd-playground .swagger-ui .opblock.opblock-put {
	border-color: rgba(255, 153, 0, 0.4);
	background: rgba(255, 153, 0, 0.08);
}

.sd-playground .swagger-ui .opblock.opblock-patch {
	border-color: rgba(136, 76, 255, 0.4);
	background: rgba(136, 76, 255, 0.08);
}

.sd-playground .swagger-ui .opblock.opblock-delete {
	border-color: rgba(239, 68, 68, 0.4);
	background: rgba(239, 68, 68, 0.08);
}


/* Panels, models, code */
.sd-playground .swagger-ui .opblock-body,
.sd-playground .swagger-ui .model-box,
.sd-playground .swagger-ui section.models,
.sd-playground .swagger-ui .responses-inner {
	background: transparent;
}

.sd-playground .swagger-ui section.models {
	border-color: var(--sd-border);
}

.sd-playground .swagger-ui .model,
.sd-playground .swagger-ui .model-title {
	color: var(--sd-text-soft);
}

.sd-playground .swagger-ui .microlight,
.sd-playground .swagger-ui .highlight-code,
.sd-playground .swagger-ui textarea,
.sd-playground .swagger-ui .body-param__text {
	color: var(--sd-text-soft) !important;
	border-radius: var(--sd-radius-sm);
	background: var(--sd-code-bg) !important;
}

.sd-playground .swagger-ui .highlight-code,
.sd-playground .swagger-ui .body-param__text {
	overflow-x: auto;
	padding: 32px;
	font-family: var(--sd-mono);
	font-size: 13.5px;
	line-height: 1.6;
}

@media (max-width: 768px) {
	.sd-playground .swagger-ui .highlight-code,
	.sd-playground .swagger-ui .body-param__text {
		padding: 24px;
	}

	.sd-playground .swagger-ui .highlight-code {
		padding: 8px;
	}
}

/* microlight applies inline style="color:..." per token — override for light theme */
.sd-playground .swagger-ui .microlight span,
.sd-playground .swagger-ui .highlight-code span {
	color: inherit !important;
}

.sd-playground .swagger-ui input[type=text],
.sd-playground .swagger-ui input[type=email],
.sd-playground .swagger-ui input[type=password],
.sd-playground .swagger-ui input[type=search],
.sd-playground .swagger-ui select,
.sd-playground .swagger-ui textarea {
	color: var(--sd-text);
	border: 1px solid var(--sd-border-strong);
	background: var(--sd-surface-2);
}

.sd-playground .swagger-ui .filter .operation-filter-input {
	border-color: var(--sd-border-strong);
}

/* Tables */
.sd-playground .swagger-ui table tbody tr td {
	color: var(--sd-text-soft);
	border-color: var(--sd-border);
}

/* Buttons */
.sd-playground .swagger-ui .btn {
	color: var(--sd-text-soft);
	border-color: var(--sd-border-strong);
	background: var(--sd-surface-2);
	box-shadow: none;
}

.sd-playground .swagger-ui .btn.execute {
	color: var(--sd-text-on-accent);
	border-color: var(--sd-accent);
	background: var(--sd-accent);
}

.sd-playground .swagger-ui .btn.authorize {
	color: var(--sd-post);
	border-color: var(--sd-post);
}

.sd-playground .swagger-ui svg:not(:root) {
	fill: var(--sd-text-soft);
}

/* Response section */
.sd-playground .swagger-ui .responses-inner h4,
.sd-playground .swagger-ui .responses-inner h5,
.sd-playground .swagger-ui .response-col_links {
	color: var(--sd-text-muted);
}

.sd-playground .swagger-ui .model-box-control:focus,
.sd-playground .swagger-ui .models-control:focus,
.sd-playground .swagger-ui .opblock-summary-control:focus {
	outline: none;
}

.sd-playground .swagger-ui .expand-methods,
.sd-playground .swagger-ui .expand-operation,
.sd-playground .swagger-ui .opblock-control-arrow {
	position: relative;
	width: 32px;
	height: 32px;
	margin-left: 8px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%238D8D98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.sd-playground .swagger-ui .expand-methods:hover,
.sd-playground .swagger-ui .expand-operation:hover,
.sd-playground .swagger-ui .opblock-control-arrow:hover {
	filter: brightness(1.3);
}

.sd-playground .swagger-ui .expand-methods[aria-expanded="false"],
.sd-playground .swagger-ui .expand-operation[aria-expanded="false"],
.sd-playground .swagger-ui .opblock-control-arrow[aria-expanded="false"] {
	transform: scaleY(-1);
}

.sd-playground .swagger-ui .expand-methods svg,
.sd-playground .swagger-ui .expand-operation svg,
.sd-playground .swagger-ui .opblock-control-arrow svg {
	display: none;
}

.sd-playground .swagger-ui .authorization__btn {
	z-index: 1;
	overflow: hidden;
	width: 32px;
	height: 32px;
	margin-left: 8px;
	padding: 0;
	border-radius: 8px;
	background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z' fill='%23414154'/%3E%3Cpath d='M12.667 14.6667V13.3333C12.667 11.4924 14.1594 10 16.0003 10C17.3672 10 18.5419 10.8227 19.0563 12M16.0003 17.6667V19M13.867 22H18.1337C19.2538 22 19.8138 22 20.2416 21.782C20.618 21.5903 20.9239 21.2843 21.1157 20.908C21.3337 20.4802 21.3337 19.9201 21.3337 18.8V17.8667C21.3337 16.7466 21.3337 16.1865 21.1157 15.7587C20.9239 15.3824 20.618 15.0764 20.2416 14.8847C19.8138 14.6667 19.2538 14.6667 18.1337 14.6667H13.867C12.7469 14.6667 12.1868 14.6667 11.759 14.8847C11.3827 15.0764 11.0767 15.3824 10.885 15.7587C10.667 16.1865 10.667 16.7466 10.667 17.8667V18.8C10.667 19.9201 10.667 20.4802 10.885 20.908C11.0767 21.2843 11.3827 21.5903 11.759 21.782C12.1868 22 12.7469 22 13.867 22Z' stroke='%23A6A6AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
	background-repeat: no-repeat;
	background-position: center;
}

.sd-playground .swagger-ui .authorization__btn:hover {
	filter: brightness(1.3);
}

.sd-playground .swagger-ui .authorization__btn:active {
	filter: brightness(2.5);
}

.sd-playground .swagger-ui .authorization__btn svg {
	display: none;
}

.sd-playground .swagger-ui .copy-to-clipboard {
	z-index: 1;
	overflow: hidden;
	width: 32px !important;
	height: 32px !important;
	margin: 0 !important;
	padding: 0;
	border: none !important;
	border-radius: 8px !important;
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 8C0 3.58172 3.58172 0 8 0H24C28.4183 0 32 3.58172 32 8V24C32 28.4183 28.4183 32 24 32H8C3.58172 32 0 28.4183 0 24V8Z' fill='%23414154'/%3E%3Cg clip-path='url(%23clip0_1140_81672)'%3E%3Cpath d='M18.6663 13.3334V11.4667C18.6663 10.72 18.6663 10.3466 18.521 10.0614C18.3932 9.8105 18.1892 9.60653 17.9383 9.4787C17.6531 9.33337 17.2797 9.33337 16.533 9.33337H11.4663C10.7196 9.33337 10.3462 9.33337 10.061 9.4787C9.81014 9.60653 9.60616 9.8105 9.47833 10.0614C9.33301 10.3466 9.33301 10.72 9.33301 11.4667V16.5334C9.33301 17.2801 9.33301 17.6535 9.47833 17.9387C9.60616 18.1896 9.81014 18.3936 10.061 18.5214C10.3462 18.6667 10.7196 18.6667 11.4663 18.6667H13.333M15.4663 22.6667H20.533C21.2797 22.6667 21.6531 22.6667 21.9383 22.5214C22.1892 22.3936 22.3932 22.1896 22.521 21.9387C22.6663 21.6535 22.6663 21.2801 22.6663 20.5334V15.4667C22.6663 14.72 22.6663 14.3466 22.521 14.0614C22.3932 13.8105 22.1892 13.6065 21.9383 13.4787C21.6531 13.3334 21.2797 13.3334 20.533 13.3334H15.4663C14.7196 13.3334 14.3462 13.3334 14.061 13.4787C13.8101 13.6065 13.6062 13.8105 13.4783 14.0614C13.333 14.3466 13.333 14.72 13.333 15.4667V20.5334C13.333 21.2801 13.333 21.6535 13.4783 21.9387C13.6062 22.1896 13.8101 22.3936 14.061 22.5214C14.3462 22.6667 14.7196 22.6667 15.4663 22.6667Z' stroke='%23A6A6AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_1140_81672'%3E%3Crect width='16' height='16' fill='white' transform='translate(8 8)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
	background-repeat: no-repeat;
	background-position: center;
}

.sd-playground .swagger-ui .copy-to-clipboard:hover {
	filter: brightness(1.3);
}

.sd-playground .swagger-ui .copy-to-clipboard:active {
	filter: brightness(2.5);
}

.sd-playground .swagger-ui .copy-to-clipboard svg {
	display: none;
}

.swagger-ui .curl-command .copy-to-clipboard button {
	visibility: hidden;

}

.sd-playground .swagger-ui .model-toggle:after {
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%238D8D98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}

.sd-playground .swagger-ui .model-box-control,
.sd-playground .swagger-ui .models-control {
	font-family: var(--sd-font) !important;
	color: var(--sd-text-soft);
}

.sd-playground .swagger-ui .information-container.wrapper {
	font-family: var(--sd-font) !important;
}

.sd-playground .swagger-ui .information-container.wrapper .title {
	display: flex;
	align-items: center;
}

@media (max-width: 768px) {
	.sd-playground .swagger-ui .information-container.wrapper .title {
		font-size: 24px;
		display: block;
	}
}

.sd-playground .swagger-ui .information-container.wrapper .title span {
	display: inline-flex;
	align-items: center;
}

.sd-playground .swagger-ui .information-container.wrapper h1 {
	font-size: 32px;
	color: var(--sd-text);
}

.sd-playground .swagger-ui .info .title small {
	top: 0;
	padding: 2px 8px;
	background: var(--sd-border);
}

.sd-playground .swagger-ui .info .title small pre {
	font-weight: 400;
}

.sd-playground .swagger-ui .info .title small.version-stamp {
	background-color: var(--sd-post);
}

.sd-playground .swagger-ui .scheme-container,
.sd-playground .swagger-ui .opblock-tag-section {
	font-family: var(--sd-font) !important;
}

.sd-playground .swagger-ui .dialog-ux .modal-ux * {
	color: var(--sd-text) !important;
	background: var(--sd-surface-2) !important;
}

.sd-playground .swagger-ui .opblock .opblock-section-header {
	background: transparent;
}

.sd-playground .swagger-ui .opblock .tab-header .tab-item.active h4 span {
	color: var(--sd-text-soft);
}

.sd-playground .swagger-ui .info h1,
.sd-playground .swagger-ui .info h2,
.sd-playground .swagger-ui .info h3,
.sd-playground .swagger-ui .info h4,
.sd-playground .swagger-ui .info h5,
.sd-playground .swagger-ui .info li,
.sd-playground .swagger-ui .info p,
.sd-playground .swagger-ui .info table {
	font-family: var(--sd-font) !important;
	color: var(--sd-text-soft);
}

.sd-playground .swagger-ui .markdown :not(pre) > code,
.sd-playground .swagger-ui .renderedMarkdown :not(pre) > code {
	font-family: var(--sd-mono);
	font-size: inherit;
	margin: 1px 0;
	padding: 2px 8px;
	color: var(--sd-text-soft);
	border-radius: 50rem;
	background: var(--sd-border);
	border: 1px solid var(--sd-border-strong);
}

@media (min-width: 768px) {
	.sd-playground .swagger-ui .markdown :not(pre) > code,
	.sd-playground .swagger-ui .renderedMarkdown :not(pre) > code  {
		display: inline-block;
	}
}

.sd-playground .swagger-ui .markdown pre code,
.sd-playground .swagger-ui .renderedMarkdown pre code {
	color: var(--sd-text-soft) !important;
	border: 1px solid var(--sd-border-strong);
	border-radius: var(--sd-radius-sm);
	background: var(--sd-code-bg) !important;
}

.sd-playground .swagger-ui .opblock-description-wrapper,
.sd-playground .swagger-ui .opblock-external-docs-wrapper,
.sd-playground .swagger-ui .opblock-title_normal {
	font-family: var(--sd-font) !important;
	color: var(--sd-text-soft) !important;
}

@media (max-width: 768px) {
	.sd-playground .swagger-ui .responses-inner {
		overflow-x: auto;
	}

	.sd-playground .swagger-ui .response-col_description {
		min-width: 320px;
	}
}

@media (max-width: 768px) {
	.sd-playground .swagger-ui details,
	.sd-playground .swagger-ui .markdown {
		overflow-x: auto;
	}

	.sd-playground .swagger-ui .opblock-tag {
		flex-direction: column;
		align-items: flex-start;
		position: relative;
		padding-right: 52px;
	}

	.sd-playground .swagger-ui .opblock-tag small {
		padding: 0;
	}

	.sd-playground .swagger-ui .opblock-tag .expand-operation {
		position: absolute;
		top: 50%;
		right: 12px;
		transform: translateY(-50%);
	}

	.sd-playground .swagger-ui .opblock-summary-method {
		min-width: 56px;
		padding: 6px 8px;
		font-size: 12px;
	}

	.sd-playground .swagger-ui .view-line-link.copy-to-clipboard,
	.sd-playground .swagger-ui .authorization__btn,
	.sd-playground .swagger-ui .opblock-control-arrow {
		width: 24px !important;
		height: 24px !important;
	}

	.sd-playground .swagger-ui .opblock-summary-control {
		flex: 1;
		min-width: 0;
		overflow: hidden;
	}

	.sd-playground .swagger-ui .opblock-summary-path-description-wrapper {
		flex: 1;
		min-width: 0;
	}

	.sd-playground .swagger-ui .opblock-summary-path,
	.sd-playground .swagger-ui .opblock-summary-path abbr,
	.sd-playground .swagger-ui .opblock-summary-description {
		overflow-wrap: break-word;
		word-break: break-word;
		white-space: normal;
	}
}