/**
 * JNB Ordering System - Public Frontend Styles
 *
 * @package    JNB_Ordering
 * @subpackage JNB_Ordering/public/css
 */

/* Reset & Base */
.jnb-order-form-wrapper {
	/* max-width: 900px; */
	/* margin: 40px auto; */
	padding: 20px;
}

.jnb-order-form-wrapper * {
	box-sizing: border-box;
}

/* Step Header */
.jnb-step-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
}

.jnb-step-header h2 {
	margin: 0;
	color: #2c5f2d;
}

.jnb-header-buttons {
	display: flex;
	gap: 10px;
	align-items: center;
}

/* Buttons */
.jnb-btn {
	display: inline-block !important;
	padding: 12px 24px !important;
	border: none !important;
	border-radius: 4px !important;
	font-size: 16px !important;
	cursor: pointer !important;
	transition: all 0.3s ease !important;
	text-align: center !important;
	text-decoration: none !important;
}

.jnb-btn-primary {
	background: #2c5f2d !important;
	color: white !important;
}

.jnb-btn-primary:hover {
	background: #1e4420 !important;
}

.jnb-btn-secondary {
	background: #6c757d !important;
	color: white !important;
}

.jnb-btn-secondary:hover {
	background: #5a6268 !important;
}

.jnb-btn-back {
	background: #f8f9fa !important;
	color: #333 !important;
	/* padding: 8px 16px !important; */
	font-size: 14px !important;
}

.jnb-btn-large {
	width: 100%;
	padding: 20px;
	font-size: 18px;
	margin: 10px 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.jnb-btn-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 8px;
}

.jnb-btn-icon svg {
	display: block;
}

.jnb-btn-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
}

.jnb-btn-text small {
	font-size: 0.8em;
	opacity: 0.9;
	font-weight: normal;
}

/* Progress Bar */
.jnb-progress-bar {
	width: 100%;
	height: 4px;
	background: #e9ecef;
	border-radius: 2px;
	margin: 20px 0;
	overflow: hidden;
}

.jnb-progress {
	height: 100%;
	background: #2c5f2d;
	transition: width 0.3s ease;
}

/* Delivery Info Section */
.jnb-delivery-section {
	display: flex;
	align-items: center;
	gap: 30px;
	background: linear-gradient(135deg, #f0f7f0 0%, #e8f5e9 100%);
	border: 1px solid #c8e6c9;
	border-radius: 12px;
	padding: 30px;
	margin-bottom: 36px;
}

.jnb-delivery-section-image {
	flex: 0 0 auto;
	max-width: 320px;
}

.jnb-delivery-section-image img {
	width: 100%;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.jnb-delivery-section-content {
	flex: 1 1 auto;
}

.jnb-delivery-section-content h2 {
	color: #2c5f2d;
	font-size: 24px;
	margin: 0 0 12px 0;
}

.jnb-delivery-section-text {
	color: #555;
	font-size: 15px;
	line-height: 1.6;
}

.jnb-delivery-section-text p {
	margin: 0 0 8px 0;
}

.jnb-delivery-section-text p:last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.jnb-delivery-section {
		flex-direction: column;
		text-align: center;
		padding: 20px;
	}

	.jnb-delivery-section-image {
		max-width: 100%;
	}
}

/* Welcome Screen */
.jnb-welcome {
	text-align: center;
	margin-bottom: 40px;
}

.jnb-welcome h2 {
	color: #2c5f2d;
	font-size: 28px;
	margin-bottom: 10px;
}

.jnb-welcome p {
	color: #666;
	font-size: 16px;
	margin: 0 0 6px 0;
}

.jnb-choice-buttons {
	display: flex;
	flex-direction: row;
	gap: 24px;
	max-width: 700px;
	margin: 0 auto;
	justify-content: center;
}

.jnb-choice-buttons .jnb-btn-large {
	flex: 1;
	max-width: 320px;
	flex-direction: column;
	padding: 40px 30px !important;
	border-radius: 16px !important;
	border: 2px solid transparent !important;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease !important;
	margin: 0;
}

.jnb-choice-buttons .jnb-btn-large:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.jnb-choice-buttons .jnb-btn-primary {
	background: #2c5f2d !important;
}

.jnb-choice-buttons .jnb-btn-primary:hover {
	background: #1e4420 !important;
}

.jnb-choice-buttons .jnb-btn-secondary {
	background: white !important;
	color: #2c5f2d !important;
	border: 2px solid #2c5f2d !important;
}

.jnb-choice-buttons .jnb-btn-secondary:hover {
	background: #f0f7f0 !important;
}

.jnb-choice-buttons .jnb-btn-text {
	align-items: center;
	text-align: center;
}

.jnb-choice-buttons .jnb-btn-text strong {
	font-size: 20px;
	margin-bottom: 6px;
}

.jnb-choice-buttons .jnb-btn-secondary .jnb-btn-text strong,
.jnb-choice-buttons .jnb-btn-secondary .jnb-btn-text small {
	color: #2c5f2d !important;
}

.jnb-choice-buttons .jnb-btn-text small {
	font-size: 14px;
	opacity: 0.8;
}

/* Products Grid */
.jnb-products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	margin: 20px 0;
}

.jnb-product-card {
	background: white;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.jnb-product-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	transform: translateY(-4px);
}

/* Image Section */
.jnb-product-card .jnb-product-image {
	width: 100%;
	height: 240px;
	background: linear-gradient(135deg, #d3d3d3 0%, #dddddd 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	position: relative;
	overflow: hidden;
}

.jnb-product-card .jnb-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Content Section */
.jnb-product-card .jnb-card-content {
	padding: 20px;
	background: white;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.jnb-product-card h4 {
	margin: 0 0 12px 0;
	color: #2c5f2d;

	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.jnb-product-card .jnb-category {
	display: inline-block;
	background: #f0f0f0;
	color: #666;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	/* margin-bottom: 12px; */
}

.jnb-product-card p {
	font-size: 13px;
	color: #666;
	line-height: 1.5;
	margin: 0 0 12px 0;
	flex: 1;
}

.jnb-product-card p small {
	color: #999;
	font-size: 12px;
}

.jnb-product-card .jnb-price {
	font-size: 24px;
	font-weight: 800;
	color: #1a1a1a;
	margin: 16px 0 12px 0;
	letter-spacing: -0.5px;
}

.jnb-product-card .jnb-btn-primary {
	width: 100%;
	margin: 0;
	padding: 14px 24px !important;
	font-weight: 600 !important;
	border-radius: 12px !important;
	font-size: 15px !important;
}

/* Question Options */
.jnb-question {
	margin: 30px 0;
}

.jnb-question h3 {
	text-align: center;
	color: #2c5f2d;
	margin-bottom: 30px;
}

.jnb-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin: 20px 0;
}

.jnb-option-btn {
	background: white;
	border: 2px solid #dee2e6;
	border-radius: 8px;
	padding: 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	position: relative;
}

.jnb-option-btn:hover {
	border-color: #2c5f2d;
	background: #f8f9fa;
}

.jnb-option-btn strong {
	display: block;
	color: #2c5f2d;
	margin-bottom: 5px;
}

.jnb-option-btn small {
	display: block;
	color: #666;
	font-size: 12px;
}

.jnb-option-btn.loading {
	opacity: 0.6;
	pointer-events: none;
}

.jnb-option-btn.loading::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	top: 50%;
	left: 50%;
	margin-left: -10px;
	margin-top: -10px;
	border: 2px solid #f3f3f3;
	border-top-color: #2c5f2d;
	border-radius: 50%;
	animation: jnb-spin 0.6s linear infinite;
}

/* Forms */
.jnb-form {
	background: white;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.jnb-form-section {
	margin-bottom: 30px;
}

.jnb-form-section h3 {
	color: #2c5f2d;
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 2px solid #e9ecef;
}

.jnb-form-group {
	margin-bottom: 20px;
}

.jnb-form-group label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

.jnb-form-group .required {
	color: #dc3545;
}

.jnb-input {
	width: 100% !important;
	padding: 6px !important;
	border: 1px solid #ced4da !important;
	border-radius: 4px !important;
	font-size: 15px !important;
	color: #4e4e4e !important;
}

.jnb-input:focus {
	outline: none !important;
	border-color: #2c5f2d !important;
	box-shadow: 0 0 0 3px rgba(44, 95, 45, 0.1) !important;
}

.jnb-form-row {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 15px;
}

/* Autocomplete */
.jnb-autocomplete-suggestions {
	position: absolute;
	background: white;
	/* border: 1px solid #ced4da; */
	border-top: none;
	max-height: 200px;
	overflow-y: auto;
	z-index: 1000;
	width: 70%;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.jnb-suggestion-item {
	padding: 10px;
	cursor: pointer;
}

.jnb-suggestion-item:hover {
	background: #f8f9fa;
}

.jnb-area-info {
	margin-top: 10px;
	padding: 10px;
	background: #d4edda;
	border-left: 4px solid #28a745;
	color: #155724;
	border-radius: 4px;
}

.jnb-date-status {
	margin-top: 8px;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
}

.jnb-date-status.jnb-date-available {
	background: #d4edda;
	border-left: 4px solid #28a745;
	color: #155724;
}

.jnb-date-status.jnb-date-unavailable {
	background: #f8d7da;
	border-left: 4px solid #dc3545;
	color: #721c24;
}

/* Review Section */
.jnb-review-section {
	background: white;
	padding: 20px;
	margin-bottom: 20px;
	border-radius: 8px;
	border: 1px solid #dee2e6;
}

.jnb-review-section h3 {
	color: #2c5f2d;
	margin-bottom: 15px;
}

.jnb-pricing-section {
	background: #f8f9fa;
}

.jnb-delivery-info {
	background: #fff8e1;
	border-color: #ffcc02;
	border-left: 4px solid #ffcc02;
}

.jnb-delivery-info p {
	color: #5d4e00;
	font-size: 0.9em;
	line-height: 1.6;
	margin: 0;
}

.jnb-price-row {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid #dee2e6;
}

.jnb-price-row.total {
	font-size: 1.2em;
	font-weight: bold;
	color: #2c5f2d;
	border-bottom: none;
	padding-top: 15px;
}

/* Terms */
.jnb-terms {
	background: #fff3cd;
	padding: 15px;
	border-radius: 4px;
	margin: 20px 0;
}

/* Confirmation */
.jnb-step-confirmation {
	text-align: center;
	padding: 40px 20px;
}

.jnb-success-icon {
	width: 80px;
	height: 80px;
	background: #28a745;
	color: white;
	font-size: 50px;
	line-height: 80px;
	border-radius: 50%;
	margin: 0 auto 20px;
}

.jnb-confirmation-box {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
	display: inline-block;
	text-align: left;
}

/* Loading */
#jnb-order-container {
	position: relative;
	min-height: 300px;
	transition: opacity 0.2s ease;
}

#jnb-order-container.jnb-loading {
	opacity: 0.6;
	pointer-events: none;
}

#jnb-order-container.jnb-loading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #2c5f2d;
	border-radius: 50%;
	animation: jnb-spin 0.8s linear infinite;
	z-index: 1000;
}

@keyframes jnb-spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Button loading state */
.jnb-btn.loading {
	position: relative;
	color: transparent !important;
	pointer-events: none;
}

.jnb-btn.loading::after {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	top: 50%;
	left: 50%;
	margin-left: -8px;
	margin-top: -8px;
	border: 2px solid transparent;
	border-top-color: white;
	border-radius: 50%;
	animation: jnb-spin 0.6s linear infinite;
}

/* Input loading state (for suburb autocomplete) */
.jnb-input-wrapper {
	position: relative;
}

.jnb-input-wrapper.loading::after {
	content: '';
	position: absolute;
	right: 12px;
	top: 50%;
	margin-top: -8px;
	width: 16px;
	height: 16px;
	border: 2px solid #ccc;
	border-top-color: #2c5f2d;
	border-radius: 50%;
	animation: jnb-spin 0.6s linear infinite;
}

/* Responsive */
@media (max-width: 768px) {
	.jnb-order-form-wrapper {
		padding: 10px;
	}

	.jnb-products-grid {
		grid-template-columns: 1fr;
	}

	.jnb-options {
		grid-template-columns: 1fr;
	}

	.jnb-form-row {
		grid-template-columns: 1fr;
	}

	.jnb-choice-buttons {
		flex-direction: column;
		align-items: center;
	}

	.jnb-choice-buttons .jnb-btn-large {
		max-width: 100%;
		padding: 30px 24px !important;
	}

	.jnb-btn-large {
		font-size: 16px;
	}
}