/**
 * Trustie - Admin Styles
 *
 * @package Trustie
 * @since 1.0.0
 */

/* ==========================================================================
   Designer Page Layout
   ========================================================================== */

.trustie-designer {
	max-width: 1200px;
}

.trustie-designer h1 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 24px;
	font-weight: 600;
}

.trustie-designer .trustie-icon {
	color: #f59e0b;
	font-size: 28px;
}

.trustie-subtitle {
	color: #6b7280;
	margin: 5px 0 25px;
}

.trustie-designer-layout {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 24px;
	align-items: start;
}

@media (max-width: 1024px) {
	.trustie-designer-layout {
		grid-template-columns: 1fr;
	}
}

.trustie-designer-settings {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.trustie-designer-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* Cards */
.trustie-designer .trustie-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 24px;
}

.trustie-designer .trustie-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.trustie-designer .trustie-card-header h2 {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	padding: 0;
	border: none;
}

.trustie-designer .trustie-card-header h2 .dashicons {
	color: #6b7280;
}

.trustie-designer .trustie-card h3 {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 15px;
	padding: 0 0 12px;
	border-bottom: 1px solid #e5e7eb;
}

.trustie-designer .trustie-card > .description {
	color: #6b7280;
	margin: 0 0 20px;
}

/* Colour Grid */
.trustie-color-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.color-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.color-field label {
	font-weight: 500;
	font-size: 13px;
	color: #374151;
}

.color-field input[type="color"] {
	width: 100%;
	height: 40px;
	padding: 2px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	cursor: pointer;
}

.color-field .color-value {
	width: 100%;
	padding: 6px 10px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-family: monospace;
	font-size: 13px;
}

.color-field .color-hint {
	font-size: 12px;
	color: #9ca3af;
	margin: 0;
}

/* Preview Box */
.trustie-preview-box {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 16px;
	margin-top: 20px;
}

.trustie-preview-box h4 {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #6b7280;
	margin: 0 0 12px;
}

.rating-preview {
	display: flex;
	align-items: center;
	gap: 8px;
}

.rating-preview .stars {
	font-size: 20px;
	line-height: 1;
}

.rating-preview .count {
	font-size: 14px;
	color: #6b7280;
}

/* Card Preview */
.card-preview-wrapper {
	max-width: 300px;
}

.card-preview {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 16px;
	transition: transform 0.2s, box-shadow 0.2s;
}

.card-preview.has-shadow {
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.card-preview.has-hover:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}

.card-preview .card-stars {
	font-size: 16px;
	margin-bottom: 8px;
}

.card-preview .card-content {
	font-size: 14px;
	color: #374151;
	line-height: 1.5;
	margin-bottom: 8px;
}

.card-preview .card-author {
	font-size: 13px;
	color: #6b7280;
}

/* Form Table in Designer */
.trustie-form-table {
	margin: 0;
}

.trustie-form-table th {
	width: 180px;
	padding: 12px 10px 12px 0;
	font-weight: 500;
}

.trustie-form-table td {
	padding: 12px 0;
}

.trustie-form-table .description {
	margin-top: 6px;
}

/* Save Bar */
.trustie-save-bar {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 20px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	position: sticky;
	bottom: 20px;
	box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

.trustie-save-bar .button-hero {
	display: flex;
	align-items: center;
	gap: 8px;
}

.trustie-save-bar .save-status {
	font-size: 14px;
	color: #6b7280;
}

.trustie-save-bar .save-status.saved {
	color: #10b981;
}

.trustie-save-bar .save-status.error {
	color: #ef4444;
}

/* Sidebar Shortcode List */
.trustie-designer-sidebar .shortcode-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.trustie-designer-sidebar .shortcode-list li {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f3f4f6;
}

.trustie-designer-sidebar .shortcode-list li:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.trustie-designer-sidebar .shortcode-list code {
	display: block;
	background: #f3f4f6;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 12px;
	margin-bottom: 4px;
}

.trustie-designer-sidebar .shortcode-list span {
	font-size: 13px;
	color: #6b7280;
}

/* Upgrade Card */
.trustie-designer .trustie-card--highlight {
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border-color: #fbbf24;
}

.trustie-designer .trustie-card--highlight ul {
	margin: 10px 0 15px;
	padding-left: 18px;
}

.trustie-designer .trustie-card--highlight li {
	margin-bottom: 6px;
	color: #78350f;
}

.trustie-designer .trustie-card--highlight .button-primary {
	width: 100%;
	text-align: center;
	background: #f59e0b;
	border-color: #d97706;
}

.trustie-designer .trustie-card--highlight .button-primary:hover {
	background: #d97706;
	border-color: #b45309;
}

/* ==========================================================================
   Legacy Settings Page (for tabs that still use it)
   ========================================================================== */

/* Settings page layout */
.trustie-settings {
	max-width: 1200px;
}

.trustie-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 20px 25px;
	margin: 20px 0 0 0;
	border-radius: 8px 8px 0 0;
	color: #fff;
}

/* Tabs — uses shared .tracksies-tabs from components.css */

.trustie-logo {
	display: flex;
	align-items: center;
	gap: 12px;
}

.trustie-logo .star {
	font-size: 32px;
	color: #FFB800;
	text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.trustie-logo .title {
	font-size: 24px;
	font-weight: 600;
}

/* Content layout */
.trustie-content {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 24px;
}

@media (max-width: 1024px) {
	.trustie-content {
		grid-template-columns: 1fr;
	}
}

.trustie-main {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 24px;
}

.trustie-main h2 {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.trustie-main h2:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

/* Form styles */
.trustie-main .form-table th {
	width: 180px;
	padding: 15px 10px 15px 0;
}

.trustie-main .form-table td {
	padding: 12px 10px;
}

/* Preview section */
.trustie-preview {
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.preview-box {
	background: #f9f9f9;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 24px;
	text-align: center;
}

.preview-stars {
	line-height: 1;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.preview-count {
	font-size: 14px;
	color: #666;
	margin-left: 6px;
}

.preview-label {
	margin-top: 12px;
	color: #666;
	font-style: italic;
}

/* Sidebar */
.trustie-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.trustie-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
}

.trustie-card h3 {
	margin: 0 0 15px 0;
	padding: 0 0 12px 0;
	border-bottom: 1px solid #eee;
	font-size: 15px;
}

.trustie-card--highlight {
	background: linear-gradient(135deg, #f8f9ff 0%, #fff5f8 100%);
	border-color: #d0d5ff;
}

/* Shortcode list */
.shortcode-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.shortcode-list li {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f0f0f0;
}

.shortcode-list li:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.shortcode-list code {
	display: inline-block;
	background: #f0f0f0;
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	margin-bottom: 4px;
}

.shortcode-list small {
	display: block;
	color: #666;
	line-height: 1.4;
}

/* Upgrade card */
.trustie-card--highlight ul {
	margin: 12px 0;
	padding-left: 20px;
}

.trustie-card--highlight li {
	margin-bottom: 6px;
	color: #444;
}

.trustie-card--highlight .button-primary {
	width: 100%;
	text-align: center;
	margin-top: 8px;
	background: #667eea;
	border-color: #5569d4;
}

.trustie-card--highlight .button-primary:hover {
	background: #5569d4;
	border-color: #4458c3;
}

/* Color picker adjustments */
.wp-picker-container {
	display: inline-block;
}

.wp-picker-container .wp-color-result.button {
	margin: 0;
}

/* ==========================================================================
   Reviews Admin List
   ========================================================================== */

.trustie-reviews-admin .subsubsub {
	margin: 15px 0;
}

.trustie-reviews-table {
	margin-top: 10px;
}

.trustie-reviews-table .column-rating {
	width: 100px;
}

.trustie-reviews-table .column-product {
	width: 180px;
}

.trustie-reviews-table .column-date {
	width: 120px;
}

.trustie-reviews-table .column-status {
	width: 100px;
}

.trustie-reviews-table .column-actions {
	width: 160px;
}

.trustie-reviews-table .review-stars {
	display: inline-flex;
	font-size: 16px;
}

.trustie-reviews-table .review-stars .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
}

.trustie-reviews-table .review-author {
	margin-bottom: 6px;
}

.trustie-reviews-table .verified-badge {
	display: inline-block;
	background: #00a32a;
	color: #fff;
	font-size: 10px;
	padding: 2px 5px;
	border-radius: 3px;
	margin-left: 6px;
	vertical-align: middle;
}

.trustie-reviews-table .review-content {
	color: #50575e;
	font-size: 13px;
	line-height: 1.5;
}

.trustie-reviews-table .status-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 500;
}

.trustie-reviews-table .status-badge.status-approved {
	background: #d7f5dd;
	color: #00a32a;
}

.trustie-reviews-table .status-badge.status-pending {
	background: #fff3cd;
	color: #856404;
}

.trustie-reviews-table .status-badge.status-rejected {
	background: #f8d7da;
	color: #721c24;
}

.trustie-reviews-table .review-row.status-pending {
	background-color: #fffbeb;
}

.trustie-reviews-table .review-row.status-rejected {
	background-color: #fef2f2;
}

.trustie-reviews-table .column-actions .button {
	margin-right: 5px;
}
