/**
 * Kiyoh Reviews Admin Styles
 */

/* Settings form container */
.kiyoh-settings-wrap form {
	max-width: 800px;
}

/* Section containers */
.kiyoh-settings-section {
	background: #fff;
	border: 1px solid #c3c4c7;
	margin-bottom: 16px;
	padding: 0;
}

/* Section titles inside containers */
.kiyoh-settings-section > h2 {
	margin: 0;
	padding: 12px 20px;
	font-size: 14px;
	border-bottom: 1px solid #c3c4c7;
}

/* Section descriptions inside containers */
.kiyoh-settings-section > div[id$="-description"] {
	padding: 0 20px;
	color: #646970;
}

.kiyoh-settings-section > div[id$="-description"] p {
	margin: 12px 0;
}

/* Section tables inside containers */
.kiyoh-settings-section > table.form-table {
	margin: 0;
}

.kiyoh-settings-section > table.form-table th {
	padding: 15px 10px 15px 20px;
	vertical-align: middle;
}

.kiyoh-settings-section > table.form-table td {
	padding: 15px 10px;
}

/* Manual section content (sync, etc.) */
.kiyoh-settings-section--sync h2 {
	margin: 0;
}

.kiyoh-settings-section--sync .form-table th {
	padding: 15px 10px 15px 20px;
}

/* Sync button spinner */
#sync_products .spinner {
	display: none;
	float: none;
	margin: 0;
}

#sync_products .spinner.is-active {
	display: inline-block;
}

.sync-result {
	margin-left: 8px;
}

.sync-result .dashicons {
	vertical-align: middle;
}

/* Disabled sections (WooCommerce required) */
.kiyoh-settings-section--disabled {
	opacity: 0.6;
}

.kiyoh-settings-section--disabled .form-table input,
.kiyoh-settings-section--disabled .form-table select {
	pointer-events: none;
}

.kiyoh-wc-notice {
	padding: 0 20px;
	color: #d63638;
	font-style: italic;
}

.kiyoh-wc-notice p {
	margin: 8px 0 4px;
}

.kiyoh-field-disabled {
	opacity: 0.5;
}

/* A single Gold field in a free section: dim the field, not the notice. */
.kiyoh-field-locked th,
.kiyoh-field-locked label {
	opacity: 0.5;
}

.kiyoh-premium-notice {
	margin: 4px 0 0;
	color: #d63638;
	font-style: italic;
}

/* Upgrade button next to the page title */
.wrap .page-title-action.kiyoh-upgrade-button,
.wrap .page-title-action.kiyoh-upgrade-button:hover,
.wrap .page-title-action.kiyoh-upgrade-button:focus {
	background: #dba617;
	border-color: #bd8600;
	color: #1d2327;
	font-weight: 600;
}

.wrap .page-title-action.kiyoh-upgrade-button:hover,
.wrap .page-title-action.kiyoh-upgrade-button:focus {
	background: #f0b849;
}

/* Section descriptions */
.kiyoh-section-description {
	padding: 0 20px;
	color: #646970;
}

.kiyoh-section-description p {
	margin: 12px 0;
}

/* Shortcode builder */
.kiyoh-shortcode-builder {
	margin: 0 0 14px;
	max-width: 520px;
}

.kiyoh-shortcode-builder__row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 7px 0;
	border-bottom: 1px solid #f0f0f1;
}

.kiyoh-shortcode-builder__row:last-child {
	border-bottom: none;
}

.kiyoh-shortcode-builder__label {
	flex: 0 0 150px;
	padding-top: 4px;
	font-weight: 600;
}

.kiyoh-shortcode-builder__control {
	flex: 1 1 auto;
	min-width: 0;
}

.kiyoh-shortcode-builder__control input[type="text"],
.kiyoh-shortcode-builder__control select {
	max-width: 100%;
}

.kiyoh-shortcode-builder__control .description {
	margin: 3px 0 0;
}

/* The colour picker sits in a row of its own, so its popup has room */
.kiyoh-shortcode-builder__control .wp-picker-container {
	display: block;
}

.kiyoh-shortcode-builder__control .wp-picker-container .wp-color-result.button {
	margin-bottom: 0;
}

.kiyoh-shortcode-builder__control .wp-picker-holder {
	position: relative;
	z-index: 2;
}

.kiyoh-shortcode-tool .kiyoh-shortcode-copy__input {
	min-width: 340px;
	font-weight: 600;
}

.kiyoh-shortcode-reference {
	margin-top: 4px;
}

.kiyoh-shortcode-reference summary {
	cursor: pointer;
	color: #2271b1;
}

.kiyoh-shortcode-reference[open] summary {
	margin-bottom: 8px;
}

/* Shortcode documentation */
.kiyoh-shortcode-copy {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	max-width: 100%;
}

.kiyoh-shortcode-copy__input {
	min-width: 240px;
	background: #f6f7f7;
}

.kiyoh-info-field {
	margin-top: 4px;
}

.kiyoh-shortcode-table {
	border-collapse: collapse;
	margin: 4px 0 12px;
	width: 100%;
}

.kiyoh-shortcode-table th,
.kiyoh-shortcode-table td {
	border-bottom: 1px solid #dcdcde;
	padding: 6px 10px 6px 0;
	text-align: left;
	vertical-align: top;
	font-weight: 400;
}

.kiyoh-shortcode-table thead th {
	font-weight: 600;
	color: #1d2327;
}

.kiyoh-shortcode-table code {
	white-space: nowrap;
}

.kiyoh-shortcode-examples {
	margin: 4px 0 0;
}

.kiyoh-shortcode-examples li {
	margin: 0 0 4px;
}

@media screen and (max-width: 782px) {
	.kiyoh-shortcode-builder__row {
		display: block;
	}

	.kiyoh-shortcode-builder__label {
		display: block;
		padding: 0 0 4px;
	}

	.kiyoh-shortcode-copy {
		display: flex;
		flex-wrap: wrap;
	}

	.kiyoh-shortcode-tool .kiyoh-shortcode-copy__input {
		min-width: 0;
		flex: 1 1 100%;
	}
}

/* Tabs */
.kiyoh-settings-tabs {
	margin-bottom: 16px;
}

.kiyoh-gold-intro {
	max-width: 760px;
	margin: 0 0 16px;
}

.kiyoh-gold-intro p {
	font-size: 14px;
}
