/*
 * CSS for Zeno Report Post plugin.
 *
 * This plugin uses as little styling as possible.
 * Styling should be done by the theme for form elements.
 *
 * This CSS file is used on frontend and dashboard.
 * 
 * Features: Dark Theme Support & Responsive Design
 *
 */

/* CSS Variables for Theme Support */
:root {
	--zrp-bg-color: #ffffff;
	--zrp-text-color: #333333;
	--zrp-border-color: #999999;
	--zrp-input-bg: #ffffff;
	--zrp-input-border: #cccccc;
	--zrp-modal-bg: #f0f0f0;
	--zrp-feedback-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
	:root {
		--zrp-bg-color: #1e1e1e;
		--zrp-text-color: #e0e0e0;
		--zrp-border-color: #444444;
		--zrp-input-bg: #2d2d2d;
		--zrp-input-border: #555555;
		--zrp-modal-bg: #2d2d2d;
		--zrp-feedback-bg: #3a3a3a;
	}
}

/* Report Post link */
a.zeno-report-post-link-frontend {
	display: inline-block;
	margin-left: 20px;
	margin-right: 20px;
	padding-left: 20px;
	vertical-align: middle;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.3s ease;
	cursor: pointer;
}

a.zeno-report-post-link-frontend:hover {
	opacity: 0.8;
	text-decoration: underline;
}

a.zeno-report-post-link-frontend:active {
	opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
	a.zeno-report-post-link-frontend {
		color: #8ec8f0;
	}
}

@media (max-width: 768px) {
	a.zeno-report-post-link-frontend {
		margin-left: 10px;
		margin-right: 10px;
		padding-left: 10px;
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	a.zeno-report-post-link-frontend {
		display: block;
		margin: 8px 0;
		padding: 8px 10px;
	}
}

/* Report Post button */
input.zeno-report-post-button-frontend {
	font: inherit;
	display: inline-block;
	overflow: visible;
	cursor: pointer;
	text-align: center;
	outline: 0;
	margin-top: 10px;
	margin-bottom: 10px;
	background-color: var(--zrp-input-bg);
	color: var(--zrp-text-color);
	border: 1px solid var(--zrp-input-border);
	padding: 8px 16px;
	border-radius: 4px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

input.zeno-report-post-button-frontend:hover {
	opacity: 0.9;
}

@media (max-width: 768px) {
	input.zeno-report-post-button-frontend {
		margin-top: 8px;
		margin-bottom: 8px;
		padding: 6px 12px;
		font-size: 14px;
	}
}


/* Modal with form */
div.zeno-report-post-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	visibility: hidden;
	opacity: 0;
	width: 90%;
	max-width: 600px;
	height: auto;
	background-color: var(--zrp-modal-bg);
	color: var(--zrp-text-color);
	border: 2px var(--zrp-border-color) solid;
	border-radius: 14px;
	padding: 30px;
	z-index: 9900;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	max-height: 90vh;
	overflow-y: auto;
}
div.zeno-report-post-modal.visible {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.5s ease;
}

@media (max-width: 1200px) {
	div.zeno-report-post-modal {
		width: 85%;
		max-width: 550px;
	}
}

@media (max-width: 768px) {
	div.zeno-report-post-modal {
		width: 90%;
		max-width: 500px;
		padding: 20px;
	}
}

@media (max-width: 480px) {
	div.zeno-report-post-modal {
		width: 95%;
		max-width: 100%;
		padding: 15px;
		border-radius: 10px;
		top: 50%;
	}
}

a.zeno-report-post-modal-close {
	float: right;
	font-weight: 800;
	font-size: 20px;
	padding: 5px;
	cursor: pointer;
	color: var(--zrp-text-color);
	transition: opacity 0.2s ease;
}

a.zeno-report-post-modal-close:hover {
	opacity: 0.7;
}

h2.zeno-report-post-modal-title {
	margin-top: 0;
	color: var(--zrp-text-color);
}

div.zeno-report-post-half-left {
	width: 48%;
	float: left;
}

div.zeno-report-post-half-right {
	width: 48%;
	float: right;
}

@media (max-width: 768px) {
	div.zeno-report-post-half-left,
	div.zeno-report-post-half-right {
		width: 100%;
		float: none;
		margin-bottom: 15px;
	}
}

form.zeno-report-post-form p {
	padding-bottom: 5px;
	margin-top: 16px;
	margin-bottom: 0;
	color: var(--zrp-text-color);
}

div.zeno-report-post-textarea {
	padding-top: 20px;
}

form.zeno-report-post-form input,
form.zeno-report-post-form textarea {
	width: 100%;
	font-size: 1em;
	padding: 8px;
	border-radius: 4px;
	border: 1px solid var(--zrp-input-border);
	background-color: var(--zrp-input-bg);
	color: var(--zrp-text-color);
	box-sizing: border-box;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

form.zeno-report-post-form input:focus,
form.zeno-report-post-form textarea:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

form.zeno-report-post-form textarea {
	resize: vertical;
	min-height: 100px;
}

p.zeno-report-post-modal-desc {
	margin-bottom: 0;
	padding-bottom: 0;
	color: var(--zrp-text-color);
}

p#zeno-report-post-modal-feedback {
	border-left: 4px solid #eee;
	padding: 12px;
	margin: 15px 0 25px;
	background-color: var(--zrp-feedback-bg);
	color: var(--zrp-text-color);
	border-radius: 4px;
}

p#zeno-report-post-modal-feedback.zeno-report-post-error {
	border-left: 4px solid #dd3d36;
	box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.1);
	background-color: rgba(221, 61, 54, 0.1);
}

p#zeno-report-post-modal-feedback.zeno-report-post-success {
	border-left: 4px solid #7ad03a;
	box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.1);
	background-color: rgba(122, 208, 58, 0.1);
}

@media (max-width: 480px) {
	p#zeno-report-post-modal-feedback {
		padding: 10px;
	}
}

/* Ajax loading spinner for modal submit */
.zeno-report-post-ajax-icon {
	display: inline-block;
	width: 18px;
	height: 18px;
	vertical-align: middle;
	margin-left: 8px;
}
.zeno-report-post-ajax-icon.loading::after {
	content: "";
	box-sizing: border-box;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255,255,255,0.15);
	border-top-color: #ffffff;
	border-radius: 50%;
	display: inline-block;
	animation: zrp-spin 0.8s linear infinite;
}

@keyframes zrp-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Spinner shown inside the feedback box */
.zeno-report-post-feedback-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-right: 8px;
	box-sizing: border-box;
	border: 2px solid rgba(0,0,0,0.08);
	border-top-color: rgba(0,0,0,0.5);
	border-radius: 50%;
	animation: zrp-spin 0.8s linear infinite;
}

@media (prefers-color-scheme: dark) {
	.zeno-report-post-feedback-spinner {
		border: 2px solid rgba(255,255,255,0.08);
		border-top-color: #ffffff;
	}
}

@media (prefers-color-scheme: dark) {
	.zeno-report-post-ajax-icon.loading::after {
		border: 2px solid rgba(0,0,0,0.15);
		border-top-color: #ffffff;
	}
}


/* Dashboard */
div.zeno-report-post-report {
	padding: 12px;
	border-bottom: 1px solid var(--zrp-border-color);
	background-color: var(--zrp-bg-color);
	color: var(--zrp-text-color);
	transition: background-color 0.3s ease;
}

div.zeno-report-post-report:hover {
	background-color: var(--zrp-modal-bg);
}

div.zeno-report-post-report:last-child {
	border-bottom: 0px;
}

@media (max-width: 768px) {
	div.zeno-report-post-report {
		padding: 10px;
	}
}

/* Old stuff, is it needed? */
.report-post-form {
	text-align: left;
	color: var(--zrp-text-color);
}

.report-post-form input:read-only {
	background-color: var(--zrp-modal-bg) !important;
	color: var(--zrp-text-color) !important;
	cursor: not-allowed;
}

.report-post-control-error {
	border-color: #dd3d36 !important;
	background-color: rgba(221, 61, 54, 0.1) !important;
	color: #dd3d36 !important;
}

.report-user-hidden {
	display: none;
	border: 1px solid var(--zrp-border-color);
	background-color: var(--zrp-modal-bg);
	color: var(--zrp-text-color);
	padding: 5px;
	margin-bottom: 10px;
	border-radius: 4px;
}

.reported_post #post_status,
.reported_post #post_date {
	width: 10%;
}

.reported_post #post_author {
	width: 15%;
}

@media (max-width: 768px) {
	.reported_post #post_status,
	.reported_post #post_date,
	.reported_post #post_author {
		width: 100%;
		display: block;
		margin-bottom: 10px;
	}
}

h1.report-post-ip {
	font-size: 18px;
	margin: 0;
	padding: 0;
	margin-top: 29px;
	text-align: right;
	color: var(--zrp-text-color);
}

p.report-post-ip {
	text-align: right;
	color: var(--zrp-text-color);
}

/* Highlight effect */
.highlighted_ {
	background-image: none !important;
	-webkit-animation: fadeIt 2s ease-in-out;
	-moz-animation: fadeIt 2s ease-in-out;
	-o-animation: fadeIt 2s ease-in-out;
	animation: fadeIt 2s ease-in-out;
}

@keyframes fadeIt {
	0% { opacity: 1; }
	50% { opacity: 0.5; }
	100% { opacity: 1; }
}

.wp-report-post-options-table {
	width: 100%;
	border-collapse: collapse;
}

.wp-report-post-options-table th {
	padding: 10px 10px 10px 0 !important;
	vertical-align: middle;
	color: var(--zrp-text-color);
	border-bottom: 1px solid var(--zrp-border-color);
	text-align: left;
}

.wp-report-post-options-table td {
	padding: 10px 10px !important;
	vertical-align: middle;
	color: var(--zrp-text-color);
	border-bottom: 1px solid var(--zrp-border-color);
}

.wp-report-post-options-table input[type=text],
.wp-report-post-options-table textarea {
	width: 100%;
	background-color: var(--zrp-input-bg);
	color: var(--zrp-text-color);
	border: 1px solid var(--zrp-input-border);
	padding: 5px;
	box-sizing: border-box;
}

@media (max-width: 768px) {
	.wp-report-post-options-table th,
	.wp-report-post-options-table td {
		padding: 8px 5px !important;
		font-size: 14px;
	}

	.wp-report-post-options-table input[type=text],
	.wp-report-post-options-table textarea {
		font-size: 14px;
	}
}

.wp-report-post-options-section {
	border-bottom: 1px solid var(--zrp-border-color);
	padding-bottom: 20px;
	margin-bottom: 20px;
}

.wp-report-post-options-section:last-child {
	border-bottom: none;
}

/* Custom Report Button Styling */
button.zeno-report-post-button-custom {
	background-color: #0073aa;
	color: #ffffff;
	border: none;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-block;
	margin-left: 0;
	margin-right: 20px;
	vertical-align: middle;
}

button.zeno-report-post-button-custom:hover {
	background-color: #005a87;
	box-shadow: 0 2px 8px rgba(0, 73, 170, 0.3);
	transform: translateY(-2px);
}

button.zeno-report-post-button-custom:active {
	background-color: #004b6a;
	transform: translateY(0);
	box-shadow: 0 1px 3px rgba(0, 73, 170, 0.2);
}

button.zeno-report-post-button-custom:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
}

@media (prefers-color-scheme: dark) {
	button.zeno-report-post-button-custom {
		background-color: #0073aa;
		color: #ffffff;
	}

	button.zeno-report-post-button-custom:hover {
		background-color: #1e90ff;
		box-shadow: 0 2px 8px rgba(30, 144, 255, 0.3);
	}

	button.zeno-report-post-button-custom:active {
		background-color: #0073aa;
	}

	button.zeno-report-post-button-custom:focus {
		box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.2);
	}
}

@media (max-width: 768px) {
	button.zeno-report-post-button-custom {
		margin-left: 0;
		margin-right: 10px;
		padding: 8px 15px;
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	button.zeno-report-post-button-custom {
		display: block;
		width: 100%;
		margin: 10px 0;
		padding: 10px 15px;
	}
}
