/**
 * Size guide (F4): front-end button + modal styles.
 *
 * @package OrderGate_Flash
 */

/* Trigger button near the add-to-cart area. */
.og-size-guide-open {
	margin-left: 0.5rem;
}

/* Modal shell. */
.og-size-guide-modal {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.og-size-guide-modal[hidden] {
	display: none;
}

.og-size-guide-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.og-size-guide-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: 85vh;
	overflow: auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.og-size-guide-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #e5e5e5;
}

.og-size-guide-modal__title {
	margin: 0;
	font-size: 1.25rem;
}

.og-size-guide-modal__close {
	appearance: none;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	color: #555;
}

.og-size-guide-modal__close:hover {
	color: #000;
}

.og-size-guide-modal__body {
	padding: 1.25rem;
	overflow-x: auto;
}

/* Chart table. */
.og-size-chart-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.og-size-chart-table th,
.og-size-chart-table td {
	padding: 0.6rem 0.75rem;
	border: 1px solid #e0e0e0;
	text-align: center;
}

.og-size-chart-table thead th {
	background: #f5f5f5;
	font-weight: 700;
}

.og-size-chart-table tbody tr:nth-child(even) {
	background: #fafafa;
}

/* Lock page scroll while the modal is open. */
body.og-size-guide-open {
	overflow: hidden;
}

/* Admin editor table. */
.og-size-chart-editor__table input {
	width: 100%;
}

.og-size-chart-editor__table .ogsc-actions-col {
	width: 1%;
	white-space: nowrap;
}
