/* ── Table configuration ── */
#stptable-form-table {
	width: 100%;
	margin-top: 0.5em;
	overflow: visible;
}

#stptable-form-table td {
	border: 4px solid #ddd;
}

#stptable-form-table td .td_full_input {
	width: 100%;
	box-sizing: border-box;
	border: 0;
}

#stptable-form-table th {
	position: relative;
	overflow: visible;
	padding: 10px 12px;
	text-align: left;
	background-color: #04AA6D;
	color: #fff;
	border: 4px solid #ddd;
}

/* ── Buttons ── */
.sptable_button {
	border: none;
	color: #fff;
	padding: 12px 24px;
	text-align: center;
	display: inline-block;
	font-size: 14px;
	margin: 4px 2px;
	cursor: pointer;
	border-radius: 3px;
	transition: box-shadow 0.2s;
}

.sptable_btn_delete {
	background-color: #c15859;
}

.sptable_btn_add {
	background-color: #4CAF50;
}

.sptable_btn_add:hover,
.sptable_btn_delete:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ── Tooltips ── */
.sptable-tip {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	margin-left: 5px;
	cursor: help;
	color: rgba(255, 255, 255, 0.85);
}

/* Tooltip icon outside green headers */
.sptable-tip--dark {
	color: #72aee6;
}

.sptable-tip .dashicons {
	font-size: 15px;
	width: 15px;
	height: 15px;
	line-height: 1.1;
}

.sptable-tip__bubble {
	display: none;
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background: #1d2327;
	color: #fff;
	padding: 7px 11px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: normal;
	line-height: 1.5;
	max-width: 220px;
	width: max-content;
	white-space: normal;
	text-align: left;
	z-index: 99999;
	pointer-events: none;
}

.sptable-tip__bubble::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border: 5px solid transparent;
	border-top-color: #1d2327;
}

/* Align right for last column to avoid viewport overflow */
#stptable-form-table th:last-child .sptable-tip__bubble {
	left: auto;
	right: 0;
	transform: none;
}

#stptable-form-table th:last-child .sptable-tip__bubble::after {
	left: auto;
	right: 12px;
	transform: none;
}

.sptable-tip:hover .sptable-tip__bubble {
	display: block;
}

/* Center the select / delete checkbox column in the column builder. */
#stptable-form-table th:first-child,
#stptable-form-table td:first-child {
	text-align: center;
	vertical-align: middle;
}

.sptable-copy-shortcode {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 4px 10px;
	line-height: 1.6;
	transition: background 0.15s ease, border-color 0.15s ease;
	/* Click copies, but the text stays selectable for manual copy too. */
	-webkit-user-select: text;
	-moz-user-select: text;
	user-select: text;
}

.sptable-copy-shortcode:hover {
	background: #f0f0f1;
	border-color: #c3c4c7;
}

.sptable-copy-shortcode code {
	background: none;
	padding: 0;
	font-size: 13px;
	color: #1d2327;
	-webkit-user-select: text;
	-moz-user-select: text;
	user-select: text;
}

.sptable-copy-shortcode .dashicons-clipboard {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #787c82;
}

.sptable-copy-shortcode .sptable-copied {
	display: none;
	color: #00a32a;
	font-size: 12px;
	font-weight: 600;
}

.sptable-copy-shortcode.is-copied .dashicons-clipboard {
	display: none;
}

.sptable-copy-shortcode.is-copied .sptable-copied {
	display: inline;
}
