/**
 * Project gate — same palette, radius and type as the questionnaire, so signing
 * in reads as part of the product rather than a WordPress screen.
 */

.gbds-gate {
	display: flex;
	justify-content: center;
	padding: 48px 20px 96px;
	background: #efece6;
	min-height: 60vh;
}

.gbds-gate__card {
	width: 100%;
	max-width: 460px;
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

/* Two classes deep, like the buttons below and for the same reason: the
   Elementor kit sets its heading scale as `.elementor-kit-5 h2` (0,1,1), which
   outranks a lone class — the card's headings were rendering at the page's full
   h2/h3 size instead of the size intended here. */
.gbds-gate__card .gbds-gate__title {
	margin: 0 0 6px;
	font-size: 25px;
	line-height: 1.3;
	color: #2b2722;
}

.gbds-gate__card .gbds-gate__sub {
	margin: 0 0 4px;
	font-size: 16px;
	line-height: 1.5;
	color: #2b2722;
}

.gbds-gate__lead,
.gbds-gate__hint {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.6;
	color: #7a7368;
}

.gbds-gate__hint {
	margin-bottom: 10px;
	font-size: 13px;
}

.gbds-gate__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 22px;
}

.gbds-gate__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 13px;
	color: #7a7368;
}

.gbds-gate__field input {
	font: inherit;
	font-size: 15px;
	color: #2b2722;
	background: #fff;
	border: 1px solid #dcd7cf;
	border-radius: 12px;
	padding: 11px 14px;
	width: 100%;
}

.gbds-gate__field input:focus {
	outline: 0;
	border-color: #6f675c;
}

/* Two classes deep on purpose: Hello Elementor's reset styles [type="submit"]
   with a #c36 border, and an attribute selector scores the same (0,1,0) as one
   class — on a tie its later stylesheet would win. */
.gbds-gate__card .gbds-gate__btn {
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: #6f675c;
	border: 1px solid #6f675c;
	border-radius: 12px;
	padding: 12px 20px;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.gbds-gate__card .gbds-gate__btn:hover:not(:disabled),
.gbds-gate__card .gbds-gate__btn:focus-visible {
	background: #3b362f;
	border-color: #3b362f;
	color: #f5f1e7;
}

.gbds-gate__card .gbds-gate__btn:disabled {
	opacity: .6;
	cursor: default;
}

.gbds-gate__card .gbds-gate__btn--ghost {
	background: transparent;
	color: #2b2722;
	border-color: #dcd7cf;
}

.gbds-gate__switch {
	margin: 0;
	font-size: 14px;
	color: #7a7368;
}

.gbds-gate__switch a,
.gbds-gate__who a {
	color: #6f675c;
}

/* Who you are signed in as.
   This started as a faint grey line and was missed entirely — someone already
   signed in as an admin saw the project step and reported that there was no
   login at all. It now reads as a status bar, with the way out beside it. */
.gbds-gate__who {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 22px;
	padding: 10px 14px;
	border: 1px solid #dcd7cf;
	border-radius: 12px;
	background: #f7f5f2;
	font-size: 13px;
	color: #2b2722;
}

.gbds-gate__who a {
	padding: 5px 12px;
	border: 1px solid #dcd7cf;
	border-radius: 12px;
	background: #fff;
	text-decoration: none;
	white-space: nowrap;
}

.gbds-gate__who a:hover,
.gbds-gate__who a:focus-visible {
	background: #3b362f;
	border-color: #3b362f;
	color: #f5f1e7;
}

/* ข้อความยืนยันที่ไม่ใช่ความผิดพลาด เช่น "ส่งลิงก์ไปแล้ว" — สีเขียวอ่อน
   เพื่อไม่ให้อ่านผิดเป็น error สีแดงที่อยู่ตำแหน่งเดียวกัน */
.gbds-gate__notice {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 12px;
	background: #eaf3e7;
	color: #3f6b34;
	font-size: 14px;
	line-height: 1.6;
}

.gbds-gate__error {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 12px;
	background: #fbeceb;
	color: #b3261e;
	font-size: 14px;
}

.gbds-gate__list {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gbds-gate__project {
	font: inherit;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 16px;
	background: #f7f5f2;
	border: 1px solid #dcd7cf;
	border-radius: 12px;
	color: #2b2722;
	cursor: pointer;
	text-align: left;
}

.gbds-gate__project:hover,
.gbds-gate__project:focus-visible {
	background: #3b362f;
	border-color: #3b362f;
	color: #f5f1e7;
}

.gbds-gate__project em {
	font-style: normal;
	font-size: 12px;
	opacity: .7;
}

/* -------------------------------------------------------------- members
   The owner's roster. Wider than the sign-in card: each row carries a name, a
   nickname, a masked email, a date and an action, and at 460px they wrapped
   into an unreadable stack. */

.gbds-gate__card--wide {
	max-width: 620px;
}

.gbds-gate__row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.gbds-gate__row .gbds-gate__project {
	flex: 1;
}

.gbds-gate__card .gbds-gate__manage {
	font: inherit;
	font-size: 13px;
	white-space: nowrap;
	padding: 0 14px;
	background: #fff;
	color: #6f675c;
	border: 1px solid #dcd7cf;
	border-radius: 12px;
	cursor: pointer;
}

.gbds-gate__card .gbds-gate__manage:hover,
.gbds-gate__card .gbds-gate__manage:focus-visible {
	background: #3b362f;
	border-color: #3b362f;
	color: #f5f1e7;
}

.gbds-gate__members {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.gbds-gate__member {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 14px 16px;
	background: #f7f5f2;
	border: 1px solid #dcd7cf;
	border-radius: 12px;
}

.gbds-gate__members--removed .gbds-gate__member {
	background: #fff;
	border-style: dashed;
}

.gbds-gate__member-who {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
	font-size: 15px;
	color: #2b2722;
}

.gbds-gate__member-name {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.gbds-gate__member-meta {
	font-size: 13px;
	color: #7a7368;
	overflow-wrap: anywhere;
}

.gbds-gate__tag {
	font-style: normal;
	font-size: 12px;
	color: #6f675c;
}

.gbds-gate__card .gbds-gate__btn--small {
	font-size: 13px;
	padding: 8px 14px;
}

.gbds-gate__card .gbds-gate__btn--danger {
	color: #b3261e;
	border-color: #e8cbc8;
}

.gbds-gate__card .gbds-gate__btn--danger:hover:not(:disabled),
.gbds-gate__card .gbds-gate__btn--danger:focus-visible {
	background: #b3261e;
	border-color: #b3261e;
	color: #fff;
}

.gbds-gate__google {
	display: flex;
	justify-content: center;
	margin-bottom: 6px;
	min-height: 44px;
}

/* Rule with the word "or" sitting in the gap. */
.gbds-gate__or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 10px 0 18px;
	color: #978f84;
	font-size: 12px;
}

.gbds-gate__or::before,
.gbds-gate__or::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #dcd7cf;
}

/* Overlay mode — the gate covers the questionnaire once a visitor has picked a
   project type but is not signed in to a project yet. */
.gbds-gate--overlay {
	position: fixed;
	inset: 0;
	z-index: 90;
	overflow-y: auto;
	align-items: flex-start;
	background: rgba(43, 39, 34, .55);
	backdrop-filter: blur(3px);
	padding-top: 6vh;
}

.gbds-gate--overlay[hidden] { display: none; }

html.gbds-gate-open,
html.gbds-gate-open body { overflow: hidden; }
