/**
 * Product Catalogue Builder Pro — Frontend Styles
 *
 * @package ProductCatalogueBuilderPro
 */

.pcbp-download-wrapper {
	margin: 15px 0;
	clear: both;
}

/* ─── Button ─────────────────────────────────────────────────────────────── */
.pcbp-download-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	border-radius: 4px;
	border: 2px solid #0073aa;
	background-color: #0073aa;
	color: #ffffff;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
}

.pcbp-download-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pcbp-download-btn:active {
	transform: translateY(0);
}

.pcbp-download-btn:disabled,
.pcbp-download-btn.pcbp-loading {
	opacity: 0.7;
	cursor: wait;
}

/* Style variants */
.pcbp-btn-outlined {
	background-color: transparent !important;
}

.pcbp-btn-text {
	background-color: transparent !important;
	border-color: transparent !important;
	padding: 8px 12px;
	text-decoration: underline;
}

/* Archive (compact) variant */
.pcbp-context-archive .pcbp-download-btn {
	padding: 8px 14px;
	font-size: 12px;
	width: 100%;
	justify-content: center;
	margin-top: 8px;
}

.pcbp-btn-icon {
	font-size: 16px;
}

/* Spinner */
.pcbp-btn-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: pcbp-spin 0.6s linear infinite;
}

.pcbp-loading .pcbp-btn-spinner {
	display: inline-block;
}

.pcbp-loading .pcbp-btn-label {
	opacity: 0.7;
}

@keyframes pcbp-spin {
	to { transform: rotate(360deg); }
}

/* ─── Extra Actions (Email / Share) ─────────────────────────────────────── */
.pcbp-extra-actions {
	display: flex;
	gap: 16px;
	margin-top: 8px;
	flex-wrap: wrap;
}

.pcbp-action-link {
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
	color: #0073aa;
	cursor: pointer;
	text-decoration: underline;
}

.pcbp-action-link:hover {
	color: #005177;
}

/* ─── Email Modal ────────────────────────────────────────────────────────── */
.pcbp-email-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pcbp-email-modal-inner {
	position: relative;
	background: #fff;
	border-radius: 6px;
	padding: 28px;
	max-width: 420px;
	width: 90%;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.pcbp-email-modal-inner h4 {
	margin: 0 0 16px;
	font-size: 18px;
}

.pcbp-email-modal-inner label {
	display: block;
	margin: 12px 0 4px;
	font-size: 13px;
	font-weight: 600;
}

.pcbp-email-modal-inner input[type="text"],
.pcbp-email-modal-inner input[type="email"] {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}

.pcbp-email-modal-inner .pcbp-email-submit {
	margin-top: 16px;
	width: 100%;
	text-align: center;
}

.pcbp-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #999;
}

.pcbp-modal-close:hover {
	color: #333;
}

.pcbp-email-status {
	font-size: 13px;
	min-height: 18px;
	margin: 0;
}

.pcbp-email-status.success { color: #2e7d32; }
.pcbp-email-status.error   { color: #c0392b; }

/* ─── Catalogue Link (shortcode) ────────────────────────────────────────── */
.pcbp-catalogue-link {
	display: inline-block;
}

/* ─── Toast Notifications ───────────────────────────────────────────────── */
.pcbp-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: #23282d;
	color: #fff;
	padding: 12px 20px;
	border-radius: 4px;
	font-size: 14px;
	z-index: 100001;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.pcbp-toast.pcbp-toast-show {
	opacity: 1;
	transform: translateY(0);
}

.pcbp-toast.pcbp-toast-success { background: #2e7d32; }
.pcbp-toast.pcbp-toast-error   { background: #c0392b; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.pcbp-download-btn {
		width: 100%;
		justify-content: center;
	}

	.pcbp-extra-actions {
		justify-content: center;
	}
}
