/**
 * Deactivation Feedback Modal Styles
 * 
 * Styles for the deactivation feedback modal that appears on plugins.php page.
 * These styles are separate from the main admin styles to ensure they load on plugins.php.
 *
 * @package Intercom_WooCommerce_Sync
 * @since 1.0.0
 */

/* Modal Overlay */
.rpplstp_iws-deactivation-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rpplstp_iws-deactivation-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Modal Container */
.rpplstp_iws-deactivation-modal {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	max-width: 550px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.rpplstp_iws-deactivation-overlay.active .rpplstp_iws-deactivation-modal {
	transform: scale(1);
}

/* Modal Header */
.rpplstp_iws-deactivation-modal-header {
	padding: 16px 16px 12px;
	border-bottom: 1px solid #e5e5e5;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.rpplstp_iws-deactivation-modal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.4;
	flex: 1;
}

/* Close Icon Button */
.rpplstp_iws-deactivation-modal-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 28px;
	height: 28px;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	color: #646970;
}

.rpplstp_iws-deactivation-modal-close:hover {
	background-color: #f0f0f1;
	color: #1d2327;
}

.rpplstp_iws-deactivation-modal-close:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.rpplstp_iws-deactivation-modal-close svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* Modal Body */
.rpplstp_iws-deactivation-modal-body {
	padding: 16px;
}

.rpplstp_iws-deactivation-modal-description {
	margin: 0 0 16px;
	color: #50575e;
	font-size: 13px;
	line-height: 1.6;
}

/* Feedback Options */
.rpplstp_iws-deactivation-feedback-options {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.rpplstp_iws-deactivation-feedback-option {
	margin: 0 0 12px;
	padding: 0;
}

.rpplstp_iws-deactivation-feedback-option:last-child {
	margin-bottom: 0;
}

.rpplstp_iws-deactivation-feedback-option input[type="radio"] {
	margin: 0 8px 0 0;
	vertical-align: middle;
}

.rpplstp_iws-deactivation-feedback-option label {
	display: inline-block;
	cursor: pointer;
	font-size: 13px;
	color: #1d2327;
	line-height: 1.5;
	vertical-align: middle;
}

.rpplstp_iws-deactivation-feedback-option input[type="radio"]:checked + label {
	font-weight: 500;
}

/* Feedback Details Textarea */
.rpplstp_iws-deactivation-feedback-details {
	display: none;
	margin-top: 16px;
}

.rpplstp_iws-deactivation-feedback-details.active {
	display: block;
}

.rpplstp_iws-deactivation-feedback-details textarea {
	width: 100%;
	min-height: 80px;
	padding: 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	resize: vertical;
	box-sizing: border-box;
}

.rpplstp_iws-deactivation-feedback-details textarea:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 1px #2271b1;
}

/* Modal Footer */
.rpplstp_iws-deactivation-modal-footer {
	padding: 12px 16px 16px;
	border-top: 1px solid #e5e5e5;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 16px;
}

/* Buttons */
.rpplstp_iws-deactivation-button {
	padding: 6px 14px;
	border: 1px solid;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	display: inline-block;
	line-height: 1.5;
}

.rpplstp_iws-deactivation-button:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.rpplstp_iws-deactivation-button-primary {
	background-color: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.rpplstp_iws-deactivation-button-primary:hover {
	background-color: #135e96;
	border-color: #135e96;
	color: #fff;
}

.rpplstp_iws-deactivation-button-secondary {
	background-color: transparent;
	border-color: transparent;
	color: #646970;
	font-weight: 400;
	padding: 6px 10px;
	opacity: 0.7;
}

.rpplstp_iws-deactivation-button-secondary:hover {
	background-color: transparent;
	border-color: transparent;
	color: #50575e;
	opacity: 0.9;
	text-decoration: underline;
}

.rpplstp_iws-deactivation-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}


/* Loading State */
.rpplstp_iws-deactivation-modal.loading .rpplstp_iws-deactivation-button-primary {
	position: relative;
	color: transparent;
}

.rpplstp_iws-deactivation-modal.loading .rpplstp_iws-deactivation-button-primary::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: rpplstp_iws-spin 0.6s linear infinite;
}

@keyframes rpplstp_iws-spin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* Success Message */
.rpplstp_iws-deactivation-success {
	display: none;
	padding: 20px;
	text-align: center;
}

.rpplstp_iws-deactivation-success.active {
	display: block;
}

.rpplstp_iws-deactivation-success-icon {
	font-size: 40px;
	color: #00a32a;
	margin-bottom: 10px;
}

.rpplstp_iws-deactivation-success-message {
	font-size: 14px;
	color: #1d2327;
	margin: 0 0 16px;
}

/* Responsive */
@media (max-width: 600px) {
	.rpplstp_iws-deactivation-modal {
		width: 95%;
		margin: 20px;
	}

	.rpplstp_iws-deactivation-modal-header,
	.rpplstp_iws-deactivation-modal-body,
	.rpplstp_iws-deactivation-modal-footer {
		padding: 20px;
	}

	.rpplstp_iws-deactivation-modal-footer {
		flex-direction: column;
	}

	.rpplstp_iws-deactivation-button {
		width: 100%;
		text-align: center;
	}
}

