/**
 * Admin styles for Advanced Testimonial.
 *
 * @package AdvancedTestimonial
 */

/* Meta box layout */
.at-meta-intro {
	margin: 4px 0 14px;
}

.at-meta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 28px;
}

.at-meta-row.at-meta-type-checkbox,
.at-meta-row.at-meta-type-media {
	grid-column: 1 / -1;
}

.at-meta-label {
	display: block;
	margin-bottom: 5px;
	font-weight: 600;
}

.at-meta-control input[type="text"],
.at-meta-control input[type="url"],
.at-meta-control input[type="email"],
.at-meta-control input[type="date"],
.at-meta-control select {
	width: 100%;
	max-width: 460px;
}

.at-meta-checkbox {
	font-weight: 400;
}

.at-media-preview {
	margin-bottom: 8px;
}

.at-media-preview-img {
	display: block;
	max-width: 120px;
	height: auto;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 4px;
	background: #fff;
}

.at-media-remove {
	color: #b32d2e;
}

@media screen and (max-width: 782px) {
	.at-meta-grid {
		grid-template-columns: 1fr;
	}
}

/* List table columns */
.column-at_photo {
	width: 64px;
}

.column-at_rating {
	width: 120px;
}

.at-col-photo {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	vertical-align: middle;
}

.at-col-photo--empty {
	display: inline-block;
	font-size: 26px;
	line-height: 40px;
	color: #c3c4c7;
}

.at-col-rating {
	color: #e2a200;
	letter-spacing: 2px;
	font-size: 14px;
}

/* Settings page */
.advanced-testimonial-settings .at-settings-panel {
	margin-top: 8px;
}

.advanced-testimonial-settings .at-color-field {
	width: 110px;
	vertical-align: middle;
}

.advanced-testimonial-settings .at-color-swatch {
	width: 34px;
	height: 30px;
	padding: 0;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	vertical-align: middle;
	cursor: pointer;
	background: none;
}

/* Demo Library */
.at-demo-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 20px;
	margin-top: 16px;
	max-width: 1120px;
}

.at-demo-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	overflow: hidden;
}

.at-demo-card__preview {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #eef2f6;
}

.at-demo-card__preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.at-demo-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	color: #fff;
}

.at-demo-badge--featured {
	background: #2563eb;
}

.at-demo-badge--new {
	background: #10b981;
}

.at-demo-card__body {
	flex: 1;
	padding: 14px 16px;
}

.at-demo-card__title {
	margin: 0 0 6px;
	font-size: 16px;
}

.at-demo-card__desc {
	margin: 0 0 8px;
	color: #50575e;
}

.at-demo-card__cat {
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #787c82;
}

.at-demo-card__actions {
	padding: 0 16px 16px;
}

.at-demo-card__requires {
	margin: 6px 0 0;
	font-size: 12px;
	color: #b32d2e;
}

/* Click-to-copy shortcode */
.at-copy {
	cursor: pointer;
}

code.at-copy {
	display: inline-block;
	padding: 2px 7px;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	font-size: 12px;
	white-space: nowrap;
}

code.at-copy:hover {
	background: #e8e8ea;
}

.at-copy.is-copied {
	color: #008a20;
}

.column-at_shortcode {
	width: 290px;
}

/* Balanced Groups columns: equal Count + Slug, slightly tighter Name. */
.taxonomy-testimonial_group .column-name {
	width: 180px;
}

.taxonomy-testimonial_group .column-posts,
.taxonomy-testimonial_group .column-slug {
	width: 88px;
}

/* Match the Shortcode and Description column widths. */
.taxonomy-testimonial_group .column-at_shortcode,
.taxonomy-testimonial_group .column-description {
	width: 290px;
}

/* Tools tab */
.at-tools {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 16px;
	max-width: 920px;
}

.at-tools-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 14px 20px 18px;
}

.at-tools-card h3 {
	margin-top: 6px;
}

.at-tools-card--wide {
	grid-column: 1 / -1;
}

@media screen and (max-width: 782px) {
	.at-tools {
		grid-template-columns: 1fr;
	}
}
