/**
 * Klasskontot Public Styles
 */

/* Container and General Layout */
.cs-shop-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #333333;
}

/* Ensure all elements within shop container have good contrast */
.cs-shop-container * {
	color: inherit;
}

.cs-announcement {
	background-color: #f0f6fc;
	padding: 15px 20px;
	margin-bottom: 30px;
	border-radius: 8px;
	font-size: 15px;
	text-align: center;
	border: 1px solid #e2e8f0;
	color: #333333;
}

/* Shop Header */
.cs-shop-header {
	text-align: center;
	margin-bottom: 40px;
}

.cs-shop-title {
	font-size: 2.5em;
	color: #333333;
	margin-bottom: 15px;
	font-weight: 700;
}

.cs-shop-description {
	font-size: 1.1em;
	color: #666666;
	max-width: 800px;
	margin: 0 auto;
	line-height: 1.6;
}

/* Product Grid */
.cs-products {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
	justify-content: center;
	width: 100%;
}

.cs-product {
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.cs-product:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cs-product-image {
	position: relative;
	margin: -20px -20px 20px -20px;
	border-radius: 12px 12px 0 0;
	overflow: hidden;
	background: #f7fafc;
	padding-bottom: 75%; /* 4:3 Aspect Ratio (3/4 = 0.75) */
}

.cs-product-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cs-product-title {
	font-size: 1.25em;
	margin: 0 0 12px;
	color: #333333;
	font-weight: 600;
}

.cs-product-description {
	font-size: 0.95em;
	color: #666666;
	margin-bottom: 20px;
	line-height: 1.5;
	flex-grow: 1;
}

.cs-product-price {
	font-weight: 700;
	font-size: 1.2em;
	margin-bottom: 20px;
	color: #333333;
}

.cs-product-actions {
	display: flex;
	gap: 10px;
	align-items: center;
}

.cs-product-quantity {
	width: 70px;
	padding: 8px;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 0.95em;
	color: #333333;
	background-color: #ffffff;
}

.cs-add-to-cart {
	flex-grow: 1;
	background-color: #0073aa;
	color: white;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
	font-size: 0.95em;
	transition: all 0.2s ease;
}

.cs-add-to-cart:hover {
	background-color: #005d8c;
	transform: translateY(-1px);
}

/* Cart Section */
.cs-cart {
	background: #ffffff;
	border-radius: 12px;
	padding: 25px;
	margin: 40px 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	border: 1px solid #e2e8f0;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
	display: block;
	float: none;
	clear: both;
}

.cs-cart-header,
.cs-cart h2 {
	font-size: 1.5em;
	margin: 0 0 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #e2e8f0;
	color: #333333;
	font-weight: 600;
	text-align: left;
}

.cs-cart-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 0;
	border-bottom: 1px solid #e2e8f0;
}

.cs-cart-item:last-child {
	border-bottom: none;
}

.cs-cart-item-name {
	flex: 1;
	font-weight: 500;
	color: #333333;
}

.cs-cart-item-quantity {
	margin: 0 20px;
}

.cs-cart-item-quantity input {
	width: 60px;
	padding: 5px;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	text-align: center;
	color: #333333;
	background-color: #ffffff;
}

.cs-cart-item-price {
	margin: 0 20px;
	font-weight: 600;
	color: #333333;
}

.cs-cart-item-remove {
	background: none;
	border: none;
	color: #e53e3e;
	cursor: pointer;
	font-size: 1.2em;
	padding: 5px;
	transition: color 0.2s ease;
}

.cs-cart-item-remove:hover {
	color: #c53030;
}

.cs-cart-total {
	font-size: 1.2em;
	font-weight: 700;
	text-align: right;
	margin-top: 20px;
	color: #333333;
	padding-top: 15px;
	border-top: 2px solid #e2e8f0;
}

.cs-cart-empty {
	text-align: center;
	padding: 30px;
	color: #666666;
	font-size: 1.1em;
}

/* Checkout Form */
.cs-checkout {
	background: #ffffff;
	border-radius: 12px;
	padding: 30px;
	margin: 40px 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
	border: 1px solid #e2e8f0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	display: block;
	float: none;
	clear: both;
}

.cs-checkout-header {
	font-size: 1.5em;
	margin: 0 0 25px;
	color: #333333;
	font-weight: 600;
}

.cs-form-row {
	margin-bottom: 20px;
}

.cs-form-row label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333333;
}

.cs-form-row input,
.cs-form-row select,
.cs-form-row textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 1em;
	color: #333333;
	background-color: #ffffff;
	transition: border-color 0.2s ease;
}

.cs-form-row input:focus,
.cs-form-row select:focus,
.cs-form-row textarea:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.cs-form-row textarea {
	height: 120px;
	resize: vertical;
}

.cs-form-required {
	color: #e53e3e;
	margin-left: 3px;
}

.cs-checkout-button {
	background-color: #0073aa;
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 50px;
	cursor: pointer;
	font-size: 1.1em;
	font-weight: 600;
	width: 100%;
	transition: all 0.2s ease;
}

.cs-checkout-button:hover {
	background-color: #005d8c;
	transform: translateY(-1px);
}

/* Messages */
.cs-checkout-error {
	color: #c53030;
	margin-bottom: 20px;
	padding: 15px;
	background-color: #fff5f5;
	border: 1px solid #feb2b2;
	border-radius: 8px;
	font-weight: 500;
}

.cs-checkout-success {
	color: #2f855a;
	margin-bottom: 20px;
	padding: 15px;
	background-color: #f0fff4;
	border: 1px solid #9ae6b4;
	border-radius: 8px;
	font-weight: 500;
}

/* Fix for browser extension interference (LastPass, etc.) */
.cs-checkout-form [data-lastpass-icon-root],
.cs-checkout-form [data-lastpass-root],
.cs-checkout-form [data-1password-root],
.cs-checkout-form [data-bitwarden-watching] {
	display: none !important;
	position: absolute !important;
	visibility: hidden !important;
	pointer-events: none !important;
	z-index: -1 !important;
}

.cs-form-row {
	position: relative;
	overflow: hidden;
}

/* Order Confirmation Page - Simple & Clean */
.cs-order-confirmation {
	max-width: 600px;
	margin: 40px auto;
	padding: 30px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cs-order-confirmation-header {
	text-align: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #48bb78; /* Will be overridden by dynamic color */
}

.cs-order-confirmation-header h1 {
	color: #48bb78; /* Will be overridden by dynamic color */
	font-size: 28px;
	margin: 0;
}

/* Removed emoji before - now using inline emoji */

.cs-order-confirmation-message {
	margin-bottom: 30px;
}

.cs-order-confirmation-message p {
	font-size: 16px;
	line-height: 1.6;
	color: #4a5568;
	margin: 0 0 10px 0;
}

.cs-order-confirmation-details {
	background: #f7fafc;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 30px;
}

.cs-order-confirmation-details h2 {
	font-size: 20px;
	margin: 0 0 15px 0;
	color: #2d3748;
}

.cs-order-detail {
	padding: 10px 0;
	border-bottom: 1px solid #e2e8f0;
}

.cs-order-detail:last-child {
	border-bottom: none;
}

.cs-order-detail strong {
	color: #718096;
}

/* Order items list */
.cs-order-items {
	padding: 10px 0 10px 20px;
	margin-bottom: 10px;
}

.cs-order-item {
	padding: 5px 0;
	color: #4a5568;
}

/* Total amount - make it stand out */
.cs-order-total {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 2px solid #e2e8f0;
	font-size: 18px;
}

/* Thank you message emphasis */
.cs-thank-you-main {
	font-size: 18px;
	line-height: 1.6;
	color: #2d3748;
	margin-bottom: 15px;
}

.cs-order-confirmation-actions {
	text-align: center;
}

.cs-order-confirmation-actions .cs-button {
	display: inline-block;
	padding: 12px 30px;
	background: #48bb78; /* Will be overridden by dynamic color */
	color: white;
	text-decoration: none;
	border-radius: 5px;
	font-weight: 600;
	transition: background 0.3s ease;
}

.cs-order-confirmation-actions .cs-button:hover {
	background: #38a169; /* Will be overridden by dynamic color */
}

/* Responsive Design */
@media screen and (max-width: 768px) {
	.cs-products {
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
		gap: 20px;
	}

	/* Product image already responsive with padding-bottom technique */

	.cs-cart-item {
		flex-wrap: wrap;
		gap: 10px;
	}

	.cs-cart-item-name {
		flex: 0 0 100%;
	}

	.cs-cart-item-quantity,
	.cs-cart-item-price {
		margin: 0 10px;
	}

	.cs-checkout {
		padding: 20px;
	}
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.cs-shop-container {
		background-color: #1a202c;
		color: #e2e8f0;
	}

	.cs-product,
	.cs-cart,
	.cs-checkout {
		background-color: #2d3748;
		border-color: #4a5568;
	}

	.cs-shop-title,
	.cs-product-title {
		color: #f7fafc;
	}

	.cs-product-description,
	.cs-shop-description {
		color: #cbd5e0;
	}

	.cs-form-row label {
		color: #e2e8f0;
	}

	.cs-form-row input,
	.cs-form-row select,
	.cs-form-row textarea {
		background-color: #2d3748;
		border-color: #4a5568;
		color: #e2e8f0;
	}

	.cs-cart-item {
		border-color: #4a5568;
	}
}

/* Admin/Owner notice for closed shops */
.cs-admin-notice {
	background-color: #f8d7da;
	color: #721c24;
	padding: 15px;
	margin-bottom: 20px;
	border: 1px solid #f5c6cb;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.cs-admin-notice strong {
	font-weight: 700;
}