/**
 * Admin styles for SnapSettings for WooCommerce.
 *
 * @package PDSW
 */

/* ============================================================
   Plugin Header
   ============================================================ */

.pdsw-plugin-header {
	margin-bottom: 20px;
}

.pdsw-plugin-header h2 {
	margin: 0 0 4px;
	padding: 0;
	font-size: 23px;
	font-weight: 400;
	color: #1d2327;
	line-height: 1.3;
}

.pdsw-header-tagline {
	margin: 4px 0 0;
	font-size: 13px;
	color: #646970;
	line-height: 1.4;
}

/* ============================================================
   Two-column flex layout
   ============================================================ */

.pdsw-admin-container {
	display: flex;
	gap: 20px;
	align-items: flex-start;
}

.pdsw-main-column {
	flex: 1;
	min-width: 0;
}

.pdsw-sidebar-column {
	flex: 0 0 260px;
	width: 260px;
}

/* ============================================================
   Modernised postbox cards
   ============================================================ */

.pdsw-main-column .postbox,
.pdsw-sidebar-column .postbox,
.pdsw-log-postbox {
	overflow: hidden;
	margin-bottom: 20px;
}

.pdsw-main-column .postbox .postbox-header,
.pdsw-sidebar-column .postbox .postbox-header,
.pdsw-log-postbox .postbox-header {
	background: #fafafa;
	border-bottom: 1px solid #e2e4e7;
	padding: 13px 18px !important;
	border-radius: 0 !important;
}

.pdsw-main-column .postbox .postbox-header h2,
.pdsw-sidebar-column .postbox .postbox-header h2,
.pdsw-log-postbox .postbox-header h2 {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	margin: 0 !important;
	padding: 0 !important;
	color: #1d2327 !important;
}

.pdsw-main-column .postbox .postbox-header h2 .dashicons,
.pdsw-sidebar-column .postbox .postbox-header h2 .dashicons,
.pdsw-log-postbox .postbox-header h2 .dashicons {
	font-size: 18px !important;
	width: 18px !important;
	height: 18px !important;
	flex-shrink: 0;
}

.pdsw-main-column .postbox .inside,
.pdsw-sidebar-column .postbox .inside,
.pdsw-log-postbox .inside {
	padding: 18px 20px !important;
	margin: 0 !important;
}

/* Export card — blue left accent */
.pdsw-export-card .postbox-header {
	border-left: 4px solid #2271b1;
}

.pdsw-export-card .postbox-header h2 .dashicons {
	color: #2271b1;
}

/* Import card — amber/orange left accent */
.pdsw-import-card .postbox-header {
	border-left: 4px solid #d97706;
}

.pdsw-import-card .postbox-header h2 .dashicons {
	color: #d97706;
}

/* Log card — teal left accent */
.pdsw-log-postbox .postbox-header {
	border-left: 4px solid #00a32a;
}

.pdsw-log-postbox .postbox-header h2 .dashicons {
	color: #00a32a;
}

/* Help card */
.pdsw-help-card .postbox-header {
	border-left: 4px solid #1d2327;
}

.pdsw-help-card .postbox-header h2 .dashicons {
	color: #1d2327;
}

/* About card */
.pdsw-about-card .postbox-header {
	border-left: 4px solid #8c8f94;
}

.pdsw-about-card .postbox-header h2 .dashicons {
	color: #8c8f94;
}

/* ============================================================
   Export feature list
   ============================================================ */

.pdsw-feature-list {
	list-style: none !important;
	margin: 12px 0 18px !important;
	padding: 0 !important;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 16px;
}

.pdsw-feature-list li {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: #3c434a;
	line-height: 1.4;
}

.pdsw-feature-list li .dashicons {
	color: #00a32a;
	font-size: 16px !important;
	width: 16px !important;
	height: 16px !important;
	flex-shrink: 0;
}

/* ============================================================
   Export actions & notice
   ============================================================ */

.pdsw-export-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 4px;
}

#pdsw-export-notice {
	flex: 1;
	min-height: 1em;
}

#pdsw-export-notice .notice {
	margin: 0 !important;
	padding: 8px 12px;
	font-size: 13px;
}

#pdsw-export-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

#pdsw-export-btn .dashicons {
	font-size: 16px !important;
	width: 16px !important;
	height: 16px !important;
}

/* ============================================================
   Warning notice (custom style, inside postbox)
   ============================================================ */

.pdsw-warning-notice {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-left: 4px solid #d97706;
	border-radius: 4px;
	padding: 11px 14px;
	margin: 0 0 16px !important;
}

.pdsw-warning-notice .dashicons {
	color: #d97706;
	font-size: 18px !important;
	width: 18px !important;
	height: 18px !important;
	flex-shrink: 0;
	margin-top: 1px;
}

.pdsw-warning-notice p {
	margin: 0 !important;
	font-size: 13px;
	line-height: 1.5;
	color: #92400e;
}

/* ============================================================
   Drag-and-drop file upload zone
   ============================================================ */

.pdsw-drop-zone {
	border: 2px dashed #c3c4c7;
	border-radius: 6px;
	padding: 26px 20px 20px;
	text-align: center;
	margin: 0 0 16px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
	background: #fafafa;
	position: relative;
}

.pdsw-drop-zone:hover {
	border-color: #2271b1;
	background: #f0f6fc;
	cursor: pointer;
}

.pdsw-drop-zone.pdsw-drag-over {
	border-color: #2271b1;
	background: #e8f3fb;
}

.pdsw-drop-zone.pdsw-has-file {
	border-color: #00a32a;
	background: #f0faf2;
	border-style: solid;
}

.pdsw-drop-icon {
	font-size: 32px !important;
	width: 32px !important;
	height: 32px !important;
	color: #8c8f94;
	display: block !important;
	margin: 0 auto 10px !important;
	transition: color 0.2s ease;
}

.pdsw-drop-zone.pdsw-has-file .pdsw-drop-icon {
	color: #00a32a;
}

.pdsw-drop-zone.pdsw-drag-over .pdsw-drop-icon {
	color: #2271b1;
}

.pdsw-drop-text {
	font-size: 13px;
	color: #646970;
	margin: 0 0 10px !important;
}

.pdsw-browse-label {
	cursor: pointer;
}

.pdsw-file-input-hidden {
	position: absolute;
	left: -9999px;
	width: 0;
	height: 0;
	overflow: hidden;
	opacity: 0;
}

.pdsw-selected-file {
	display: none;
	margin: 10px 0 0 !important;
	font-size: 12px;
	color: #00a32a;
	font-weight: 600;
	align-items: center;
	justify-content: center;
	gap: 5px;
}

.pdsw-selected-file.is-visible {
	display: flex;
}

.pdsw-selected-file .dashicons {
	font-size: 14px !important;
	width: 14px !important;
	height: 14px !important;
}

.pdsw-clear-file {
	background: none;
	border: none;
	cursor: pointer;
	color: #b91c1c;
	padding: 0;
	margin-left: 4px;
	line-height: 1;
	font-size: 12px;
	text-decoration: underline;
}

/* ============================================================
   Import actions
   ============================================================ */

.pdsw-import-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

#pdsw-import-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

#pdsw-import-btn .dashicons {
	font-size: 16px !important;
	width: 16px !important;
	height: 16px !important;
}

/* ============================================================
   Sidebar — version badge & support button
   ============================================================ */

.pdsw-version-badge {
	display: inline-block;
	background: #f0f0f1;
	border: 1px solid #c3c4c7;
	border-radius: 20px;
	padding: 2px 10px;
	font-size: 11px;
	color: #646970;
	font-weight: 600;
	letter-spacing: 0.02em;
	margin-top: 6px;
}

.pdsw-sidebar-column .inside p {
	font-size: 13px;
	line-height: 1.5;
	color: #3c434a;
}

.pdsw-sidebar-column .inside p.description {
	color: #646970;
}

/* ============================================================
   Import result card
   ============================================================ */

.pdsw-result-card {
	margin-bottom: 24px;
}

.pdsw-result-card--success .postbox-header {
	border-left: 4px solid #00a32a;
	background: #f0faf2;
}

.pdsw-result-card--success .postbox-header h2 .dashicons {
	color: #00a32a;
}

.pdsw-result-card--error .postbox-header {
	border-left: 4px solid #d63638;
	background: #fef2f2;
}

.pdsw-result-card--error .postbox-header h2 .dashicons {
	color: #d63638;
}

.pdsw-error-message {
	font-weight: 600;
	color: #d63638;
	margin-bottom: 6px !important;
}

/* Stat pills */
.pdsw-stat-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 20px;
}

.pdsw-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #f6f7f7;
	border: 1px solid #e2e4e7;
	border-radius: 8px;
	padding: 12px 20px;
	min-width: 80px;
	text-align: center;
}

.pdsw-stat strong {
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
	color: #1d2327;
}

.pdsw-stat span {
	font-size: 11px;
	color: #646970;
	margin-top: 3px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pdsw-stat--green {
	background: #f0faf2;
	border-color: #b5dfc0;
}

.pdsw-stat--green strong {
	color: #00a32a;
}

.pdsw-stat--blue {
	background: #f0f6fc;
	border-color: #b5ceea;
}

.pdsw-stat--blue strong {
	color: #2271b1;
}

/* Per-table breakdown */
.pdsw-breakdown {
	border: 1px solid #e2e4e7;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 16px;
}

.pdsw-breakdown-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	font-size: 13px;
	background: #fff;
	border-bottom: 1px solid #f0f0f0;
}

.pdsw-breakdown-row:last-child {
	border-bottom: none;
}

.pdsw-breakdown-row:nth-child(even) {
	background: #fafafa;
}

.pdsw-breakdown-label {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #1d2327;
	font-weight: 500;
}

.pdsw-breakdown-label .dashicons {
	font-size: 15px !important;
	width: 15px !important;
	height: 15px !important;
	color: #8c8f94;
}

.pdsw-breakdown-badges {
	display: flex;
	gap: 6px;
}

.pdsw-badge {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
}

.pdsw-badge--green {
	background: #e6f4ea;
	color: #00a32a;
}

.pdsw-badge--blue {
	background: #e8f0fb;
	color: #2271b1;
}

/* Truncate-insert note */
.pdsw-log-note {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 12px 0;
	padding: 10px 14px;
	background: #f0f6fc;
	border: 1px solid #c8dff5;
	border-radius: 5px;
	font-size: 12px;
	color: #3a6a9a;
	line-height: 1.5;
}

.pdsw-log-note .dashicons {
	font-size: 15px !important;
	width: 15px !important;
	height: 15px !important;
	flex-shrink: 0;
	margin-top: 1px;
}

/* Full log toggle */
.pdsw-log-toggle-wrap {
	margin-bottom: 12px;
}

.pdsw-full-log {
	margin-top: 12px;
}

/* Import log table */
.pdsw-log-action-col {
	width: 90px;
}

.pdsw-import-log td,
.pdsw-import-log th {
	word-break: break-word;
	max-width: 240px;
	font-size: 13px;
}

.pdsw-action-insert {
	color: #00a32a;
	font-weight: 600;
}

.pdsw-action-update {
	color: #2271b1;
	font-weight: 600;
}

/* ============================================================
   Responsive — stack on narrow screens
   ============================================================ */

@media screen and (max-width: 900px) {
	.pdsw-admin-container {
		flex-direction: column;
	}

	.pdsw-sidebar-column {
		flex: 1;
		width: 100%;
	}
}

@media screen and (max-width: 600px) {
	.pdsw-feature-list {
		grid-template-columns: 1fr;
	}
}
