/**
 * Import/Export Modal Styles
 *
 * Styles for the import/export modal dialog
 *
 * @package Extra Product Data for WooCommerce
 */

/**
 * Modal Overlay
 * Semi-transparent background behind modal
 */
.exprdawc-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999999;
	align-items: center;
	justify-content: center;

	&.active {
		display: flex;
	}
}

/**
 * Modal Overlay (Backdrop)
 */
.exprdawc-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: -1;
}

/**
 * Modal Content Container
 */
.exprdawc-modal-content {
	position: relative;
	background-color: #fff;
	border-radius: 4px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	width: 90%;
	max-width: 700px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	animation: slideIn 0.3s ease-out;

	@media (max-width: 768px) {
		width: 95%;
		max-width: 100%;
	}
}

/**
 * Modal Header
 */
.exprdawc-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid #eee;
	background-color: #f9f9f9;

	h2 {
		margin: 0;
		font-size: 18px;
		font-weight: 600;
	}
}

/**
 * Modal Close Button
 */
.exprdawc-modal-close {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	color: #666;
	transition: color 0.2s ease;

	&:hover {
		color: #000;
	}

	.dashicons {
		font-size: 20px;
		width: auto;
		height: auto;
	}
}

/**
 * Modal Body
 */
.exprdawc-modal-body {
	padding: 20px;
	overflow-y: auto;
	flex: 1;

	h3 {
		margin-top: 0;
		margin-bottom: 10px;
		font-size: 16px;
		font-weight: 600;
	}

	.description {
		margin: 0 0 15px;
		color: #666;
		font-size: 13px;
	}
}

/**
 * Modal Section
 */
.exprdawc-modal-section {
	margin-bottom: 20px;

	&:last-child {
		margin-bottom: 0;
	}
}

/**
 * Modal Textarea
 */
.exprdawc-modal-textarea {
	width: 100%;
	height: 300px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 13px;
	line-height: 1.5;
	box-sizing: border-box;
	background-color: #fafafa;
	resize: vertical;

	&:focus {
		outline: none;
		border-color: #0073aa;
		background-color: #fff;
		box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
	}

	&[readonly] {
		background-color: #f5f5f5;
		color: #333;
	}

	@media (max-width: 768px) {
		height: 200px;
	}
}

/**
 * Modal Actions Container
 */
.exprdawc-modal-actions {
	margin-top: 15px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;

	.button {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 8px 16px;
		font-size: 13px;

		.dashicons {
			font-size: 14px;
			width: 14px;
			height: 14px;
			margin: 0;
		}
	}
}

/**
 * Modal Import Notice
 */
.exprdawc-import-notice {
	padding: 12px;
	margin: 15px 0;
	border-radius: 4px;
	border-left: 4px solid;

	&.success {
		background-color: #ecf7ee;
		border-left-color: #4ab866;
	}

	&.error {
		background-color: #fee;
		border-left-color: #d63638;
	}

	&.warning {
		background-color: #fcf8e5;
		border-left-color: #f59e0b;
	}

	.exprdawc-import-notice-message {
		margin: 0;
		font-size: 13px;
		color: #333;
	}
}

/**
 * Modal Footer
 */
.exprdawc-modal-footer {
	padding: 15px 20px;
	border-top: 1px solid #eee;
	background-color: #f9f9f9;
	text-align: right;

	.button {
		margin-left: 10px;
	}
}

/**
 * Animation: Slide In
 */
@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-30px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/**
 * Responsive Adjustments
 */
@media (max-width: 480px) {
	.exprdawc-modal-content {
		width: 98%;
	}

	.exprdawc-modal-header,
	.exprdawc-modal-body,
	.exprdawc-modal-footer {
		padding: 15px;
	}

	.exprdawc-modal-footer {
		text-align: left;

		.button {
			display: block;
			width: 100%;
			margin-left: 0;
			margin-bottom: 8px;

			&:last-child {
				margin-bottom: 0;
			}
		}
	}
}
