/**
 * Yusung Quote Request Modal
 *
 * @package Yusung
 */

/* ===== Trigger Button ===== */
.yusung-single-product-quote {
	margin: 1.25rem 0 0;
}

.yusung-quote-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0.75rem 1.75rem;
	border: none;
	border-radius: 4px;
	background: var(--yusung-color-primary, #004187);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.yusung-quote-btn:hover,
.yusung-quote-btn:focus-visible {
	background: #003066;
	color: #fff;
}

.yusung-quote-btn:active {
	transform: translateY(1px);
}

.yusung-quote-btn--secondary {
	background: #fff;
	color: var(--yusung-color-primary, #004187);
	border: 1px solid var(--yusung-color-primary, #004187);
	text-transform: none;
	font-weight: 600;
}

.yusung-quote-btn--secondary:hover,
.yusung-quote-btn--secondary:focus-visible {
	background: #f8fafc;
	color: var(--yusung-color-primary, #004187);
}

/* ===== Modal ===== */
.yusung-quote-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.yusung-quote-modal[hidden] {
	display: none !important;
}

body.yusung-quote-modal-open {
	overflow: hidden;
}

.yusung-quote-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(2px);
}

.yusung-quote-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: calc(100vh - 2rem);
	overflow: auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
	animation: yusungQuoteFadeIn 0.25s ease;
	scrollbar-width: thin;
	scrollbar-color: #c5cdd8 transparent;
}

.yusung-quote-modal__dialog::-webkit-scrollbar {
	width: 6px;
}

.yusung-quote-modal__dialog::-webkit-scrollbar-track {
	background: transparent;
}

.yusung-quote-modal__dialog::-webkit-scrollbar-thumb {
	background: #c5cdd8;
	border-radius: 999px;
}

.yusung-quote-modal__dialog::-webkit-scrollbar-thumb:hover {
	background: #9aa8bc;
}

@keyframes yusungQuoteFadeIn {
	from {
		opacity: 0;
		transform: translateY(12px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.yusung-quote-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: none;
	background: #f3f4f6;
	color: #374151;
	font-size: 1.25rem;
	line-height: 1;
	border-radius: 4px;
	cursor: pointer;
	z-index: 2;
}

.yusung-quote-modal__close:hover {
	background: #e5e7eb;
}

.yusung-quote-modal__header {
	padding: 1.5rem 1.5rem 0;
	border-bottom: 1px solid var(--yusung-color-border, #e5e7eb);
}

.yusung-quote-modal__header h2 {
	margin: 0 0 1rem;
	font-size: 1.375rem;
	font-weight: 700;
	color: #111827;
}

.yusung-quote-modal__body {
	padding: 1.5rem;
}

/* ===== Form ===== */
.yusung-quote-form {
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
}

.yusung-quote-form p,
.yusung-quote-form .wpcf7-form-control-wrap {
	margin: 0;
	padding: 0;
}

.yusung-quote-form form.wpcf7-form {
	margin: 0;
}

.yusung-quote-form__product {
	padding: 1rem;
	background: #f8fafc;
	border: 1px solid var(--yusung-color-border, #e5e7eb);
	border-left: 4px solid var(--yusung-color-primary, #004187);
	border-radius: 4px;
}

.yusung-quote-form__product-row {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin-bottom: 0.75rem;
}

.yusung-quote-form__product-row:last-child {
	margin-bottom: 0;
}

.yusung-quote-form__label {
	font-size: 0.8125rem;
	color: var(--yusung-color-text-muted, #6b7280);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.yusung-quote-form__value {
	font-size: 0.9375rem;
	color: var(--yusung-color-text, #1f2937);
}

.yusung-quote-attr {
	font-size: 0.875rem;
	margin-bottom: 0.25rem;
}

.yusung-quote-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.yusung-quote-form__group label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: #374151;
}

.yusung-quote-form__group .required {
	color: #dc2626;
}

.yusung-quote-input,
.yusung-quote-textarea {
	width: 100%;
	padding: 0.75rem 0.875rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 0.9375rem;
	color: #111827;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.yusung-quote-textarea {
	min-height: 100px;
	resize: vertical;
}

.yusung-quote-input:focus,
.yusung-quote-textarea:focus {
	outline: none;
	border-color: var(--yusung-color-primary, #004187);
	box-shadow: 0 0 0 3px rgba(0, 65, 135, 0.12);
}

.yusung-quote-form__submit {
	margin-top: 0.25rem;
}

.yusung-quote-submit {
	width: 100%;
	min-height: 48px;
	padding: 0.875rem 1.5rem;
	border: none;
	border-radius: 4px;
	background: var(--yusung-color-primary, #004187);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}

.yusung-quote-submit:hover {
	background: #003066;
}

.yusung-quote-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Honeypot — hidden from users and bots that skip CSS */
.yusung-quote-form__honeypot,
.yusung-quote-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* CF7 validation */
.yusung-quote-form .wpcf7-not-valid {
	border-color: #dc2626 !important;
}

.yusung-quote-form .wpcf7-not-valid-tip {
	font-size: 0.8125rem;
	color: #dc2626;
	margin-top: 0.25rem;
}

.yusung-quote-form .wpcf7-response-output {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	font-size: 0.875rem;
}

.yusung-quote-modal__form .wpcf7-response-output {
	display: none;
}

/* ===== Success state ===== */
.yusung-quote-modal__result {
	text-align: center;
	padding: 2rem 1rem;
}

.yusung-quote-modal__result-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: #ecfdf5;
	color: #059669;
	font-size: 1.75rem;
	line-height: 56px;
	font-weight: 700;
}

.yusung-quote-modal__result-title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	color: #111827;
}

.yusung-quote-modal__result-text {
	margin: 0 0 1.5rem;
	color: var(--yusung-color-text-muted, #6b7280);
	line-height: 1.6;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
	.yusung-quote-modal__dialog {
		max-height: calc(100vh - 1rem);
		border-radius: 6px;
	}

	.yusung-quote-modal__header,
	.yusung-quote-modal__body {
		padding: 1rem;
	}

	.yusung-quote-form__row {
		grid-template-columns: 1fr;
	}

	.yusung-quote-btn {
		width: 100%;
	}
}

.yusung-quote-btn--placeholder {
	opacity: 0.85;
	cursor: default;
}
