/**
 * Software Licensing Hub - Frontend Styles for Free Member Downloads
 */

.slh-free-download-wrap {
	margin: 16px 0;
	display: inline-block;
	max-width: 100%;
	font-family: inherit;
}

/* High-specificity button styling to guarantee identical color across all browsers & themes */
.slh-free-download-wrap a.slh-front-btn,
.slh-free-download-wrap button.slh-front-btn,
a.slh-front-btn,
button.slh-front-btn,
.slh-front-btn,
.slh-front-btn-auth,
.slh-front-btn-claim,
.slh-front-btn-trigger-auth {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	background: #4f46e5 !important;
	background-color: #4f46e5 !important;
	color: #ffffff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	padding: 12px 24px !important;
	border-radius: 8px !important;
	border: none !important;
	outline: none !important;
	cursor: pointer !important;
	text-decoration: none !important;
	box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25) !important;
	transition: all 0.2s ease !important;
	line-height: 1.4 !important;
	box-sizing: border-box !important;
	text-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.slh-free-download-wrap a.slh-front-btn:hover,
.slh-free-download-wrap button.slh-front-btn:hover,
a.slh-front-btn:hover,
button.slh-front-btn:hover,
.slh-front-btn:hover,
.slh-front-btn-auth:hover,
.slh-front-btn-claim:hover,
.slh-front-btn-trigger-auth:hover {
	background: #4338ca !important;
	background-color: #4338ca !important;
	color: #ffffff !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 14px rgba(67, 56, 202, 0.35) !important;
	text-decoration: none !important;
}

.slh-free-download-wrap a.slh-front-btn:active,
.slh-free-download-wrap button.slh-front-btn:active,
a.slh-front-btn:active,
button.slh-front-btn:active,
.slh-front-btn:active,
.slh-front-btn-auth:active,
.slh-front-btn-claim:active,
.slh-front-btn-trigger-auth:active {
	transform: translateY(0) !important;
	box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25) !important;
}

.slh-free-download-wrap a.slh-front-btn:focus,
.slh-free-download-wrap button.slh-front-btn:focus,
.slh-free-download-wrap a.slh-front-btn:visited,
a.slh-front-btn:visited,
.slh-front-btn:focus,
.slh-front-btn:visited,
.slh-front-btn-trigger-auth:focus,
.slh-front-btn-trigger-auth:visited {
	color: #ffffff !important;
	background: #4f46e5 !important;
	background-color: #4f46e5 !important;
	text-decoration: none !important;
}

.slh-front-btn-secondary {
	background: #f1f5f9 !important;
	background-color: #f1f5f9 !important;
	color: #475569 !important;
	box-shadow: none !important;
	border: 1px solid #cbd5e1 !important;
}

.slh-front-btn-secondary:hover {
	background: #e2e8f0 !important;
	background-color: #e2e8f0 !important;
	color: #1e293b !important;
}

.slh-front-hint {
	font-size: 12px;
	color: #64748b;
	margin-top: 6px;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* Modal Backdrop */
.slh-front-modal-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(4px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

/* Modal Dialog Box */
.slh-front-modal-box {
	background: #ffffff;
	border-radius: 14px;
	width: 100%;
	max-width: 480px;
	padding: 30px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
	position: relative;
	text-align: center;
	box-sizing: border-box;
	animation: slhFrontFadeIn 0.2s ease-out;
}

@keyframes slhFrontFadeIn {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.slh-front-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	color: #94a3b8;
	cursor: pointer;
	padding: 4px 8px;
	line-height: 1;
	border-radius: 4px;
	transition: color 0.15s ease;
}

.slh-front-modal-close:hover {
	color: #0f172a;
}

.slh-front-modal-icon {
	font-size: 44px;
	margin-bottom: 12px;
}

.slh-front-modal-title {
	margin: 0 0 8px 0;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.slh-front-modal-desc {
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
	margin: 0 0 20px 0;
}

/* Key container */
.slh-front-key-container {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 16px;
	margin-bottom: 18px;
	text-align: left;
}

.slh-front-key-label {
	font-size: 11px;
	font-weight: 700;
	color: #64748b;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}

.slh-front-key-row {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #ffffff;
	border: 1px dashed #6366f1;
	border-radius: 8px;
	padding: 8px 12px;
}

.slh-front-key-row code {
	font-size: 15px;
	font-weight: 700;
	color: #4338ca;
	flex: 1;
	user-select: all;
	word-break: break-all;
	font-family: Consolas, Monaco, "Courier New", monospace;
	background: none !important;
	border: none !important;
	padding: 0 !important;
}

.slh-front-copy-btn {
	background: #eef2ff;
	color: #4338ca;
	border: 1px solid #c7d2fe;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s ease;
}

.slh-front-copy-btn:hover {
	background: #4338ca;
	color: #ffffff;
}

.slh-front-modal-footer-info {
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
	border-top: 1px solid #f1f5f9;
	padding-top: 14px;
}

.slh-front-modal-footer-info p {
	margin: 0;
}

.slh-front-my-licenses-link {
	color: #4f46e5 !important;
	font-weight: 600;
	text-decoration: underline !important;
}

/* Auth Prompt Modal Highlights */
.slh-auth-modal-highlights {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 14px 18px;
	margin: 18px 0;
	text-align: left;
}

.slh-auth-highlight-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
	padding: 7px 0;
}

.slh-auth-highlight-item:not(:last-child) {
	border-bottom: 1px dashed #e2e8f0;
}

.slh-auth-highlight-item span {
	font-size: 16px;
}

.slh-front-modal-cancel-btn {
	background: none !important;
	border: none !important;
	color: #94a3b8 !important;
	font-size: 13px !important;
	cursor: pointer !important;
	text-decoration: underline !important;
	padding: 4px 8px !important;
	box-shadow: none !important;
}

.slh-front-modal-cancel-btn:hover {
	color: #475569 !important;
}

/* ==========================================================================
   Free Software Product: Suppress WooCommerce Add to Cart & Buy Now Buttons
   ========================================================================== */

/* Hide WooCommerce standard cart forms, buttons, quantity boxes, and third-party Buy Now elements */
body.slh-free-product-page form.cart,
body.slh-free-product-page .single_add_to_cart_button,
body.slh-free-product-page .buy_now_button,
body.slh-free-product-page .buy-now-button,
body.slh-free-product-page .wc-buy-now-btn,
body.slh-free-product-page .wc-buy-now-button,
body.slh-free-product-page .quick-buy-button,
body.slh-free-product-page .quick-buy-btn,
body.slh-free-product-page .wcppec-checkout-buttons,
body.slh-free-product-page .quantity,
body.slh-free-product-page div.quantity,
.product.slh-free-product-page form.cart,
.product.slh-free-product-page .single_add_to_cart_button,
.product.slh-free-product-page .buy_now_button,
.product.slh-free-product-page .buy-now-button,
.product.slh-free-product-page .wc-buy-now-btn,
.product.slh-free-product-page .wc-buy-now-button,
.product.slh-free-product-page .quick-buy-button,
.product.slh-free-product-page .quick-buy-btn,
.product.slh-free-product-page .wcppec-checkout-buttons,
.product.slh-free-product-page .quantity,
.product.slh-free-product-page div.quantity {
	display: none !important;
}

/* Free badge styling in loop and product header */
.slh-price-free-badge {
	color: #059669 !important;
	font-weight: 700 !important;
	background: #ecfdf5;
	padding: 3px 10px;
	border-radius: 6px;
	font-size: 0.9em;
	display: inline-block;
	border: 1px solid #a7f3d0;
}

/* Loop Free Download button */
.slh-loop-btn {
	background: #4f46e5 !important;
	color: #ffffff !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	display: inline-block;
	padding: 8px 16px;
	transition: background 0.15s ease;
}

.slh-loop-btn:hover {
	background: #4338ca !important;
	color: #ffffff !important;
}

/* Woo Free action box container */
.slh-woo-free-action-box {
	margin: 18px 0;
	padding: 4px 0;
}
