/**
 * Pause/Resume Subscription Modal Styles
 *
 * Follows the existing .pology-modal pattern from the theme.
 *
 * @package pologymu
 */

/* Modal Container */
.pology-pause-resume-modal {
	display: none;
	height: 100vh;
	left: 0;
	position: fixed;
	top: 0;
	width: 100vw;
	z-index: 99999999;
}

.pology-pause-resume-modal .pology-modal-overlay {
	background: rgba(0, 0, 0, 0.6);
	height: 100%;
	left: 0;
	position: absolute;
	top: 0;
	width: 100%;
}

.pology-pause-resume-modal .pology-modal-inner {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	left: 50%;
	max-height: 90vh;
	max-width: 600px;
	overflow-y: auto;
	padding: 30px;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 90%;
}

/* Close Button */
.pology-pause-resume-modal .pology-close-modal {
	background: transparent;
	border: none;
	border-radius: 0;
	cursor: pointer;
	padding: 0;
	position: absolute;
	right: 15px;
	top: 15px;
	z-index: 10;
}

.pology-pause-resume-modal .pology-close-modal span {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

.pology-pause-resume-modal .pology-close-modal svg {
	height: 18px;
	width: 18px;
}

.pology-pause-resume-modal .pology-close-modal svg path {
	stroke: #333;
	stroke-width: 2;
	transition: stroke 200ms ease-in-out;
}

.pology-pause-resume-modal .pology-close-modal:hover svg path,
.pology-pause-resume-modal .pology-close-modal:focus svg path {
	stroke: #e74c3c;
}

/* Modal Headings */
.pology-pause-resume-modal h2 {
	color: #333;
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 20px;
	padding-right: 30px;
}

.pology-pause-resume-modal h3 {
	color: #333;
	font-size: 20px;
	font-weight: 600;
	margin: 10px 0;
}

/* Terms Container */
.pology-pause-terms-container,
.pology-resume-terms-container {
	margin-bottom: 20px;
	position: relative;
}

.pology-pause-terms,
.pology-resume-terms {
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	color: #555;
	font-family: inherit;
	font-size: 14px;
	height: 200px;
	line-height: 1.6;
	padding: 15px;
	resize: none;
	width: 100%;
}

.pology-pause-terms:focus,
.pology-resume-terms:focus {
	border-color: #0073aa;
	outline: none;
}

/* Scroll Indicator */
.pology-scroll-indicator {
	align-items: center;
	background: linear-gradient(to top, rgba(249, 249, 249, 1) 0%, rgba(249, 249, 249, 0) 100%);
	bottom: 1px;
	color: #666;
	display: flex;
	font-size: 13px;
	gap: 5px;
	justify-content: center;
	left: 1px;
	padding: 10px;
	position: absolute;
	right: 1px;
	transition: opacity 300ms ease;
}

.pology-scroll-indicator .dashicons {
	animation: bounce 1s infinite;
	font-size: 18px;
}

.pology-scroll-indicator.hidden {
	opacity: 0;
	pointer-events: none;
}

@keyframes bounce {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(5px);
	}
}

/* Checkbox Container */
.pology-pause-checkbox-container,
.pology-resume-checkbox-container {
	margin-bottom: 25px;
}

.pology-pause-checkbox-label,
.pology-resume-checkbox-label {
	align-items: flex-start;
	color: #333;
	cursor: pointer;
	display: flex;
	font-size: 15px;
	gap: 10px;
	line-height: 1.4;
}

.pology-pause-checkbox-label input[type="checkbox"],
.pology-resume-checkbox-label input[type="checkbox"] {
	cursor: pointer;
	flex-shrink: 0;
	height: 18px;
	margin-top: 2px;
	width: 18px;
}

.pology-pause-checkbox-label input[type="checkbox"]:disabled,
.pology-resume-checkbox-label input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

/* Buttons */
.pology-pause-buttons,
.pology-resume-buttons,
.pology-cancel-intercept-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.pology-btn {
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	padding: 12px 24px;
	text-align: center;
	transition: all 200ms ease;
}

.pology-btn:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.pology-btn-primary {
	background: #0073aa;
	color: #fff;
}

.pology-btn-primary:hover:not(:disabled),
.pology-btn-primary:focus:not(:disabled) {
	background: #005a87;
}

.pology-btn-secondary {
	background: #f1f1f1;
	color: #333;
}

.pology-btn-secondary:hover:not(:disabled),
.pology-btn-secondary:focus:not(:disabled) {
	background: #e1e1e1;
}

/* Loading State */
.pology-pause-loading,
.pology-resume-loading {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 15px;
	justify-content: center;
	padding: 40px 20px;
	text-align: center;
}

.pology-spinner {
	animation: spin 1s linear infinite;
	border: 3px solid #f3f3f3;
	border-radius: 50%;
	border-top: 3px solid #0073aa;
	height: 40px;
	width: 40px;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Success State */
.pology-pause-success,
.pology-resume-success {
	padding: 20px;
	text-align: center;
}

.pology-success-icon {
	color: #28a745;
	margin-bottom: 10px;
}

.pology-success-icon .dashicons {
	font-size: 50px;
	height: 50px;
	width: 50px;
}

.pology-pause-success-message,
.pology-resume-success-message {
	color: #333;
	font-size: 16px;
	margin-bottom: 10px;
}

.pology-pause-dates,
.pology-resume-billing-date {
	background: #f0f8ff;
	border-radius: 4px;
	color: #0073aa;
	font-size: 14px;
	margin-bottom: 20px;
	padding: 12px 15px;
}

/* Error State */
.pology-pause-error,
.pology-resume-error {
	padding: 20px;
	text-align: center;
}

.pology-error-icon {
	color: #e74c3c;
	margin-bottom: 10px;
}

.pology-error-icon .dashicons {
	font-size: 50px;
	height: 50px;
	width: 50px;
}

.pology-error-message {
	color: #e74c3c;
	font-size: 15px;
	margin-bottom: 20px;
}

/* Cancel Intercept Modal */
.pology-cancel-intercept-content {
	text-align: center;
}

.pology-cancel-intercept-icon {
	color: #f39c12;
	margin-bottom: 15px;
}

.pology-cancel-intercept-icon .dashicons {
	font-size: 60px;
	height: 60px;
	width: 60px;
}

.pology-cancel-intercept-message {
	color: #555;
	font-size: 16px;
	line-height: 1.6;
	margin-bottom: 25px;
}

.pology-pause-benefits {
	background: #f9f9f9;
	border-radius: 6px;
	list-style: none;
	margin: 0 0 25px;
	padding: 20px 25px;
	text-align: left;
}

.pology-pause-benefits li {
	align-items: flex-start;
	color: #333;
	display: flex;
	font-size: 14px;
	gap: 10px;
	line-height: 1.4;
	margin-bottom: 12px;
}

.pology-pause-benefits li:last-child {
	margin-bottom: 0;
}

.pology-pause-benefits .dashicons {
	color: #28a745;
	flex-shrink: 0;
	font-size: 18px;
	height: 18px;
	margin-top: 1px;
	width: 18px;
}

.pology-cancel-intercept-buttons {
	flex-direction: column;
}

.pology-cancel-intercept-buttons .pology-btn {
	width: 100%;
}

/* Pause Status Cell in Subscription Table */
.pology-pause-status-cell {
	vertical-align: middle;
}

.pology-pause-status {
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
	font-size: 13px;
	line-height: 1.5;
	padding: 10px 12px;
}

.pology-pause-status strong {
	color: #664d03;
	display: block;
	margin-bottom: 5px;
}

/* Action Link Styles */
/* Appearance comes from the theme's .mepr-account-row-action button styling so
   these triggers match the native pause/cancel links. */
.pology-pause-trigger,
.pology-cancel-intercept-trigger,
.pology-resume-trigger {
	cursor: pointer;
}

/* Responsive Adjustments */
@media screen and (max-width: 600px) {
	.pology-pause-resume-modal .pology-modal-inner {
		max-height: 95vh;
		padding: 20px;
		top: 50%;
		width: 95%;
	}

	.pology-pause-resume-modal h2 {
		font-size: 20px;
	}

	.pology-pause-terms,
	.pology-resume-terms {
		font-size: 13px;
		height: 150px;
	}

	.pology-btn {
		font-size: 14px;
		padding: 10px 20px;
		width: 100%;
	}

	.pology-pause-buttons,
	.pology-resume-buttons {
		flex-direction: column;
	}
}
