/* Tickets System — in-loop card UI (variant chips + qty + submit) */

.tsdp-loop-form {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	width: 100%;
}

.tsdp-loop-form * { box-sizing: border-box; }

/* Variant select ---------------------------------------------------- */

.tsdp-loop-variant-select {
	width: 100%;
	padding: 8px 10px;
	font-size: 14px;
	line-height: 1.3;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #fff;
	color: #1f2937;
	font-family: inherit;
	cursor: pointer;
}

.tsdp-loop-variant-select:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
	border-color: #2563eb;
}

/* Picked-date status pill ------------------------------------------- */

.tsdp-loop-date-status {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 10px;
	background: #f3f4f6;
	border-left: 3px solid #10b981;
	font-size: 12.5px;
	color: #1f2937;
	border-radius: 0 6px 6px 0;
}

.tsdp-loop-date-status__prefix {
	color: #4b5563;
}

.tsdp-loop-date-status__date {
	color: #111827;
}

/* Qty + submit row --------------------------------------------------- */

.tsdp-loop-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: 6px;
}

.tsdp-loop-submit {
	flex: 1 1 auto;
	min-height: 38px;
	min-width: 0;
	cursor: pointer;
	white-space: normal;
}

/* Quantity selector — minimal fallback styles using WC blocks class
   names. If WC's own block stylesheet is loaded site-wide it wins
   automatically (later rules override). Layout: minus on the left,
   input center, plus on the right. */
.tsdp-loop-qty-wrap.wc-block-components-quantity-selector {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__input {
	width: 50px;
	min-width: 0;
	padding: 6px 4px;
	border: 0;
	text-align: center;
	font-size: 14px;
	background: transparent;
	color: inherit;
	font-family: inherit;
	-moz-appearance: textfield;
	appearance: textfield;
	order: 2;
}

.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__input::-webkit-outer-spin-button,
.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__button {
	background: transparent;
	border: 0;
	padding: 0 12px;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	font-family: inherit;
}

.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__button--minus { order: 1; }
.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__button--plus  { order: 3; }

.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__button:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__button:hover:not(:disabled) {
	background: #f3f4f6;
}

/* Inline error ------------------------------------------------------- */

.tsdp-loop-error {
	margin: 0;
	padding: 6px 10px;
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: 6px;
	font-size: 12.5px;
}

/* Compact display on narrow viewports -------------------------------- */

@media (max-width: 480px) {
	.tsdp-loop-variant-select { font-size: 13.5px; }
	.tsdp-loop-qty-wrap .wc-block-components-quantity-selector__input { width: 44px; }
}

/* "Added to cart" confirmation modal -------------------------------- */

.tsdp-added-modal[hidden] {
	display: none !important;
}

.tsdp-added-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.tsdp-added-panel {
	text-align: center;
	max-width: 380px;
}

.tsdp-added-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #10b981;
	color: #ffffff;
	border-radius: 50%;
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.tsdp-added-title {
	margin: 0 0 8px;
	font-size: 1.2em;
	font-weight: 600;
	color: #111827;
}

.tsdp-added-message {
	margin: 0 0 18px;
	color: #4b5563;
	font-size: 0.95em;
	line-height: 1.5;
}

.tsdp-added-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.tsdp-added-actions .button {
	flex: 1 1 auto;
	min-width: 0;
	white-space: normal;
}

@media (max-width: 420px) {
	.tsdp-added-actions {
		flex-direction: column;
	}
}

.tsdp-loop-variant-description p {
	margin: 0;
	font-size: .857em;
}
