/**
 * Admin Settings Page Styles
 *
 * @package Gatewell
 * @subpackage Admin/CSS
 * @since 1.0.0
 */

/* ===========================
   Admin Wrap Container
   =========================== */
.gatewell-admin-wrap {
	max-width: 1200px;
	margin: 20px 0;
}

.gatewell-admin-wrap h3 {
	margin-top: 0;
	color: #2271b1;
	border-bottom: 2px solid #2271b1;
	padding-bottom: 10px;
}

.gatewell-admin-header {
	margin-bottom: 20px;
	padding: 15px;
	background: #fff;
	border-left: 4px solid #2271b1;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.gatewell-admin-header .description {
	margin: 0;
	font-size: 14px;
	color: #646970;
}

/* ===========================
   Tab Navigation
   =========================== */
.gatewell-nav-tabs {
	margin-bottom: 0;
	border-bottom: 1px solid #c3c4c7;
}

.gatewell-nav-tabs .nav-tab {
	position: relative;
	margin-bottom: -1px;
	padding: 10px 15px;
	font-size: 14px;
	font-weight: 600;
	color: #50575e;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-bottom: none;
	text-decoration: none;
	transition: all 0.2s ease;
}

.gatewell-nav-tabs .nav-tab:hover {
	background: #fff;
	color: #2271b1;
}

.gatewell-nav-tabs .nav-tab-active,
.gatewell-nav-tabs .nav-tab-active:hover {
	background: #fff;
	color: #1d2327;
	border-bottom: 1px solid #fff;
}

/* ===========================
   Tab Content
   =========================== */
.gatewell-tab-content {
	display: none;
	padding: 20px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-top: none;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.gatewell-tab-content.gatewell-tab-active {
	display: block;
}

.gatewell-tab-content h2 {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #e0e0e0;
	font-size: 20px;
	font-weight: 600;
}

/* ===========================
   Form Tables
   =========================== */
.gatewell-settings-form .form-table {
	margin-top: 20px;
}

.gatewell-settings-form .form-table th {
	width: 220px;
	padding: 20px 10px 20px 0;
	font-weight: 600;
	vertical-align: top;
}

.gatewell-settings-form .form-table td {
	padding: 15px 10px;
}

.gatewell-settings-form .form-table td .description {
	margin-top: 5px;
	font-size: 13px;
	color: #646970;
}

.gatewell-settings-form .form-table td em {
	color: #2271b1;
	font-style: italic;
}

/* ===========================
   Form Elements
   =========================== */
.gatewell-settings-form input[type="text"],
.gatewell-settings-form input[type="number"],
.gatewell-settings-form input[type="email"],
.gatewell-settings-form textarea,
.gatewell-settings-form select {
	width: 100%;
	max-width: 400px;
}

.gatewell-settings-form input[type="checkbox"],
.gatewell-settings-form input[type="radio"] {
	margin-right: 8px;
}

.gatewell-settings-form fieldset {
	margin: 0;
	padding: 0;
	border: none;
}

.gatewell-settings-form fieldset label {
	display: block;
	margin-bottom: 10px;
}

/* ===========================
   Submit Button
   =========================== */
.gatewell-settings-form .submit {
	padding: 20px 0 0;
	margin: 0;
	border-top: 1px solid #e0e0e0;
}

/* ===========================
   Field Configuration Table
   =========================== */
.gatewell-field-config-table {
	margin-top: 15px;
	max-width: 600px;
}

.gatewell-field-config-table th {
	font-weight: 600;
	padding: 10px;
	background: #f0f0f1;
}

.gatewell-field-config-table td {
	padding: 12px 10px;
	vertical-align: middle;
}

.gatewell-field-config-table tbody tr:nth-child(even) {
	background: #f9f9f9;
}

.gatewell-field-config-table label {
	margin: 0;
	font-weight: normal;
}

.gatewell-field-config-table .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	vertical-align: middle;
}

/* ===========================
   Compression Quality Slider
   =========================== */
.gatewell-compression-control {
	display: flex;
	align-items: center;
	gap: 15px;
	margin-bottom: 10px;
}

.gatewell-quality-slider {
	flex: 1;
	max-width: 400px;
	height: 24px;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	outline: none;
	cursor: pointer;
}

.gatewell-quality-slider::-webkit-slider-runnable-track {
	height: 8px;
	background: #ddd;
	border-radius: 5px;
}

.gatewell-quality-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	background: #2271b1;
	border-radius: 50%;
	cursor: pointer;
	margin-top: -6px;
	transition: background 0.2s ease;
}

.gatewell-quality-slider::-webkit-slider-thumb:hover {
	background: #135e96;
}

.gatewell-quality-slider::-moz-range-track {
	height: 8px;
	background: #ddd;
	border-radius: 5px;
}

.gatewell-quality-slider::-moz-range-thumb {
	width: 20px;
	height: 20px;
	background: #2271b1;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	transition: background 0.2s ease;
}

.gatewell-quality-slider::-moz-range-thumb:hover {
	background: #135e96;
}

.gatewell-quality-value {
	min-width: 50px;
	font-weight: 600;
	font-size: 16px;
	color: #2271b1;
}

/* ===========================
   Compression Preview
   =========================== */
.gatewell-compression-preview {
	padding: 20px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.gatewell-compression-preview h4 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

/* ===========================
   Image Comparison Slider
   =========================== */
.gatewell-comparison-slider-container {
	position: relative;
	width: 100%;
	max-width: 600px;
	height: 400px;
	margin: 15px 0;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

.gatewell-comparison-img {
	position: absolute;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

.gatewell-comparison-img canvas {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: #f0f0f0;
	margin: 0;
	padding: 0;
	object-fit: cover;
	object-position: left;
}

.gatewell-comparison-img:first-child canvas {
	border: 1px solid #ddd;
}

.gatewell-comparison-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 300px;
	height: 100%;
	overflow: hidden;
	border-right: 1px solid #fff;
}

/* Comparison slider handle */
.gatewell-comparison-handle {
	position: absolute;
	z-index: 9;
	cursor: ew-resize;
	width: 40px;
	height: 40px;
	background-color: #2271b1;
	opacity: 0.7;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	transition: opacity 0.2s ease;
}

.gatewell-comparison-handle:hover {
	opacity: 1;
	background: #135e96;
}

.gatewell-handle-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	pointer-events: none;
}

.gatewell-handle-icon.gatewell-handle-left {
	position: absolute;
	right: 100%;
	padding-right: 8px;
}

.gatewell-handle-icon.gatewell-handle-right {
	position: absolute;
	left: 100%;
	padding-left: 8px;
}

/* ===========================
   Comparison Info
   =========================== */
.gatewell-comparison-info {
	display: flex !important;
	gap: 20px !important;
	flex-wrap: wrap !important;
	padding: 15px !important;
	background: #f0f0f0 !important;
	border: 1px solid #ddd !important;
	border-top: none !important;
	border-radius: 0 0 4px 4px !important;
	margin-bottom: 0 !important;
	margin-top: -1px !important;
}

.gatewell-info-item {
	display: flex !important;
	flex-direction: column !important;
	gap: 5px !important;
}

.gatewell-info-item strong {
	font-size: 12px !important;
	color: #646970 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	font-weight: 600 !important;
}

.gatewell-file-size {
	margin: 0 !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: #2271b1 !important;
}

.gatewell-reduction {
	margin: 0 !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	color: #00a32a !important;
}

/* ===========================
   Preview Controls
   =========================== */
.gatewell-preview-controls {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.gatewell-preview-controls .button {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.gatewell-preview-controls .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.gatewell-current-image-label {
	font-size: 13px;
	color: #646970;
	font-style: italic;
	margin-left: 10px;
}

/* ===========================
   Storage Options
   =========================== */
#gatewell-email-addresses-field {
	padding: 15px;
	background: #f0f6fc;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}

#gatewell-email-addresses-field label {
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
}

/* ===========================
   Admin Footer
   =========================== */
.gatewell-admin-footer {
	margin-top: 30px;
	padding-top: 20px;
}

.gatewell-admin-footer .description {
	color: #8c8f94;
	font-size: 12px;
}

/* ===========================
   Metadata Scanner Styles
   =========================== */
.gatewell-scanner-options {
	background: #fff;
	border: 1px solid #ccd0d4;
	padding: 20px;
	margin: 20px 0;
	border-radius: 4px;
}

.gatewell-scanner-options h3 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

.gatewell-scanner-options .form-table {
	margin-bottom: 20px;
}

.gatewell-scanner-options fieldset label {
	display: block;
	margin-bottom: 8px;
	font-weight: normal;
}

#gatewell-scanner-summary {
	background: #f0f6fc;
	border-left: 4px solid #2271b1;
	padding: 12px 20px;
	margin: 20px 0;
	border-radius: 2px;
}

#gatewell-scanner-summary p {
	margin: 0;
	color: #1d2327;
}

#gatewell-scanner-results {
	margin-top: 20px;
}

#gatewell-scanner-results h3 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

#gatewell-results-table {
	margin-bottom: 20px;
}

#gatewell-results-table input[type="text"],
#gatewell-results-table textarea {
	width: 100%;
	max-width: 400px;
}

#gatewell-results-table textarea {
	min-height: 60px;
	padding: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 13px;
}

#gatewell-results-table input[type="text"] {
	padding: 6px;
	font-size: 13px;
}

#gatewell-results-table td {
	vertical-align: top;
	padding: 12px 8px;
}

#gatewell-results-table img {
	border: 1px solid #ddd;
	border-radius: 3px;
	display: block;
}

.gatewell-result-row small {
	display: block;
	word-break: break-word;
}

.gatewell-char-counter {
	font-size: 12px;
	margin-top: 4px;
	color: #d63638;
}

.gatewell-char-counter.valid {
	color: #46b450;
	font-weight: bold;
}

.gatewell-char-counter.invalid {
	color: #d63638;
}

#gatewell-scanner-pagination {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

#gatewell-scanner-pagination button {
	margin: 0;
}

#gatewell-scanner-pagination span {
	white-space: nowrap;
}

#gatewell-scanner-empty {
	margin: 20px 0;
}

#gatewell-scanner-loading {
	padding: 20px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin: 20px 0;
}

/* ===========================
   Format Support Warnings
   =========================== */
.format-unsupported {
	display: inline-block;
	padding: 2px 8px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 3px;
	font-size: 0.85em;
	font-weight: 600;
	color: #856404;
	white-space: nowrap;
}

.format-unsupported::before {
	content: "⚠️ ";
	margin-right: 3px;
}

/* Format support notice boxes */
.notice.notice-info.inline ul {
	list-style: disc;
	margin-left: 20px;
}

.notice.notice-info.inline ul li {
	margin-bottom: 5px;
}

.notice.notice-info.inline .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-right: 5px;
}

/* ===========================
   Plugin Cooperation Mode
   =========================== */
.gatewell-cooperation-notice {
	padding: 15px !important;
	margin-top: 20px !important;
	margin-bottom: 20px !important;
}

.gatewell-cooperation-notice .dashicons-admin-plugins {
	font-size: 18px;
	width: 18px;
	height: 18px;
	vertical-align: middle;
	margin-right: 5px;
}

.gatewell-cooperation-notice .notice.inline {
	margin: 10px 0;
	padding: 8px 12px;
}

.gatewell-cooperation-notice label {
	cursor: pointer;
	padding: 8px 0;
}

.gatewell-cooperation-notice label:hover {
	background: rgba(34, 113, 177, 0.03);
	margin-left: -5px;
	padding-left: 5px;
	border-radius: 3px;
}

.gatewell-cooperation-notice input[type="radio"] {
	margin-right: 8px;
	cursor: pointer;
}

.gatewell-cooperation-notice .dashicons-yes {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-left: 5px;
}


/* ===========================
   Dashboard Tab Styles
   =========================== */
.gatewell-dashboard-intro {
	margin-bottom: 30px;
	padding: 20px;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	border-radius: 6px;
	border-left: 4px solid #2271b1;
}

.gatewell-dashboard-tagline {
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 15px 0;
}

.gatewell-dashboard-description {
	color: #444;
	line-height: 1.6;
}

.gatewell-dashboard-description h3 {
	margin: 0 0 12px 0;
	font-size: 16px;
	color: #1d2327;
}

.gatewell-dashboard-description ul {
	margin: 0;
	padding-left: 20px;
	list-style: disc;
}

.gatewell-dashboard-description li {
	margin-bottom: 8px;
}

/* Dashboard Cards Grid */
.gatewell-dashboard-cards {
	margin-top: 30px;
}

.gatewell-dashboard-cards h3 {
	margin: 0 0 20px 0;
	font-size: 18px;
	color: #1d2327;
	font-weight: 600;
}

.gatewell-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	margin-bottom: 20px;
}

.gatewell-dashboard-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	padding: 20px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.gatewell-dashboard-card:hover {
	box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
	border-color: #2271b1;
}

.gatewell-card-icon {
	font-size: 40px;
	color: #2271b1;
	margin-bottom: 15px;
	line-height: 1;
}

.gatewell-card-icon .dashicons {
	font-size: 40px;
	width: 40px;
	height: 40px;
}

.gatewell-dashboard-card h4 {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

.gatewell-dashboard-card p {
	margin: 0 0 15px 0;
	color: #646970;
	font-size: 14px;
	flex-grow: 1;
	line-height: 1.5;
}

.gatewell-dashboard-card .button {
	align-self: flex-start;
	margin-top: auto;
}

/* Highlight Getting Started Card */
.gatewell-card-highlight {
	background: linear-gradient(135deg, #fef5e7 0%, #fde5d8 100%);
	border-color: #f0b849;
}

.gatewell-card-highlight .gatewell-card-icon {
	color: #f0b849;
}

.gatewell-card-highlight h4 {
	color: #d68910;
}

/* Tab Link Button */
.gatewell-tab-link {
	cursor: pointer;
	white-space: nowrap;
}

.gatewell-tab-link:hover {
	text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.gatewell-card-grid {
		grid-template-columns: 1fr;
	}

	.gatewell-dashboard-intro {
		padding: 15px;
	}

	.gatewell-dashboard-description {
		font-size: 13px;
	}
}

