/**
 * Easy Text Replace - Admin Styles
 *
 * Minimal styling for the admin interface following WordPress native design patterns.
 *
 * @package EasyTextReplace
 * @since 1.0.0
 */

/* List Table Enhancements */
.etr-status-toggle {
	cursor: pointer;
	text-decoration: none;
	padding: 4px 8px;
	border-radius: 3px;
	display: inline-block;
	transition: all 0.2s ease;
}

.etr-status-toggle:hover {
	text-decoration: none;
	opacity: 0.8;
}

.etr-status-toggle:focus {
	box-shadow: 0 0 0 1px #fff, 0 0 0 3px #2271b1;
	outline: 2px solid transparent;
}

.etr-status-active {
	color: #00a32a;
	font-weight: 600;
	background: #e7f7e9;
}

.etr-status-active:hover {
	background: #d5f2d7;
}

.etr-status-inactive {
	color: #d63638;
	font-weight: 600;
	background: #fcf0f1;
}

.etr-status-inactive:hover {
	background: #f9e2e3;
}

/* Form Styling */
.etr-form-table th {
	width: 200px;
	padding: 15px 10px 15px 0;
}

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

.etr-form-table input[type="text"],
.etr-form-table textarea {
	width: 100%;
	max-width: 600px;
}

.etr-form-table textarea {
	min-height: 80px;
}

.etr-form-table .description {
	margin-top: 5px;
	font-style: italic;
	color: #646970;
}

/* Priority Field */
.etr-priority-input {
	width: 100px;
}

/* Text Domain Field */
.etr-text-domain-input {
	width: 300px;
}

/* Checkbox Styling */
.etr-checkbox-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.etr-checkbox-wrapper input[type="checkbox"] {
	margin: 0;
}

/* Action Links */
.etr-actions {
	display: flex;
	gap: 10px;
}

.etr-actions a {
	text-decoration: none;
}

.etr-actions a:hover {
	text-decoration: underline;
}

.etr-delete-link {
	color: #b32d2e;
}

/* Import/Export Section */
.etr-import-export-container {
	max-width: 800px;
}

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

.etr-section h2 {
	margin-top: 0;
	font-size: 1.3em;
	font-weight: 600;
}

.etr-section p {
	color: #646970;
	line-height: 1.6;
}

.etr-import-export-container hr {
	margin: 30px 0;
	border: 0;
	border-top: 1px solid #dcdcde;
}

.etr-export-button {
	margin-top: 10px;
}

.etr-import-form {
	margin-top: 20px;
}

.etr-import-form input[type="file"] {
	margin: 10px 0;
}

/* Replacement Count Display */
.etr-replacement-count {
	background: #f0f0f1;
	border-left: 4px solid #2271b1;
	padding: 12px;
	margin: 20px 0;
	max-width: 600px;
}

.etr-replacement-count strong {
	color: #2271b1;
}

.etr-replacement-count.etr-limit-warning {
	border-left-color: #dba617;
}

.etr-replacement-count.etr-limit-warning strong {
	color: #dba617;
}

.etr-replacement-count.etr-limit-reached {
	border-left-color: #d63638;
}

.etr-replacement-count.etr-limit-reached strong {
	color: #d63638;
}

/* Loading State */
.etr-loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Success/Error Messages */
.etr-message {
	padding: 10px 15px;
	margin: 10px 0;
	border-radius: 3px;
}

.etr-message-success {
	background: #d7f0d7;
	border-left: 4px solid #46b450;
	color: #1e4620;
}

.etr-message-error {
	background: #f8d7da;
	border-left: 4px solid #dc3232;
	color: #721c24;
}

/* Help Section Styling */
.etr-help-section {
	margin-top: 20px;
	padding: 15px 20px;
	background: #f9f9f9;
	border-left: 4px solid #2271b1;
	border-radius: 0 3px 3px 0;
}

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

.etr-help-section ul {
	margin: 10px 0 0 20px;
	list-style: disc;
}

.etr-help-section li {
	margin-bottom: 8px;
	color: #646970;
	line-height: 1.6;
}

/* Form Enhancements */
.etr-replacement-form .form-table th {
	padding-top: 20px;
	padding-bottom: 20px;
	vertical-align: top;
}

.etr-replacement-form .form-table td {
	padding-top: 20px;
	padding-bottom: 20px;
}

.etr-replacement-form input[type="text"],
.etr-replacement-form input[type="number"] {
	font-size: 14px;
}

.etr-replacement-form .description {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.5;
}

.etr-replacement-form .dashicons-info {
	font-size: 16px;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-left: 4px;
}

.etr-replacement-form fieldset label {
	font-size: 14px;
}

/* Required Field Indicator */
.required {
	color: #d63638;
	font-weight: bold;
}

/* Button Enhancements */
.button-large {
	height: auto;
	padding: 8px 16px;
	font-size: 14px;
}

/* Notice Enhancements */
.notice.inline {
	margin: 15px 0;
	padding: 12px;
}

.notice.inline p {
	margin: 0.5em 0;
}

/* Import/Export Section Icons */
.etr-section h2 .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	vertical-align: middle;
	margin-right: 8px;
}

/* List Table Row Actions */
.row-actions {
	color: #646970;
}

.row-actions span {
	display: inline-block;
}

.row-actions a {
	color: #2271b1;
	text-decoration: none;
}

.row-actions a:hover {
	color: #135e96;
	text-decoration: underline;
}

/* Search Box Styling */
.search-box {
	margin-bottom: 15px;
}

.search-box input[type="search"] {
	margin-right: 5px;
}

/* Tablenav Styling */
.tablenav {
	margin: 15px 0;
}

.tablenav .actions {
	padding: 0;
}

/* Column Widths */
.column-source_string {
	width: 25%;
}

.column-replacement_string {
	width: 25%;
}

.column-text_domain {
	width: 15%;
}

.column-priority {
	width: 8%;
	text-align: center;
}

.column-status {
	width: 10%;
}

.column-created_at {
	width: 12%;
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {

	.etr-form-table th,
	.etr-form-table td {
		display: block;
		width: 100%;
		padding: 10px 0;
	}

	.etr-form-table input[type="text"],
	.etr-form-table textarea {
		max-width: 100%;
	}

	.etr-replacement-form .form-table th,
	.etr-replacement-form .form-table td {
		padding: 15px 0;
	}

	.etr-help-section {
		padding: 12px 15px;
	}

	.column-priority,
	.column-status,
	.column-created_at {
		text-align: left;
	}
}
/* I
mport/Export Grid Layout */
.etr-import-export-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-top: 20px;
}

.etr-import-export-grid .postbox {
	margin-bottom: 0;
}

.etr-import-export-grid .postbox-header h2 {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 12px;
	font-size: 14px;
	font-weight: 600;
}

.etr-import-export-grid .postbox .inside {
	padding: 12px;
}

.etr-import-export-grid .postbox .inside p:first-child {
	margin-top: 0;
}

.etr-import-export-grid .postbox .inside p:last-child {
	margin-bottom: 0;
}

.etr-import-export-grid .notice.inline {
	margin: 15px 0;
}

.etr-import-export-grid .form-table {
	margin-top: 0;
}

.etr-import-export-grid .form-table th {
	padding-left: 0;
	width: 120px;
}

.etr-import-export-grid .form-table td {
	padding-right: 0;
}

/* Responsive Grid */
@media screen and (max-width: 1200px) {
	.etr-import-export-grid {
		grid-template-columns: 1fr;
	}
}

/* Info Box Styling */
.etr-info-box {
	margin-top: 20px;
	padding: 15px;
	background: #f0f6fc;
	border-left: 4px solid #72aee6;
	border-radius: 0 3px 3px 0;
}

.etr-info-box h4 {
	margin-top: 0;
	margin-bottom: 10px;
	color: #1d2327;
	font-size: 13px;
	font-weight: 600;
}

.etr-info-box ul {
	margin: 0 0 0 20px;
	list-style: disc;
}

.etr-info-box li {
	margin-bottom: 6px;
	color: #2c3338;
	font-size: 13px;
	line-height: 1.5;
}

/* Full Width Postbox */
.postbox.etr-full-width {
	margin-top: 20px;
}

.postbox.etr-full-width .inside {
	padding: 12px;
}

.postbox.etr-full-width .inside > div {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media screen and (max-width: 782px) {
	.postbox.etr-full-width .inside > div {
		grid-template-columns: 1fr;
	}
}

/* Text Domain Helper */
#etr-text-domain-helper-toggle {
	text-decoration: none;
	color: #2271b1;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	transition: color 0.2s ease;
}

#etr-text-domain-helper-toggle:hover {
	color: #135e96;
	text-decoration: none;
}

#etr-text-domain-helper-toggle .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

#etr-text-domain-helper {
	animation: slideDown 0.3s ease;
}

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

#etr-text-domain-helper h4 {
	color: #1d2327;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #dcdcde;
}

#etr-text-domain-helper code {
	background: #f6f7f7;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
	color: #d63638;
	cursor: pointer;
	transition: all 0.2s ease;
	display: inline-block;
}

#etr-text-domain-helper code:hover {
	background: #2271b1;
	color: #fff;
	transform: translateY(-1px);
}

#etr-text-domain-helper ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

#etr-text-domain-helper ul li {
	padding: 3px 0;
	color: #50575e;
	font-size: 13px;
	line-height: 1.6;
}

#etr-text-domain-helper strong {
	display: block;
	margin-bottom: 5px;
	color: #1d2327;
	font-size: 13px;
}

#etr-text-domain-helper .description {
	margin-top: 0;
}
