/**
 * Oath Support — form styles.
 *
 * Visual language borrowed from forceloginwoo's "oathgate" template:
 * Playfair Display for headlines, Inter for body, neutral warm palette,
 * rounded card surfaces with generous padding.
 *
 * Scoped under .oath-support to avoid leaking into Elementor page styles.
 */

.oath-support {
	--oath-color-ink:       #1a1f2c;
	--oath-color-muted:     #5a6072;
	--oath-color-line:      #e5e7eb;
	--oath-color-bg:        #ffffff;
	--oath-color-bg-alt:    #f8f9fc;
	--oath-color-accent:    #d97757;
	--oath-color-accent-hover: #c26844;
	--oath-color-focus:     #c9a84c;
	--oath-color-focus-ring: rgba(201, 168, 76, 0.1);
	--oath-color-input-bg:  #faf9f6;
	--oath-color-input-border: #e0ded9;
	--oath-color-cream:     #f8f5ee;
	--oath-radius:          12px;
	--oath-shadow:          0 4px 24px rgba(26, 31, 44, 0.06);
	--oath-font-head:       'Playfair Display', Georgia, 'Times New Roman', serif;
	--oath-font-body:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

	font-family: var(--oath-font-body);
	color: var(--oath-color-ink);
	max-width: 720px;
	margin: 0 auto;
	padding: 2rem 1.25rem;
	line-height: 1.55;
}

/* ========== Header (persistent RUO copy) ========== */

.oath-support__header {
	background: var(--oath-color-bg);
	border: 1px solid var(--oath-color-line);
	border-radius: var(--oath-radius);
	padding: 1.75rem 1.75rem 1.5rem;
	margin-bottom: 1.75rem;
	box-shadow: var(--oath-shadow);
}

.oath-support__greeting {
	font-family: var(--oath-font-head);
	font-weight: 600;
	font-size: 1.75rem;
	margin: 0 0 0.75rem;
	color: var(--oath-color-ink);
}

.oath-support__intro {
	margin: 0.5rem 0;
	color: var(--oath-color-muted);
	font-size: 0.975rem;
}

.oath-support__intro a {
	color: var(--oath-color-accent);
	text-decoration: none;
	border-bottom: 1px solid rgba(217, 119, 87, 0.35);
}

.oath-support__intro a:hover {
	border-bottom-color: var(--oath-color-accent);
}

/* ========== Category picker ========== */

.oath-support__picker {
	margin-bottom: 1.5rem;
}

.oath-support__picker-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--oath-color-muted);
	margin-bottom: 0.5rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.oath-support__picker-select {
	width: 100%;
	padding: 0.9rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	color: var(--oath-color-ink);
	background: var(--oath-color-bg);
	border: 1.5px solid var(--oath-color-line);
	border-radius: var(--oath-radius);
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.oath-support__picker-select:focus {
	outline: none;
	border-color: var(--oath-color-focus);
	box-shadow: 0 0 0 3px var(--oath-color-focus-ring);
}

/* ========== Category panels ========== */

.oath-support__panel {
	background: var(--oath-color-bg);
	border: 1px solid var(--oath-color-line);
	border-radius: var(--oath-radius);
	padding: 1.75rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--oath-shadow);
}

.oath-support__panel[hidden] {
	display: none;
}

.oath-support__placeholder {
	color: var(--oath-color-muted);
	font-style: italic;
	padding: 1rem 0;
	text-align: center;
}

.oath-support__placeholder code {
	background: var(--oath-color-bg-alt);
	padding: 0.125rem 0.375rem;
	border-radius: 4px;
	font-size: 0.8125rem;
}

/* ========== Pre-prompt alert (shown before Product / Something else) ========== */

/* Panel hosts the alert as its own bg — alert is bare content, no nested box. */
.oath-support__panel:has([data-role="pre-prompt-alert"]:not([hidden])) {
	background: var(--oath-color-cream);
}

.oath-support__alert {
	background: transparent;
	border-radius: 0;
	padding: 0;
}

.oath-support__alert-title {
	font-family: var(--oath-font-head);
	font-weight: 600;
	font-size: 1.25rem;
	margin: 0 0 0.75rem;
	color: var(--oath-color-ink);
}

.oath-support__alert-body {
	margin: 0.625rem 0;
	color: var(--oath-color-ink);
	font-size: 0.95rem;
}

.oath-support__alert-body a {
	color: var(--oath-color-accent-hover);
	font-weight: 500;
}

.oath-support__alert-body strong {
	font-weight: 600;
}

.oath-support__alert-list {
	margin: 0.625rem 0;
	padding-left: 1.25rem;
	color: var(--oath-color-ink);
	font-size: 0.9375rem;
}

.oath-support__alert-list li {
	margin: 0.5rem 0;
	line-height: 1.5;
}

.oath-support__alert-list strong {
	font-weight: 600;
}

.oath-support__alert-ack {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	margin: 1rem 0 0.25rem;
	padding: 0.625rem 0.75rem;
	background: #fff;
	border: 1px solid var(--oath-color-line);
	border-radius: 8px;
	color: var(--oath-color-ink);
	font-size: 0.9375rem;
	cursor: pointer;
	user-select: none;
}

.oath-support__alert-ack input[type="checkbox"] {
	margin-top: 0.1875rem;
	flex: 0 0 auto;
	width: 1.0625rem;
	height: 1.0625rem;
	cursor: pointer;
	accent-color: var(--oath-color-accent);
}

.oath-support__alert-continue {
	margin-top: 0.75rem;
	padding: 0.75rem 1.5rem;
	background: var(--oath-color-ink);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s ease;
}

.oath-support__alert-continue:hover {
	background: #000;
}

.oath-support__alert-continue:disabled,
.oath-support__alert-continue:disabled:hover {
	background: #9ca3af;
	cursor: not-allowed;
	opacity: 0.7;
}

.oath-support__panel-body[hidden] {
	display: none;
}

/* ========== Login-required fallback ========== */

.oath-support--login-required {
	text-align: center;
	padding: 3rem 1.5rem;
}

.oath-support__login-link {
	display: inline-block;
	margin-top: 1rem;
	color: var(--oath-color-accent);
	font-weight: 500;
}

/* ========== Widget shared bits ========== */

.oath-support__widget-title {
	font-family: var(--oath-font-head);
	font-weight: 600;
	font-size: 1.375rem;
	margin: 0 0 0.5rem;
	color: var(--oath-color-ink);
}

.oath-support__widget-intro,
.oath-support__widget-empty,
.oath-support__widget-hint {
	color: var(--oath-color-muted);
	font-size: 0.9375rem;
	margin: 0.5rem 0 1rem;
}

.oath-support__widget-hint {
	font-size: 0.875rem;
	margin-top: 1rem;
}

.oath-support__widget-hint a,
.oath-support__widget-empty a,
.oath-support__widget-intro a {
	color: var(--oath-color-accent);
}

/* ========== Order list ========== */

.oath-support__order-list {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
}

.oath-support__order-row {
	padding: 1rem 0;
	border-bottom: 1px solid var(--oath-color-line);
}

.oath-support__order-row:last-child {
	border-bottom: none;
}

.oath-support__order-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.oath-support__order-number {
	font-family: var(--oath-font-head);
	font-size: 1.0625rem;
	font-weight: 600;
	color: var(--oath-color-ink);
	text-decoration: none;
}

.oath-support__order-status {
	display: inline-block;
	padding: 0.25rem 0.625rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	background: var(--oath-color-bg-alt);
	color: var(--oath-color-muted);
}

.oath-support__order-status--completed,
.oath-support__order-status--processing {
	background: #dcfce7;
	color: #166534;
}

.oath-support__order-status--on-hold,
.oath-support__order-status--pending {
	background: #fef3c7;
	color: #854d0e;
}

.oath-support__order-status--cancelled,
.oath-support__order-status--refunded,
.oath-support__order-status--failed {
	background: #fee2e2;
	color: #991b1b;
}

.oath-support__order-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.375rem;
	font-size: 0.8125rem;
	color: var(--oath-color-muted);
}

.oath-support__order-meta a {
	color: var(--oath-color-accent);
	text-decoration: none;
	margin-left: auto;
}

/* ========== COA grid ========== */

.oath-support__coa-grid {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.875rem;
}

.oath-support__coa-card {
	background: var(--oath-color-bg-alt);
	border-radius: var(--oath-radius);
	padding: 1rem;
	text-align: center;
	border: 1px solid var(--oath-color-line);
}

.oath-support__coa-image {
	height: 96px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0.75rem;
}

.oath-support__coa-image img {
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
}

.oath-support__coa-name {
	font-size: 0.9375rem;
	font-weight: 600;
	margin: 0 0 0.5rem;
	color: var(--oath-color-ink);
	line-height: 1.3;
}

.oath-support__coa-link {
	font-size: 0.8125rem;
	color: var(--oath-color-accent);
	text-decoration: none;
	font-weight: 500;
}

/* ========== Account link cards ========== */

.oath-support__link-list {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
	display: grid;
	gap: 0.625rem;
}

.oath-support__link-card {
	display: block;
	padding: 1rem 1.25rem;
	background: var(--oath-color-bg-alt);
	border: 1px solid var(--oath-color-line);
	border-radius: var(--oath-radius);
	text-decoration: none;
	color: var(--oath-color-ink);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.oath-support__link-card:hover {
	border-color: var(--oath-color-accent);
	background: var(--oath-color-bg);
}

.oath-support__link-card strong {
	display: block;
	font-size: 0.9375rem;
	font-weight: 600;
	margin-bottom: 0.125rem;
}

.oath-support__link-card span {
	display: block;
	font-size: 0.8125rem;
	color: var(--oath-color-muted);
}

/* ========== Escape hatch (ticket form reveal) ========== */

.oath-support__escape-hatch {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px dashed var(--oath-color-line);
}

.oath-support__escape-hatch > p {
	color: var(--oath-color-muted);
	font-size: 0.9375rem;
	margin: 0 0 0.75rem;
}

/* ========== Ticket form ========== */

.oath-support__ticket-form {
	display: grid;
	gap: 0.875rem;
}

.oath-support__field label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--oath-color-muted);
	margin-bottom: 0.375rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.oath-support__field input[type="text"],
.oath-support__field textarea {
	width: 100%;
	padding: 0.75rem 0.875rem;
	font-size: 0.9375rem;
	font-family: inherit;
	color: var(--oath-color-ink);
	background: var(--oath-color-input-bg);
	border: 1.5px solid var(--oath-color-input-border);
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.oath-support__field textarea {
	resize: vertical;
	min-height: 110px;
	line-height: 1.5;
}

.oath-support__field input:focus,
.oath-support__field textarea:focus {
	outline: none;
	border-color: var(--oath-color-focus);
	box-shadow: 0 0 0 3px var(--oath-color-focus-ring);
	background: #fff;
}

.oath-support__agreement-text {
	font-size: 0.75rem;
	color: var(--oath-color-muted);
	line-height: 1.5;
	margin: 0;
	padding: 0.625rem 0.875rem;
	background: var(--oath-color-bg-alt);
	border-radius: 6px;
}

.oath-support__form-footer {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.oath-support__submit-btn {
	padding: 0.75rem 1.75rem;
	background: var(--oath-color-ink);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s ease;
}

.oath-support__submit-btn:hover:not(:disabled) {
	background: #000;
}

.oath-support__submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.oath-support__form-status {
	font-size: 0.875rem;
	color: var(--oath-color-muted);
}

.oath-support__form-status--success {
	color: #166534;
}

.oath-support__form-status--error {
	color: #991b1b;
}

/* ========== Email-first gate (Phase 2) ========== */

.oath-support__gate {
	background: var(--oath-color-bg);
	border: 1px solid var(--oath-color-line);
	border-radius: var(--oath-radius);
	padding: 1.75rem;
	box-shadow: var(--oath-shadow);
}

.oath-support__gate-step[hidden] {
	display: none;
}

.oath-support__gate-note {
	color: var(--oath-color-muted);
	font-size: 0.9375rem;
	margin: 0 0 1rem;
}

.oath-support__gate-note--small {
	font-size: 0.8125rem;
	font-style: italic;
}

.oath-support__gate-input {
	width: 100%;
	padding: 0.75rem 0.875rem;
	font-size: 0.9375rem;
	font-family: inherit;
	color: var(--oath-color-ink);
	background: var(--oath-color-input-bg);
	border: 1.5px solid var(--oath-color-input-border);
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.oath-support__gate-input:focus {
	outline: none;
	border-color: var(--oath-color-focus);
	box-shadow: 0 0 0 3px var(--oath-color-focus-ring);
	background: #fff;
}

.oath-support__gate-input--readonly {
	background: #f3f1ec;
	cursor: default;
	color: var(--oath-color-muted);
}

.oath-support__gate-hint {
	font-size: 0.8125rem;
	color: var(--oath-color-muted);
	transition: color 0.15s ease;
}

.oath-support__gate-hint--checking {
	color: var(--oath-color-muted);
	font-style: italic;
}

.oath-support__gate-hint--found {
	color: #166534;
	font-weight: 500;
}

.oath-support__gate-hint--new {
	color: var(--oath-color-accent);
	font-weight: 500;
}

.oath-support__gate-error {
	min-height: 1.25em;
	margin: 0.5rem 0 0;
	font-size: 0.8125rem;
	color: #991b1b;
}

.oath-support__gate-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0.25rem 0 0.875rem;
	flex-wrap: wrap;
}

.oath-support__gate-remember {
	font-size: 0.8125rem;
	color: var(--oath-color-muted);
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	cursor: pointer;
}

.oath-support__gate-forgot {
	font-size: 0.8125rem;
	color: var(--oath-color-accent);
	text-decoration: none;
}

.oath-support__gate-forgot:hover {
	text-decoration: underline;
}

.oath-support__gate-disclaimer {
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
	padding: 0.875rem;
	background: var(--oath-color-bg-alt);
	border-radius: 8px;
	margin: 0.25rem 0 1rem;
	font-size: 0.8125rem;
	color: var(--oath-color-muted);
	line-height: 1.5;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: border-color 0.15s ease;
}

.oath-support__gate-disclaimer--error {
	border-color: #991b1b;
	background: #fee2e2;
	color: #7f1d1d;
}

.oath-support__gate-disclaimer input[type="checkbox"] {
	margin-top: 0.25rem;
	flex-shrink: 0;
}

.oath-support__gate-back {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.5rem 0;
	background: none;
	border: none;
	color: var(--oath-color-muted);
	font-family: inherit;
	font-size: 0.875rem;
	cursor: pointer;
	text-decoration: underline;
}

.oath-support__gate-back:hover {
	color: var(--oath-color-ink);
}

.oath-support__gate-form {
	display: block;
}

.oath-support__gate-form .oath-support__field,
.oath-support__gate-step > .oath-support__field {
	margin-bottom: 0.875rem;
}


/* ========== Mobile ========== */

@media (max-width: 540px) {
	.oath-support {
		padding: 1.25rem 0.875rem;
	}
	.oath-support__header,
	.oath-support__panel,
	.oath-support__gate {
		padding: 1.25rem;
	}
	.oath-support__greeting {
		font-size: 1.5rem;
	}
	.oath-support__order-head {
		flex-wrap: wrap;
	}
	.oath-support__form-footer {
		flex-direction: column;
		align-items: stretch;
	}
	.oath-support__submit-btn {
		width: 100%;
	}
	.oath-support__gate-row {
		justify-content: flex-start;
	}
}
