/**
 * Simple Offer Showcase - Frontend Styles
 *
 * Simplified grid and card styling for freemium version
 * Version: 1.0.0
 */

/* ==========================================================================
	CSS VARIABLES
	========================================================================== */

:root {
	/* Core Colors - overridden by admin settings */
	--easypanel-offer-showcase-primary-color: #007bff;
	--easypanel-offer-showcase-secondary-color: #6c757d;
	--easypanel-offer-showcase-text-color: #333333;

	/* Badge & Bestseller - overridden by admin settings */
	--easypanel-offer-showcase-badge-color: #f39c12;
	--easypanel-offer-showcase-bestseller-border-color: #f39c12;
	--easypanel-offer-showcase-bestseller-border-width: 2px;

	/* Layout */
	--easypanel-offer-showcase-border-radius: 8px;
	--easypanel-offer-showcase-transition: all 0.3s ease;
	--easypanel-offer-showcase-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	--easypanel-offer-showcase-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
	GRID LAYOUT
	========================================================================== */

.easypanel-offer-showcase-offers-wrapper {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
}

.easypanel-offer-showcase-offers-grid {
	display: grid;
	gap: 20px;
	width: 100%;
	margin: 0 auto;
	padding: 0 15px;
	box-sizing: border-box;
}

/* Column configurations */
.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-1 {
	grid-template-columns: 1fr;
	max-width: 800px;
}

.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-2 {
	grid-template-columns: repeat(2, 1fr);
	max-width: 1200px;
}

.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-3 {
	grid-template-columns: repeat(3, 1fr);
	max-width: 1400px;
}

.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-4 {
	grid-template-columns: repeat(4, 1fr);
	max-width: none;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
	.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-4,
	.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-4,
	.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-3,
	.easypanel-offer-showcase-offers-grid.easypanel-offer-showcase-columns-2 {
		grid-template-columns: 1fr;
	}

	.easypanel-offer-showcase-offers-grid {
		padding: 0 10px;
		gap: 15px;
	}
}

/* ==========================================================================
	OFFER CARD
	========================================================================== */

.easypanel-offer-showcase-offer-card {
	background: #ffffff;
	border: 1px solid #e1e1e1;
	border-radius: var(--easypanel-offer-showcase-border-radius);
	padding: 25px 20px;
	position: relative;
	transition: var(--easypanel-offer-showcase-transition);
	box-shadow: var(--easypanel-offer-showcase-shadow);
	display: flex;
	flex-direction: column;
	height: 95%;
}

.easypanel-offer-showcase-offer-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--easypanel-offer-showcase-shadow-hover);
	border-color: var(--easypanel-offer-showcase-primary-color);
}

/* Bestseller card - customizable border from settings */
.easypanel-offer-showcase-offer-card.easypanel-offer-showcase-bestseller {
	border-width: var(--easypanel-offer-showcase-bestseller-border-width);
	border-color: var(--easypanel-offer-showcase-bestseller-border-color);
	border-style: solid;
	position: relative;
}

/* ==========================================================================
	SUPERTITLE
	========================================================================== */

.easypanel-offer-showcase-supertitle {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--easypanel-offer-showcase-secondary-color);
	margin-bottom: 10px;
}

/* ==========================================================================
	BADGE
	========================================================================== */

.easypanel-offer-showcase-badge {
	position: absolute;
	top: -10px;
	right: 20px;
	padding: 5px 15px;
	border-radius: 15px;
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
	color: #ffffff;
	background-color: var(--easypanel-offer-showcase-badge-color);
	letter-spacing: 0.5px;
	z-index: 2;
}

/* ==========================================================================
	OFFER IMAGE
	========================================================================== */

.easypanel-offer-showcase-offer-image {
	width: 100%;
	margin-bottom: 20px;
	border-radius: var(--easypanel-offer-showcase-border-radius);
	overflow: hidden;
}

.easypanel-offer-showcase-offer-image img.easypanel-offer-showcase-thumbnail {
	width: 100%;
	height: auto;
	display: block;
	transition: var(--easypanel-offer-showcase-transition);
}

.easypanel-offer-showcase-offer-card:hover .easypanel-offer-showcase-offer-image img.easypanel-offer-showcase-thumbnail {
	transform: scale(1.05);
}

/* ==========================================================================
	OFFER CONTENT
	========================================================================== */

.easypanel-offer-showcase-offer-content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.easypanel-offer-showcase-offer-title {
	font-size: 1.5em;
	font-weight: 700;
	margin: 0 0 15px 0;
	line-height: 1.3;
	color: var(--easypanel-offer-showcase-text-color);
}

.easypanel-offer-showcase-offer-price {
	font-size: 2em;
	font-weight: 700;
	margin: 0 0 15px 0;
	color: var(--easypanel-offer-showcase-primary-color);
	display: flex;
	align-items: baseline;
	gap: 5px;
}

.easypanel-offer-showcase-price-amount {
	font-size: 1em;
}

.easypanel-offer-showcase-price-currency {
	font-size: 0.6em;
	font-weight: 600;
	color: var(--easypanel-offer-showcase-secondary-color);
}

.easypanel-offer-showcase-offer-description {
	font-size: 0.95em;
	line-height: 1.6;
	color: #666;
	margin: 0 0 20px 0;
}

.easypanel-offer-showcase-offer-description p {
	margin: 0 0 10px 0;
}

.easypanel-offer-showcase-offer-description p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
	OFFER BUTTON
	========================================================================== */

.easypanel-offer-showcase-offer-button {
	display: block;
	width: 100%;
	padding: 14px 24px;
	background-color: var(--easypanel-offer-showcase-primary-color);
	color: #ffffff;
	text-align: center;
	text-decoration: none;
	border-radius: var(--easypanel-offer-showcase-border-radius);
	font-weight: 600;
	font-size: 1em;
	letter-spacing: 0.5px;
	transition: var(--easypanel-offer-showcase-transition);
	border: none;
	cursor: pointer;
	margin-top: 20px;
	box-sizing: border-box;
}

.easypanel-offer-showcase-offer-button:hover {
	background-color: var(--easypanel-offer-showcase-secondary-color);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	color: #ffffff;
	text-decoration: none;
}

.easypanel-offer-showcase-offer-button:active {
	transform: translateY(0);
}

/* ==========================================================================
	EMPTY STATE
	========================================================================== */

.easypanel-offer-showcase-empty-state {
	text-align: center;
	padding: 60px 20px;
	background: #f8f9fa;
	border-radius: var(--easypanel-offer-showcase-border-radius);
	margin: 20px auto;
	max-width: 600px;
}

.easypanel-offer-showcase-empty-icon {
	font-size: 4em;
	margin-bottom: 20px;
	opacity: 0.5;
}

.easypanel-offer-showcase-empty-state h3 {
	font-size: 1.5em;
	color: var(--easypanel-offer-showcase-text-color);
	margin: 0 0 10px 0;
}

.easypanel-offer-showcase-empty-state p {
	font-size: 1em;
	color: #666;
	margin: 0 0 25px 0;
	line-height: 1.6;
}

.easypanel-offer-showcase-add-offer-link {
	display: inline-block;
	padding: 12px 24px;
	background: var(--easypanel-offer-showcase-primary-color);
	color: #ffffff;
	text-decoration: none;
	border-radius: var(--easypanel-offer-showcase-border-radius);
	font-weight: 600;
	transition: var(--easypanel-offer-showcase-transition);
}

.easypanel-offer-showcase-add-offer-link:hover {
	background: var(--easypanel-offer-showcase-secondary-color);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	color: #ffffff;
	text-decoration: none;
}

/* ==========================================================================
	PRICE OPTIONS
	========================================================================== */

.easypanel-offer-showcase-price-options {
	margin: 20px 0;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 6px;
	border: 1px solid #e1e1e1;
}

.easypanel-offer-showcase-options-label {
	font-weight: 600;
	font-size: 0.95em;
	color: var(--easypanel-offer-showcase-text-color);
	margin-bottom: 10px;
}

.easypanel-offer-showcase-option-item {
	display: flex;
	align-items: center;
	padding: 8px 0;
	cursor: pointer;
	user-select: none;
}

.easypanel-offer-showcase-option-item:hover {
	background: rgba(0, 115, 170, 0.05);
}

.easypanel-offer-showcase-price-option-checkbox {
	margin-right: 10px;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.easypanel-offer-showcase-option-text {
	font-size: 0.95em;
	color: #333;
}

.easypanel-offer-showcase-option-price {
	color: var(--easypanel-offer-showcase-primary-color);
	font-weight: 600;
	margin-left: 5px;
}

.easypanel-offer-showcase-final-price-container {
	margin: 20px 0;
	padding: 15px;
	background: #e3f2fd;
	border-radius: 6px;
	border: 2px solid var(--easypanel-offer-showcase-primary-color);
}

.easypanel-offer-showcase-final-price-label {
	font-size: 0.9em;
	color: #666;
	margin-bottom: 5px;
}

.easypanel-offer-showcase-final-price {
	font-size: 2.2em;
	font-weight: 700;
	color: var(--easypanel-offer-showcase-primary-color);
	display: flex;
	align-items: baseline;
	gap: 5px;
}

.easypanel-offer-showcase-final-price-amount {
	font-size: 1em;
}

.easypanel-offer-showcase-final-price-currency {
	font-size: 0.6em;
	font-weight: 600;
	color: var(--easypanel-offer-showcase-secondary-color);
}

/* ==========================================================================
	MOBILE OPTIMIZATIONS
	========================================================================== */

@media (max-width: 768px) {
	.easypanel-offer-showcase-offer-card {
		padding: 20px 15px;
	}

	.easypanel-offer-showcase-offer-title {
		font-size: 1.3em;
	}

	.easypanel-offer-showcase-offer-price {
		font-size: 1.8em;
	}

	.easypanel-offer-showcase-offer-button {
		padding: 12px 20px;
		font-size: 0.95em;
	}

	.easypanel-offer-showcase-badge {
		top: -8px;
		right: 15px;
		padding: 4px 12px;
		font-size: 10px;
	}
}

/* ==========================================================================
	FORM STYLES
	========================================================================== */

.easypanel-offer-showcase-form-wrapper {
	display: none;
	margin: 80px auto 0;
	max-width: 600px;
	padding: 0 15px;
	position: relative;
	z-index: 1;
}

.easypanel-offer-showcase-simple-form {
	background: #ffffff;
	border: 1px solid #e1e1e1;
	border-radius: var(--easypanel-offer-showcase-border-radius);
	padding: 30px;
	box-shadow: var(--easypanel-offer-showcase-shadow);
}

.easypanel-offer-showcase-simple-form h3 {
	margin: 0 0 25px;
	color: var(--easypanel-offer-showcase-text-color);
	font-size: 1.5em;
	text-align: center;
}

.easypanel-offer-showcase-form-row {
	margin-bottom: 20px;
}

.easypanel-offer-showcase-form-field {
	display: block;
	width: 100%;
}

.easypanel-offer-showcase-form-label {
	display: block;
	margin-bottom: 8px;
	color: var(--easypanel-offer-showcase-text-color);
	font-weight: 500;
	font-size: 0.95em;
}

.easypanel-offer-showcase-form-input {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 1em;
	font-family: inherit;
	transition: var(--easypanel-offer-showcase-transition);
	box-sizing: border-box;
}

.easypanel-offer-showcase-form-input:focus {
	outline: none;
	border-color: var(--easypanel-offer-showcase-primary-color);
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.easypanel-offer-showcase-form-input:invalid:not(:placeholder-shown) {
	border-color: #dc3545;
}

.easypanel-offer-showcase-form-actions {
	margin-top: 25px;
	text-align: center;
}

.easypanel-offer-showcase-form-submit {
	background: var(--easypanel-offer-showcase-primary-color);
	color: #ffffff;
	border: none;
	padding: 14px 40px;
	font-size: 1em;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: var(--easypanel-offer-showcase-transition);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.easypanel-offer-showcase-form-submit:hover {
	background: var(--easypanel-offer-showcase-secondary-color);
	transform: translateY(-2px);
	box-shadow: var(--easypanel-offer-showcase-shadow-hover);
}

.easypanel-offer-showcase-form-submit:active {
	transform: translateY(0);
}

.easypanel-offer-showcase-form-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.easypanel-offer-showcase-form-message {
	display: none;
	margin-top: 20px;
	padding: 15px;
	border-radius: 6px;
	text-align: center;
}

.easypanel-offer-showcase-form-message p {
	margin: 0;
}

.easypanel-offer-showcase-form-message--success {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.easypanel-offer-showcase-form-message--error {
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Mobile responsive */
@media (max-width: 768px) {
	.easypanel-offer-showcase-form-wrapper {
		margin-top: 30px;
	}

	.easypanel-offer-showcase-simple-form {
		padding: 20px;
	}

	.easypanel-offer-showcase-simple-form h3 {
		font-size: 1.3em;
	}

	.easypanel-offer-showcase-form-input {
		padding: 10px 12px;
	}

	.easypanel-offer-showcase-form-submit {
		width: 100%;
		padding: 12px 20px;
	}
}
