/*!
 * Storzen — Quick Checkout
 */

/* ════════════════════════════════════════════════════════════════════════
 * Buy Now button
 * ════════════════════════════════════════════════════════════════════════ */
.storzen-qc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: #f59e0b;
	color: #fff;
	border: 0;
	padding: 10px 22px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	font-family: inherit;
	transition: background .15s ease, transform .12s ease, box-shadow .15s ease;
	line-height: 1.3;
}
.storzen-qc-btn:hover {
	background: #d97706;
	box-shadow: 0 4px 12px rgba(245, 158, 11, .3);
}
.storzen-qc-btn:active { transform: scale(.97); }
.storzen-qc-btn:focus-visible {
	outline: 2px solid #f59e0b;
	outline-offset: 2px;
}
.storzen-qc-btn:disabled {
	opacity: .55;
	cursor: not-allowed;
}
.storzen-qc-btn__icon { font-size: 15px; line-height: 1; }

/* Single product context: inline next to ATC */
.storzen-qc-btn--single {
	margin-left: 10px;
	vertical-align: middle;
}

/* Loop context: circle icon — matches Quick View / Wishlist / Compare buttons */
.storzen-qc-btn--loop {
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	background: #fff;
	color: #111;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
	font-size: 0;
}
.storzen-qc-btn--loop:hover {
	background: var(--storzen-theme, #FF3636);
	color: #fff;
	box-shadow: 0 4px 12px rgba(255,54,54,.3);
}
.storzen-qc-btn--loop .storzen-qc-btn__icon {
	font-size: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Replace ATC mode (CSS-only): hide WC's own button on single product */
body.storzen-qc-replace-atc .single_add_to_cart_button {
	display: none !important;
}
body.storzen-qc-replace-atc .storzen-qc-btn--single {
	margin-left: 0;
}

/* Variable product fallback styling */
.storzen-qc-btn--variable {
	background: #6b7280;
}
.storzen-qc-btn--variable:hover { background: #4b5563; box-shadow: none; }

/* ════════════════════════════════════════════════════════════════════════
 * Modal
 * ════════════════════════════════════════════════════════════════════════ */
.storzen-qc-modal {
	position: fixed;
	inset: 0;
	z-index: 9997;
	pointer-events: none;
	visibility: hidden;
}
.storzen-qc-modal.is-open {
	pointer-events: auto;
	visibility: visible;
}
.storzen-qc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	opacity: 0;
	transition: opacity .25s ease;
}
.storzen-qc-modal.is-open .storzen-qc-modal__overlay { opacity: 1; }
.storzen-qc-modal__panel {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(.94);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
	width: 92vw;
	max-width: 540px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .25s ease;
}
.storzen-qc-modal.is-open .storzen-qc-modal__panel {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
}
.storzen-qc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #f3f4f6;
}
.storzen-qc-modal__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}
.storzen-qc-modal__close {
	background: transparent;
	border: 0;
	width: 32px;
	height: 32px;
	font-size: 24px;
	color: #6b7280;
	cursor: pointer;
	border-radius: 6px;
}
.storzen-qc-modal__close:hover { background: #f3f4f6; color: #111827; }
.storzen-qc-modal__body {
	flex: 1;
	overflow: auto;
	padding: 18px 20px;
}
.storzen-qc-loading {
	text-align: center;
	padding: 30px;
	color: #6b7280;
}

/* ════════════════════════════════════════════════════════════════════════
 * Form
 * ════════════════════════════════════════════════════════════════════════ */
.storzen-qc-summary {
	display: flex;
	gap: 12px;
	align-items: center;
	background: #f9fafb;
	border-radius: 8px;
	padding: 10px 12px;
	margin-bottom: 16px;
}
.storzen-qc-summary__thumb img {
	width: 56px;
	height: 56px;
	border-radius: 6px;
	object-fit: cover;
	display: block;
}
.storzen-qc-summary__name {
	font-size: 14px;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.3;
}
.storzen-qc-summary__price {
	font-size: 13px;
	font-weight: 600;
	color: #FF3636;
	margin-top: 2px;
}

.storzen-qc-fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.storzen-qc-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.storzen-qc-label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: #374151;
}
.storzen-qc-label .req { color: #ef4444; }
.storzen-qc-label input,
.storzen-qc-label select,
.storzen-qc-label textarea {
	padding: 8px 10px;
	font-size: 13px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: #1f2937;
	background: #fff;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.storzen-qc-label input:focus,
.storzen-qc-label select:focus,
.storzen-qc-label textarea:focus {
	outline: none;
	border-color: #f59e0b;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, .15);
}

.storzen-qc-payment {
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	padding: 10px 12px;
	margin-top: 4px;
}
.storzen-qc-payment legend {
	font-size: 12px;
	font-weight: 600;
	color: #374151;
	padding: 0 6px;
}
.storzen-qc-gateway {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-size: 13px;
	cursor: pointer;
}
.storzen-qc-empty-gateways {
	margin: 0;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}
.storzen-qc-empty-gateways a { color: #f59e0b; font-weight: 500; }

.storzen-qc-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #f3f4f6;
}
.storzen-qc-submit {
	background: #f59e0b;
	color: #fff;
	border: 0;
	padding: 12px 20px;
	font-size: 14px;
	font-weight: 700;
	border-radius: 6px;
	cursor: pointer;
	width: 100%;
	transition: background .15s ease;
	font-family: inherit;
}
.storzen-qc-submit:hover:not(:disabled) { background: #d97706; }
.storzen-qc-submit:disabled { opacity: .55; cursor: not-allowed; }
.storzen-qc-full-link {
	font-size: 12px;
	color: #6b7280;
	text-decoration: none;
}
.storzen-qc-full-link:hover { color: #1f2937; text-decoration: underline; }

.storzen-qc-error {
	background: #fee2e2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 13px;
	margin-top: 12px;
}

/* Mobile */
@media (max-width: 600px) {
	.storzen-qc-modal__panel { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; }
	.storzen-qc-row { grid-template-columns: 1fr; }
	.storzen-qc-btn--single { display: block; margin: 8px 0 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.storzen-qc-modal__overlay,
	.storzen-qc-modal__panel,
	.storzen-qc-btn { transition: none !important; }
}

body.storzen-qc-modal-open { overflow: hidden; }
