/**
 * Network Settings Styles
 *
 * Styling for the Network Settings admin page.
 */

/* Overview Section */
.zerospam-overview-section {
	padding: 20px 0;
}

.zerospam-overview-section > h2 {
	font-size: 23px;
	font-weight: 400;
	margin: 0 0 15px;
	padding: 9px 0;
	line-height: 1.3;
}

.zerospam-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin: 25px 0;
}

.zerospam-stat-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 25px 20px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.04);
	transition: all 0.2s ease;
}

.zerospam-stat-card:hover {
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
	transform: translateY(-2px);
}

.zerospam-stat-card .stat-value {
	font-size: 42px;
	font-weight: 300;
	color: #2271b1;
	margin-bottom: 8px;
	line-height: 1;
}

.zerospam-stat-card .stat-label {
	font-size: 13px;
	color: #646970;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-weight: 500;
}

.zerospam-quick-actions {
	margin: 25px 0;
	padding: 20px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}

.zerospam-quick-actions h3 {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.zerospam-quick-actions .button {
	margin-right: 10px;
	margin-bottom: 5px;
}

/* Settings Groups */
.settings-group {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 6px;
	margin-bottom: 25px;
	box-shadow: 0 2px 4px rgba(0,0,0,0.06);
	overflow: hidden;
}

.settings-group-header {
	padding: 20px 25px;
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.group-header-content {
	flex: 1;
}

.settings-group-header h3 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	display: flex;
	align-items: center;
	gap: 10px;
}

.settings-group-header h3 .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #2271b1;
}

.settings-group-header .group-description {
	margin: 0;
	color: #646970;
	font-size: 13px;
	line-height: 1.5;
}

.settings-group-toggle {
	flex-shrink: 0;
	align-self: flex-start;
}

.settings-group-toggle .button-text {
	margin-left: 4px;
}

.settings-group-toggle {
	padding: 8px 14px;
	font-size: 13px;
	border: 1px solid #2271b1;
	background: #2271b1;
	color: #fff;
	border-radius: 3px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: auto;
	line-height: 1;
	vertical-align: middle;
}

.settings-group-toggle:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.settings-group-toggle:focus {
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1;
	outline: none;
}

.settings-group-toggle .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1;
	vertical-align: middle;
}

.settings-group-toggle .button-text {
	line-height: 1;
	vertical-align: middle;
}

.settings-group-content {
	padding: 0;
	background: #fff;
}

.settings-group-content table {
	margin: 0;
	border: none;
	border-radius: 0;
}

.settings-group-content table thead th {
	background: #fafafa;
	padding: 15px 12px !important;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #50575e;
	font-weight: 600;
}

.settings-group-content table tbody tr {
	transition: background 0.15s;
}

.settings-group-content table tbody tr:hover {
	background: #f9fafb;
}

.settings-group-content table tbody td {
	padding: 20px 12px !important;
	vertical-align: middle;
}

/* Lock/Unlock button - compact and professional */
.toggle-lock {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 36px !important;
	height: 36px !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #f0f0f1 !important;
	border: 1px solid #c3c4c7 !important;
	border-radius: 4px !important;
	font-size: 16px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	min-width: 36px !important;
	max-width: 36px !important;
	box-shadow: none !important;
	text-align: center !important;
	vertical-align: middle !important;
}

.toggle-lock:hover {
	background: #dcdcde !important;
	border-color: #999 !important;
	box-shadow: none !important;
}

.toggle-lock:focus {
	outline: 2px solid #2271b1 !important;
	outline-offset: 2px !important;
	box-shadow: none !important;
}

.toggle-lock:active {
	background: #c8c8ca !important;
	box-shadow: none !important;
}

.toggle-lock[disabled] {
	opacity: 0.5 !important;
	cursor: not-allowed !important;
}

/* Compact button styles */
.button-small {
	height: auto !important;
	padding: 6px 12px !important;
	font-size: 13px !important;
	line-height: 1.5 !important;
	min-height: 32px !important;
	font-weight: 500 !important;
}

.save-setting {
	min-width: 70px !important;
	padding: 6px 16px !important;
	height: 36px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 13px !important;
	font-weight: 600 !important;
}

/* Settings Section */
.zerospam-settings-section {
	padding: 20px 0;
}

.zerospam-settings-section > h2 {
	font-size: 26px;
	font-weight: 400;
	margin: 0;
	padding: 0;
	line-height: 1.3;
	color: #1d2327;
}

.zerospam-settings-section > p.description {
	margin-top: 0;
	margin-bottom: 0;
	font-size: 15px;
	color: #50575e;
	line-height: 1.6;
}

/* Settings Header with Save All button */
.settings-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 30px;
	gap: 20px;
}

.settings-header-actions {
	flex-shrink: 0;
}

.save-all-settings {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	padding: 10px 20px !important;
	height: auto !important;
	min-height: 40px !important;
}

.save-all-settings .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
	margin-top: 0;
}

.zerospam-settings-table {
	margin-top: 20px;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.zerospam-settings-table thead th {
	background: #f6f7f7;
	font-weight: 600;
	padding: 12px !important;
	border-bottom: 1px solid #c3c4c7;
	font-size: 14px;
}

/* Ensure proper text wrapping in all table cells */
.zerospam-settings-table tbody td {
	vertical-align: top;
	padding: 15px 12px !important;
	border-bottom: 1px solid #f0f0f1;
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: normal;
}

.zerospam-settings-table tbody td strong {
	display: block;
	margin-bottom: 5px;
	font-size: 14px;
	color: #1d2327;
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: normal;
}

.zerospam-settings-table tbody td .description {
	margin: 5px 0 0;
	font-size: 13px;
	font-style: normal;
	color: #646970;
	line-height: 1.6;
	word-wrap: break-word;
	overflow-wrap: break-word;
	white-space: normal;
	max-width: 100%;
}
	color: #646970;
	line-height: 1.6;
	max-width: none;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.zerospam-settings-table tbody td .description a {
	text-decoration: none;
}

.zerospam-settings-table tbody td .description a:hover {
	text-decoration: underline;
}

.zerospam-settings-table input[type="text"],
.zerospam-settings-table input[type="url"],
.zerospam-settings-table input[type="number"],
.zerospam-settings-table select {
	width: 100%;
	max-width: 300px;
	font-size: 14px;
}

.zerospam-settings-table textarea {
	width: 100%;
	max-width: 500px;
	font-family: Consolas, Monaco, monospace;
	font-size: 13px;
}

.zerospam-settings-table input[type="checkbox"],
.zerospam-settings-table input[type="radio"] {
	margin: 0 5px 0 0;
}

.zerospam-settings-table label {
	font-size: 13px;
	display: inline-block;
	margin: 0;
}

.setting-status {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 150px;
}

.locked-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #fff3e0;
	color: #d97706;
	border: 1px solid #fbbf24;
	padding: 3px 10px;
	border-radius: 3px;
	font-size: 12px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
}

/* Spinning animation for save all button */
.dashicons-spin {
	animation: rotation 1s infinite linear;
}

@keyframes rotation {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(359deg);
	}
}

.status-text {
	font-size: 12px;
	color: #646970;
	line-height: 1.4;
}

.status-text strong {
	color: #1d2327;
	font-weight: 600;
}

.toggle-lock {
	white-space: nowrap;
	min-width: 100px;
	text-align: center;
}

.save-setting {
	margin-right: 5px !important;
	min-width: 70px !important;
	padding: 6px 16px !important;
	height: 36px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 13px !important;
	font-weight: 600 !important;
}

.view-details {
	margin: 0 !important;
	font-size: 12px !important;
	padding: 6px 12px !important;
	height: 36px !important;
	line-height: 1.4 !important;
	background: #f0f0f1 !important;
	border-color: #c3c4c7 !important;
	color: #2c3338 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.view-details:hover {
	background: #dcdcde !important;
	border-color: #8c8f94 !important;
}

/* Actions column */
.zerospam-settings-table tbody td:last-child {
	white-space: nowrap;
	text-align: left !important;
	vertical-align: middle !important;
}

/* Lock column alignment */
.zerospam-settings-table tbody td:nth-child(4) {
	text-align: center !important;
	vertical-align: middle !important;
	padding: 12px !important;
}

.zerospam-settings-table .button + .button {
	margin-left: 5px;
}

/* Templates Section */
.zerospam-templates-section {
	padding: 20px 0;
}

.zerospam-templates-section > h2,
.zerospam-templates-section > h3 {
	font-size: 23px;
	font-weight: 400;
	margin: 25px 0 15px;
	padding: 9px 0;
	line-height: 1.3;
}

.zerospam-templates-section > p.description {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.zerospam-templates-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.template-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	transition: all 0.2s ease;
}

.template-card:hover {
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	transform: translateY(-2px);
}

.template-card.built-in {
	border-left: 4px solid #2271b1;
}

.template-card.custom {
	border-left: 4px solid #50575e;
}

.template-card h3 {
	margin-top: 0;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

.template-card .badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.built-in-badge {
	background: #2271b1;
	color: #fff;
}

.custom-badge {
	background: #50575e;
	color: #fff;
}

.template-description {
	color: #646970;
	font-size: 13px;
	margin: 10px 0;
	line-height: 1.6;
}

.template-meta {
	display: flex;
	gap: 15px;
	font-size: 12px;
	color: #646970;
	margin: 10px 0;
	padding: 10px 0;
	border-top: 1px solid #dcdcde;
}

.template-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 15px;
}

.template-actions .button {
	flex: 1;
	min-width: 110px;
	text-align: center;
	font-size: 13px;
}

.template-notice {
	margin: 20px 0;
}

/* Audit Section */
.zerospam-audit-section {
	padding: 20px 0;
}

.zerospam-audit-section > h2 {
	font-size: 23px;
	font-weight: 400;
	margin: 0 0 15px;
	padding: 9px 0;
	line-height: 1.3;
}

.zerospam-audit-section > p.description {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.zerospam-audit-section table {
	margin-top: 20px;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.zerospam-audit-section thead th {
	background: #f6f7f7;
	font-weight: 600;
	padding: 12px !important;
	border-bottom: 1px solid #c3c4c7;
	font-size: 14px;
}

.zerospam-audit-section tbody td {
	font-size: 13px;
}

.zerospam-audit-section code {
	background: #f0f0f1;
	padding: 3px 6px;
	border-radius: 3px;
	font-size: 12px;
	font-family: Consolas, Monaco, monospace;
	color: #1d2327;
}

/* Comparison Section */
.zerospam-comparison-section {
	padding: 20px 0;
}

.zerospam-comparison-section > h2 {
	font-size: 23px;
	font-weight: 400;
	margin: 0 0 15px;
	padding: 9px 0;
	line-height: 1.3;
}

.zerospam-comparison-section > p.description {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

#comparison-results {
	margin-top: 20px;
	overflow-x: auto;
}

#comparison-results table {
	min-width: 800px;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

#comparison-results thead th {
	background: #f6f7f7;
	font-weight: 600;
	padding: 12px !important;
	border-bottom: 1px solid #c3c4c7;
	font-size: 14px;
}

#comparison-results .source-badge {
	display: inline-block;
	background: #f0f0f1;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 10px;
	text-transform: uppercase;
	font-weight: 600;
	color: #1d2327;
	letter-spacing: 0.5px;
}

#comparison-results td.default {
	background: #f6f7f7;
}

#comparison-results td.locked {
	background: #fef7f7;
}

#comparison-results td.locked .source-badge {
	background: #d63638;
	color: #fff;
}

#comparison-results td.override {
	background: #fffaef;
}

#comparison-results td.override .source-badge {
	background: #f0b849;
	color: #000;
}

#comparison-results td.default .source-badge {
	background: #2271b1;
	color: #fff;
}

#comparison-results .description {
	font-size: 12px;
	color: #646970;
}

/* Import/Export Section */
.zerospam-import-export-section {
	padding: 20px 0;
}

.zerospam-import-export-section > h2 {
	font-size: 23px;
	font-weight: 400;
	margin: 0 0 15px;
	padding: 9px 0;
	line-height: 1.3;
}

.export-section,
.import-section {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
	box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.export-section h3,
.import-section h3 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

.import-section h4 {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
}

.export-section p.description,
.import-section p.description {
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
	margin-bottom: 15px;
}

.import-section label {
	display: block;
	margin: 8px 0;
	font-size: 13px;
	color: #1d2327;
	cursor: pointer;
}

.import-section label input[type="radio"] {
	margin-right: 6px;
	vertical-align: middle;
}

.import-section label strong {
	font-weight: 600;
}

.import-section label .description {
	display: block;
	margin-left: 24px;
	color: #646970;
	font-size: 12px;
	font-style: italic;
	line-height: 1.4;
	margin-top: 4px;
}

.import-section input[type="file"] {
	margin: 15px 0;
	padding: 5px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	display: block;
	width: 100%;
	max-width: 400px;
}

#export-status,
#import-status {
	margin-top: 15px;
}

#export-status .notice,
#import-status .notice {
	margin: 0;
	padding: 12px;
}

#export-status .spinner,
#import-status .spinner {
	visibility: visible;
	display: inline-block;
	vertical-align: middle;
	margin-right: 8px;
}

/* Tab Content */
.zerospam-tab-content {
	background: #fff;
	padding: 20px;
	margin-top: 0;
	border: 1px solid #ccd0d4;
	border-top: none;
}

/* Responsive */
@media screen and (max-width: 782px) {
	.zerospam-stats-grid {
		grid-template-columns: 1fr;
	}

	.zerospam-settings-table input[type="text"],
	.zerospam-settings-table input[type="number"],
	.zerospam-settings-table select {
		max-width: 100%;
	}

	.zerospam-quick-actions .button {
		display: block;
		margin: 5px 0;
		width: 100%;
	}
}

/* Inline save messages */
.inline-save-message {
	display: inline-block;
	margin-left: 10px;
	padding: 4px 10px;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 600;
	animation: slideIn 0.3s ease-out;
}

.inline-save-message.success {
	background: #00a32a;
	color: #fff;
}

.inline-save-message.error {
	background: #d63638;
	color: #fff;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Row flash animation on save */
@keyframes successFlash {
	0% {
		background-color: #edfaef;
	}
	100% {
		background-color: transparent;
	}
}

.setting-saved-flash {
	animation: successFlash 2s ease-out;
	border-left: 4px solid #00a32a;
}

/* Notices - keep for global notices but make less intrusive */
.notice {
	margin: 15px 0;
	padding: 12px !important;
	border-left-width: 4px !important;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notice.notice-success {
	border-left-color: #00a32a !important;
	background: #edfaef;
}

.notice.notice-error {
	border-left-color: #d63638 !important;
	background: #fcf0f1;
}

.notice p {
	margin: 0.5em 0 !important;
	font-size: 14px;
	font-weight: 500;
}

/* Loading States */
.button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Success/Error Colors */
.success-text {
	color: #00a32a;
}

.error-text {
	color: #d63638;
}

/* Tooltips */
.zerospam-tooltip {
	position: relative;
	display: inline-block;
	cursor: help;
}

.zerospam-tooltip:hover::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%);
	background: #1d2327;
	color: #fff;
	padding: 8px 12px;
	border-radius: 4px;
	white-space: nowrap;
	font-size: 12px;
	z-index: 1000;
	margin-bottom: 5px;
}

/* Animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in {
	animation: fadeIn 0.3s ease-in-out;
}
