/* Saved Template editor sidebar — the shortcode chip above the document panels. */
.interface-complementary-area__fill:has(.sptp-shortcode-portal) {
	display: flex;
	flex-direction: column;
}

.sptp-shortcode-portal {
	// WP 7.2's sidebar sizes to its content — pin to the core 280px so a long shortcode can't widen it.
	width: 280px;
	max-width: 100%;
	box-sizing: border-box;
	background: #fff;
	border-bottom: 1px solid #ccc;
	flex-shrink: 0;
}

.sptp-shortcode-panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;

	&__intro {
		margin: 0;
		font-size: 13px;
		line-height: 20px;
		color: #3d434b;
	}

	&__link {
		color: #2b5f47;
		font-weight: 500;
		text-decoration: underline;

		&:hover,
		&:focus {
			color: #20432f;
			border: none;
			box-shadow: none;
		}
	}

	&__chip {
		display: flex;
		align-items: center;
		gap: 8px;
		width: 100%;
		padding: 8px 16px;
		background: #faf9f9;
		border: 1px solid #d5d5d5;
		border-radius: 2px;
		color: #3d434b;
		font-size: 14px;
		line-height: 20px;
		text-align: left;
		cursor: pointer;
		box-shadow: none;
		transition: all 0.3s ease-in-out;

		&:hover,
		&:focus {
			background: #ececec;
			outline: none;
		}
	}

	&__code {
		// A flex item's min-width:auto would keep the full text width and skip the ellipsis.
		min-width: 0;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	// The slot fits the icon, and grows to fit "Copied!" while the code
	// gives up the room (its ellipsis), so the label stays inside the chip.
	&__copy {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
		min-width: 18px;
		height: 18px;
		margin-left: auto;
		color: #3d434b;

		&-text {
			white-space: nowrap;
			color: #317d46;
		}
	}
}
