/**
 * Thai Blessing System - Public Styles (v1.0.15)
 * 
 * Minimal defaults. Elementor controls always win.
 */

/* ============ Form layout (scoped / v1.0.12) ============ */
.tbs-form-wrapper {
	width: 100%;
	max-width: 100%;
	clear: both;
	isolation: isolate;
}

.tbs-form-wrapper,
.tbs-form-wrapper * {
	box-sizing: border-box;
}

.tbs-form-wrapper .tbs-form {
	max-width: 720px;
	margin: 0 auto;
	font-family: inherit;
}

.tbs-form-wrapper .tbs-form-body {
	width: 100%;
}

.tbs-form-wrapper .tbs-form-group {
	margin-bottom: 16px;
	display: block;
}

.tbs-form-wrapper .tbs-form-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	box-sizing: border-box;
	align-items: center;
	gap: 6px;
}

.tbs-form-wrapper .tbs-form-label.has-icon {
	display: inline-flex;
}

.tbs-form-wrapper .tbs-form-label .tbs-required {
	color: #d63638;
	margin-left: 2px;
}

.tbs-form-wrapper .tbs-field-icon {
	display: inline-flex;
	align-items: center;
	color: inherit;
	flex-shrink: 0;
}

.tbs-form-wrapper .tbs-field-icon svg,
.tbs-form-wrapper .tbs-field-icon i {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.tbs-form-wrapper .tbs-form-control {
	display: block;
	width: 100%;
}

/* ============ Inputs (scoped defaults) ============ */
.tbs-form-wrapper .tbs-form-input,
.tbs-form-wrapper .tbs-form-textarea,
.tbs-form-wrapper .tbs-form-select {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	font-size: 15px;
	box-sizing: border-box;
	background: #fff;
	color: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	font-family: inherit;
}

.tbs-form-wrapper .tbs-form-input:focus,
.tbs-form-wrapper .tbs-form-textarea:focus,
.tbs-form-wrapper .tbs-form-select:focus {
	outline: none;
	border-color: #d4af37;
	box-shadow: 0 0 0 3px rgba(212,175,55,.18);
}

.tbs-form-wrapper .tbs-form-textarea {
	min-height: 90px;
	resize: vertical;
}

/* ============ Honeypot (hidden) ============ */
.tbs-form-wrapper .tbs-form-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ============ PDPA — isolated visual checkbox ============ */
.tbs-form-wrapper .tbs-form-pdpa {
	margin: 16px 0;
	font-size: 14px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-label {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	cursor: pointer;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-wrap {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	min-width: 18px;
	margin: 2px 0 0;
	line-height: 1;
}

/* Hide the real checkbox completely, but keep it clickable through the label.
   This prevents duplicate native/browser/theme checkmarks. */
.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-wrap > input.tbs-pdpa-checkbox,
.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-wrap > input[type="checkbox"].tbs-pdpa-checkbox {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	cursor: pointer !important;
	z-index: 3 !important;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-visual {
	box-sizing: border-box;
	display: inline-block;
	width: 18px;
	height: 18px;
	min-width: 18px;
	background: #fff;
	border: 2px solid #94a3b8;
	border-radius: 4px;
	position: relative;
	flex: 0 0 auto;
	z-index: 1;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-text {
	flex: 1 1 auto;
	display: block;
	min-width: 0;
	max-width: 100%;
	line-height: 1.65;
	word-break: normal;
	overflow-wrap: anywhere;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-text a {
	font-weight: inherit;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:checked + .tbs-pdpa-check-visual,
.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:checked ~ .tbs-pdpa-check-visual {
	background: #2563eb;
	border-color: #2563eb;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:checked + .tbs-pdpa-check-visual::after,
.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:checked ~ .tbs-pdpa-check-visual::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 45%;
	width: 30%;
	height: 60%;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -50%) rotate(45deg);
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:focus-visible + .tbs-pdpa-check-visual,
.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:focus-visible ~ .tbs-pdpa-check-visual {
	box-shadow: 0 0 0 3px rgba(212,175,55,0.28);
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:active + .tbs-pdpa-check-visual,
.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-checkbox:active ~ .tbs-pdpa-check-visual {
	transform: scale(0.96);
}

/* ============ Submit Button ============ */
.tbs-form-wrapper .tbs-form-submit-wrap {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

.tbs-form-wrapper .tbs-form-submit {
	background: #f97316;
	color: #fff;
	border: none;
	padding: 12px 32px;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	min-width: 220px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
	line-height: 1.4;
	font-family: inherit;
}

.tbs-form-wrapper .tbs-form-submit:hover:not(:disabled) {
	background: #ea580c;
}

.tbs-form-wrapper .tbs-form-submit:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.tbs-form-wrapper .tbs-submit-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.tbs-form-wrapper .tbs-form-submit i,
.tbs-form-wrapper .tbs-form-submit svg,
.tbs-form-wrapper .tbs-submit-icon i,
.tbs-form-wrapper .tbs-submit-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.tbs-form-wrapper .tbs-form-submit svg path,
.tbs-form-wrapper .tbs-submit-icon svg path {
	fill: currentColor;
}

/* ============ Chips — scoped defaults ============ */
.tbs-form-wrapper .tbs-message-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.tbs-form-wrapper .tbs-message-chip {
	display: inline-block;
	background: #fff;
	color: inherit;
	border: 1px solid #d0d5dd;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	transition: all 0.15s ease;
	line-height: 1.4;
	text-align: left;
}

.tbs-form-wrapper .tbs-message-chip:hover {
	background: #f8fafc;
}

.tbs-form-wrapper .tbs-message-chip:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(212,175,55,.18);
}

.tbs-form-wrapper .tbs-message-chip.is-active {
	background: #f97316;
	color: #fff;
	border-color: #f97316;
}

/* ============ Captcha ============ */
.tbs-form-wrapper .tbs-form-captcha {
	margin: 12px 0;
}

/* ============ Notice / thank-you message ============ */
.tbs-form-wrapper .tbs-form-notice {
	margin: 12px 0 18px;
	display: none;
	width: 100%;
	box-sizing: border-box;
}

.tbs-form-wrapper .tbs-form-notice.tbs-notice-success,
.tbs-form-wrapper .tbs-form-notice.tbs-notice-error {
	display: block;
}

.tbs-form-wrapper .tbs-form-notice .tbs-success,
.tbs-form-wrapper .tbs-form-notice .tbs-error {
	box-sizing: border-box;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
	line-height: 1.65;
}

.tbs-form-wrapper .tbs-form-notice .tbs-success {
	white-space: normal;
	background: linear-gradient(90deg, #fff7d6 0%, #f7d95a 100%);
	color: #3b1856;
	padding: 18px 22px;
	border-radius: 18px;
	font-weight: 600;
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.tbs-form-wrapper .tbs-form-notice .tbs-error {
	background: #fee2e2;
	color: #991b1b;
	padding: 14px 16px;
	border-radius: 12px;
	font-weight: 600;
}

/* ============ Banner widget ============ */
.tbs-banner {
	text-align: center;
	margin-bottom: 24px;
}

.tbs-banner img {
	max-width: 100%;
	height: auto;
}

.tbs-event-title {
	font-size: 24px;
	margin: 16px 0 8px;
}

.tbs-event-description {
	color: #475467;
}

/* Gradient text trick */
.tbs-title-gradient,
.tbs-gradient-text {
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

/* ============ Counter widget ============ */
.tbs-counter {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	padding: 16px 24px;
}

.tbs-counter-number {
	font-size: 36px;
	font-weight: 700;
	line-height: 1;
}

.tbs-counter-suffix {
	font-size: 0.6em;
	font-weight: 400;
	opacity: 0.85;
	margin-left: 4px;
}

.tbs-counter-label {
	font-size: 14px;
	margin-top: 6px;
	color: #64748b;
}

/* ============ List widget ============ */
.tbs-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.tbs-list-item {
	background: #fff;
	border: 1px solid #e2e8f0;
	padding: 14px 16px;
	border-radius: 8px;
}

.tbs-list-name {
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 4px;
}

.tbs-list-meta {
	font-size: 13px;
	color: #64748b;
}

.tbs-list-message {
	margin-top: 8px;
	color: #475569;
	line-height: 1.5;
}

.tbs-empty {
	text-align: center;
	padding: 30px;
	color: #94a3b8;
}

/* ============ Event Info widget ============ */
.tbs-event-info {
	padding: 16px;
}

.tbs-event-info-title {
	margin: 0 0 12px;
	color: #1e3a8a;
}

.tbs-event-info-desc {
	line-height: 1.6;
	margin-bottom: 12px;
}

.tbs-event-info-meta {
	font-size: 14px;
	color: #475569;
	margin-top: 6px;
}

/* ============ Event closed message ============ */
.tbs-event-closed {
	background: #fef3c7;
	color: #92400e;
	padding: 16px;
	border-radius: 6px;
	text-align: center;
	margin: 16px 0;
}

/* ============ PDPA checkbox hardening for Elementor editor preview / v1.0.12 ============ */
.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-label {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-wrap {
	overflow: visible;
	align-self: start;
	box-sizing: border-box;
}

.tbs-form-wrapper .tbs-form-pdpa input[type="checkbox"].tbs-pdpa-checkbox {
	position: absolute !important;
	inset: 0 !important;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 0 !important;
	visibility: visible !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	border: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	z-index: 5 !important;
	cursor: pointer !important;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-visual {
	display: block !important;
	position: relative !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 0 !important;
	min-height: 0 !important;
	aspect-ratio: 1 / 1;
	overflow: visible;
	box-sizing: border-box;
	line-height: 1;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-visual::before {
	content: none !important;
}

.tbs-form-wrapper .tbs-form-pdpa .tbs-pdpa-check-visual::after {
	box-sizing: border-box;
	pointer-events: none;
}

/* ============ v1.0.15: helper text + organization field safety ============ */
.tbs-form-wrapper .tbs-message-helper {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 8px;
	color: inherit;
	opacity: .9;
}

.tbs-form-wrapper .tbs-field-group-organization .tbs-form-textarea {
	min-height: 72px;
}
