/* ==========================================================================
   Training License System — Frontend styles
   ========================================================================== */

/* Full-page gate wrapper (single-program_builder.php when access denied)
   ========================================================================== */

.pb-front--license-gate {
	padding-top: 2rem;
	padding-bottom: 4rem;
	min-height: 50vh;
}

/* Access granted (licensed visitor)
   ========================================================================== */

.wt-license-access-notice {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.9rem 1.1rem;
	margin: 0 0 1.25rem;
	border-radius: 10px;
	border: 1px solid #bbf7d0;
	background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
	color: #14532d;
	box-shadow: 0 1px 2px rgba(20, 83, 45, 0.06);
}

.wt-license-access-notice__body {
	flex: 1;
	min-width: 0;
}

.wt-license-access-notice__icon {
	flex-shrink: 0;
	color: #16a34a;
	line-height: 1;
	margin-top: 2px;
}

.wt-license-access-notice__text {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 500;
	line-height: 1.45;
}

.wt-license-access-notice__actions {
	margin: 0.65rem 0 0;
}

.wt-license-access-notice__link {
	display: inline-flex;
	align-items: center;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wt-shop-primary, #091057);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wt-license-access-notice__link:hover {
	color: var(--wt-shop-secondary, #ff6900);
}

.wt-license-access-notice--admin {
	border-color: #fcd34d;
	background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
	color: #78350f;
}

.wt-license-access-notice--admin .wt-license-access-notice__icon {
	color: #d97706;
}

.wt-license-access-notice--admin .wt-license-access-notice__link {
	color: #78350f;
}

.wt-license-access-notice--admin .wt-license-access-notice__link:hover {
	color: var(--wt-shop-primary, #091057);
}

/* License gate overlay
   ========================================================================== */

.wt-license-gate {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 380px;
	padding: 3rem 1rem;
	background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	margin: 2rem 0;
}

.wt-license-gate__inner {
	text-align: center;
	max-width: 480px;
}

.wt-license-gate__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: var(--wt-shop-primary, #091057);
	color: #fff;
	margin: 0 auto 1.5rem;
}

.wt-license-gate__title {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--wt-shop-primary, #091057);
	margin: 0 0 .75rem;
	line-height: 1.2;
}

.wt-license-gate__desc {
	font-size: 1rem;
	color: var(--wt-shop-gray, #737373);
	margin: 0 0 2rem;
	line-height: 1.6;
}

.wt-license-gate__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.wt-license-gate__btn {
	display: inline-flex;
	align-items: center;
	padding: .875rem 1.75rem;
	font-size: 1rem;
	font-weight: 600;
	border-radius: 10px;
	text-decoration: none;
	transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
	cursor: pointer;
}

.wt-license-gate__btn:hover {
	transform: translateY(-2px);
}

.wt-license-gate__btn--primary {
	background: var(--wt-shop-secondary, #ff6900);
	color: #fff;
	border: 2px solid var(--wt-shop-secondary, #ff6900);
}

.wt-license-gate__btn--primary:hover {
	background: var(--wt-shop-secondary-darker, #cc4b02);
	border-color: var(--wt-shop-secondary-darker, #cc4b02);
	color: #fff;
	box-shadow: 0 8px 24px rgba(255, 105, 0, .25);
}

.wt-license-gate__btn--secondary {
	background: transparent;
	color: var(--wt-shop-primary, #091057);
	border: 2px solid var(--wt-shop-primary, #091057);
}

.wt-license-gate__btn--secondary:hover {
	background: var(--wt-shop-primary, #091057);
	color: #fff;
	box-shadow: 0 8px 24px rgba(9, 16, 87, .15);
}

/* My Account — license table
   ========================================================================== */

.wt-shop-license-key {
	font-size: .8rem;
	background: #f1f5f9;
	padding: 3px 7px;
	border-radius: 4px;
	letter-spacing: .03em;
}

.wt-shop-license-status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: .8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.wt-shop-license-status-active {
	background: #dcfce7;
	color: #166534;
}

.wt-shop-license-status-expired {
	background: #fef9c3;
	color: #854d0e;
}

.wt-shop-license-status-revoked {
	background: #fee2e2;
	color: #991b1b;
}

/* My Account — training title + explicit open link
   ========================================================================== */

.wt-shop-training-cell .wt-shop-training-link {
	font-weight: 600;
	text-decoration: none;
	color: var(--wt-shop-primary, #091057);
}

.wt-shop-training-cell .wt-shop-training-link:hover {
	text-decoration: underline;
}

.wt-shop-training-cell .wt-shop-training-open {
	display: inline-block;
	margin-top: 0.35rem;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	color: var(--wt-shop-secondary, #ff6900);
}

.wt-shop-training-cell .wt-shop-training-open:hover {
	color: var(--wt-shop-primary, #091057);
}

.wt-shop-license-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.wt-shop-license-actions .button.wt-shop-btn-open-training {
	margin: 0;
}

/* Seat management panel
   ========================================================================== */

.wt-tl-seat-panel {
	margin-top: 10px;
	padding: 14px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #f8fafc;
}

.wt-tl-seat-panel .wt-tl-seat-email {
	max-width: 280px;
}

.wt-tl-seat-list {
	margin: .75rem 0 0;
	padding: 0;
	list-style: none;
}

.wt-tl-seat-list li {
	padding: 4px 0;
	font-size: .9rem;
	border-bottom: 1px solid #f1f5f9;
}

.wt-tl-seat-list li:last-child {
	border-bottom: 0;
}

/* My Account — manage seats modal
   ========================================================================== */

/* Hidden by default; .is-open shows as flex (do not rely on jQuery .show() — it forces display:block). */
.wt-tl-modal[hidden],
.wt-tl-modal:not(.is-open) {
	display: none !important;
}

.wt-tl-modal.is-open {
	display: flex !important;
}

.wt-tl-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.wt-tl-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	cursor: pointer;
}

.wt-tl-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
	max-height: min(90vh, 720px);
	overflow: auto;
	margin: auto;
	padding: 1.35rem 1.5rem 1.5rem;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
	text-align: left;
}

.wt-tl-modal__close {
	position: absolute;
	top: 0.65rem;
	right: 0.75rem;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #64748b;
	padding: 0.25rem 0.5rem;
}

.wt-tl-modal__close:hover {
	color: #0f172a;
}

.wt-tl-modal__title {
	margin: 0 0 0.35rem;
	padding-right: 2rem;
	font-size: 1.25rem;
}

.wt-tl-modal__key {
	margin: 0 0 1rem;
	font-size: 0.9rem;
}

.wt-tl-modal__key code {
	font-size: 0.85rem;
}

.wt-tl-modal__section {
	margin-bottom: 1.35rem;
}

.wt-tl-modal__section:last-child {
	margin-bottom: 0;
}

.wt-tl-modal__section h3 {
	margin: 0 0 0.5rem;
	font-size: 1rem;
}

.wt-tl-modal__section .description {
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	color: #64748b;
}

.wt-tl-modal-seat-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wt-tl-modal-seat-list li {
	padding: 0.35rem 0;
	border-bottom: 1px solid #f1f5f9;
	font-size: 0.9rem;
}

.wt-tl-modal-seat-list li:last-child {
	border-bottom: 0;
}

.wt-tl-bulk-textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-family: ui-monospace, monospace;
	font-size: 0.85rem;
	padding: 0.6rem 0.75rem;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	resize: vertical;
	min-height: 140px;
}

/* Responsive
   ========================================================================== */

@media (max-width: 576px) {
	.wt-license-gate {
		padding: 2rem 1rem;
		min-height: 280px;
	}

	.wt-license-gate__icon {
		width: 72px;
		height: 72px;
	}

	.wt-license-gate__title {
		font-size: 1.3rem;
	}

	.wt-license-gate__actions {
		flex-direction: column;
		align-items: center;
	}
}
