/**
 * Vendo modal + sizing guide (deliverable 2.5).
 * Mobile-first; brand tokens inherited from vendo-child where present.
 */

/* Overlay */
.vendo-modal {
	position: fixed;
	inset: 0;
	z-index: 1100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(17, 24, 39, 0.55);
	-webkit-overflow-scrolling: touch;
}
/* [hidden] keeps it out of the flow until opened. */
.vendo-modal[hidden] {
	display: none;
}

/* Prevent background scroll while a modal is open */
.vendo-modal-lock,
.vendo-modal-lock body {
	overflow: hidden;
}

/* Panel */
.vendo-modal__panel {
	position: relative;
	width: 100%;
	max-width: 520px;
	max-height: 85vh;
	overflow-y: auto;
	background: var(--vendo-bg, #fff);
	color: var(--vendo-text, #1a1a1a);
	border-radius: var(--vendo-radius, 8px);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
	padding: 1.25rem 1.25rem 1.5rem;
	outline: none;
	animation: vendo-modal-in 0.16s ease-out;
}

@keyframes vendo-modal-in {
	from { transform: translateY(8px); opacity: 0; }
	to   { transform: translateY(0);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.vendo-modal__panel { animation: none; }
}

.vendo-modal__title {
	margin: 0 2rem 0.75rem 0;
	font-size: 1.25rem;
}

.vendo-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	line-height: 1;
	background: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	color: var(--vendo-muted, #6b7280);
}
.vendo-modal__close:hover,
.vendo-modal__close:focus-visible {
	background: rgba(0, 0, 0, 0.06);
	color: var(--vendo-text, #1a1a1a);
}

/* Size-chart table */
.vendo-modal__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}
.vendo-modal__body th,
.vendo-modal__body td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--vendo-border, #e5e7eb);
	text-align: left;
}
.vendo-modal__body thead th {
	background: color-mix(in srgb, var(--vendo-primary, #1f3a5f) 8%, transparent);
	font-weight: 600;
}
.vendo-modal__body tbody tr:last-child td {
	border-bottom: none;
}

/* Trigger button spacing under add-to-cart */
.vendo-size-trigger {
	margin-top: 0.5rem;
}
