/**
 * DBH AI Tools — dark + gold professional styling.
 * No external fonts; inherits the theme's font stack.
 */

.dbh-ai-hub,
.dbh-ai-tool {
	--dbh-gold: #d4af37;
	--dbh-gold-deep: #c9a227;
	--dbh-gold-soft: rgba(212, 175, 55, 0.14);
	--dbh-bg: #0d0d10;
	--dbh-panel: #141419;
	--dbh-panel-2: #1b1b22;
	--dbh-border: #2a2a33;
	--dbh-text: #f2f0e8;
	--dbh-muted: #a9a6a0;
	--dbh-error: #ff7a7a;
	color: var(--dbh-text);
	font-size: 16px;
	line-height: 1.6;
}

/* ---------- Hub hero ---------- */

.dbh-ai-hero {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	background-color: var(--dbh-bg);
	background-size: cover;
	background-position: center right;
	border: 1px solid var(--dbh-border);
	margin-bottom: 2.5rem;
}

.dbh-ai-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg, rgba(13, 13, 16, 0.97) 20%, rgba(13, 13, 16, 0.72) 48%, rgba(13, 13, 16, 0.15) 100%);
}

.dbh-ai-hero-inner {
	position: relative;
	z-index: 1;
	padding: 4rem 3rem;
	max-width: 640px;
}

.dbh-ai-eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--dbh-gold);
	border: 1px solid var(--dbh-gold);
	border-radius: 999px;
	padding: 0.35rem 1rem;
	margin-bottom: 1.25rem;
}

.dbh-ai-hero-title {
	font-size: clamp(1.9rem, 4.5vw, 3rem);
	line-height: 1.15;
	margin: 0 0 1rem;
	color: #fff;
	letter-spacing: -0.01em;
}

.dbh-ai-hero-sub {
	font-size: 1.08rem;
	color: var(--dbh-muted);
	margin: 0;
	max-width: 34rem;
}

/* ---------- Hub grid ---------- */

.dbh-ai-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.dbh-ai-card {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	background: var(--dbh-panel);
	border: 1px solid var(--dbh-border);
	border-radius: 14px;
	padding: 1.6rem 1.5rem;
	text-decoration: none !important;
	color: var(--dbh-text);
	transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.dbh-ai-card:hover,
.dbh-ai-card:focus-visible {
	transform: translateY(-4px);
	border-color: var(--dbh-gold);
	box-shadow: 0 14px 34px rgba(212, 175, 55, 0.12);
}

.dbh-ai-card-icon {
	width: 46px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--dbh-gold-soft);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: var(--dbh-gold);
	margin-bottom: 0.35rem;
}

.dbh-ai-card-icon svg {
	width: 24px;
	height: 24px;
}

.dbh-ai-card-title {
	font-size: 1.06rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.35;
}

.dbh-ai-card-desc {
	font-size: 0.92rem;
	color: var(--dbh-muted);
	flex: 1;
}

.dbh-ai-card-cta {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--dbh-gold);
}

/* ---------- Tool page ---------- */

.dbh-ai-tool {
	max-width: 860px;
	margin: 0 auto;
}

.dbh-ai-tool-head {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	background: var(--dbh-panel);
	border: 1px solid var(--dbh-border);
	border-radius: 16px;
	padding: 1.75rem;
	margin-bottom: 1.75rem;
}

.dbh-ai-tool-icon {
	flex: 0 0 auto;
	width: 58px;
	height: 58px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 14px;
	background: var(--dbh-gold-soft);
	border: 1px solid rgba(212, 175, 55, 0.4);
	color: var(--dbh-gold);
}

.dbh-ai-tool-icon svg {
	width: 30px;
	height: 30px;
}

.dbh-ai-tool-title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	margin: 0 0 0.5rem;
	color: #fff;
	line-height: 1.25;
}

.dbh-ai-tool-intro {
	margin: 0;
	color: var(--dbh-muted);
	font-size: 0.98rem;
}

/* ---------- Form ---------- */

.dbh-ai-form {
	background: var(--dbh-panel);
	border: 1px solid var(--dbh-border);
	border-radius: 16px;
	padding: 1.75rem;
	margin-bottom: 1.5rem;
}

.dbh-ai-field {
	margin-bottom: 1.25rem;
}

.dbh-ai-field:last-of-type {
	margin-bottom: 1.5rem;
}

.dbh-ai-field label {
	display: block;
	font-weight: 600;
	font-size: 0.94rem;
	margin-bottom: 0.45rem;
	color: var(--dbh-text);
}

.dbh-ai-required {
	color: var(--dbh-gold);
}

.dbh-ai-field input[type="text"],
.dbh-ai-field input[type="number"],
.dbh-ai-field textarea,
.dbh-ai-field select {
	width: 100%;
	box-sizing: border-box;
	background: var(--dbh-bg);
	border: 1px solid var(--dbh-border);
	border-radius: 10px;
	color: var(--dbh-text);
	padding: 0.8rem 1rem;
	font-size: 0.98rem;
	font-family: inherit;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.dbh-ai-field textarea {
	resize: vertical;
	min-height: 90px;
}

.dbh-ai-field input::placeholder,
.dbh-ai-field textarea::placeholder {
	color: #6d6a64;
}

.dbh-ai-field input:focus,
.dbh-ai-field textarea:focus,
.dbh-ai-field select:focus {
	outline: none;
	border-color: var(--dbh-gold);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.dbh-ai-field select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.75rem;
	cursor: pointer;
}

.dbh-ai-field select option {
	background: var(--dbh-panel-2);
	color: var(--dbh-text);
}

/* ---------- Buttons ---------- */

.dbh-ai-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.7rem;
	background: linear-gradient(135deg, var(--dbh-gold) 0%, var(--dbh-gold-deep) 100%);
	color: #141414;
	font-weight: 700;
	font-size: 1rem;
	border: none;
	border-radius: 10px;
	padding: 0.9rem 2.2rem;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.dbh-ai-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(212, 175, 55, 0.35);
}

.dbh-ai-btn:disabled {
	opacity: 0.65;
	cursor: wait;
}

.dbh-ai-spinner {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2.5px solid rgba(20, 20, 20, 0.3);
	border-top-color: #141414;
	animation: dbh-ai-spin 0.7s linear infinite;
}

@keyframes dbh-ai-spin {
	to { transform: rotate(360deg); }
}

.dbh-ai-copy {
	background: transparent;
	border: 1px solid var(--dbh-gold);
	color: var(--dbh-gold);
	font-size: 0.85rem;
	font-weight: 600;
	border-radius: 8px;
	padding: 0.4rem 1rem;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}

.dbh-ai-copy:hover {
	background: var(--dbh-gold);
	color: #141414;
}

/* ---------- Output ---------- */

.dbh-ai-output-wrap {
	background: var(--dbh-panel);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 16px;
	padding: 1.75rem;
	margin-bottom: 1.5rem;
	animation: dbh-ai-fadein 0.35s ease;
}

@keyframes dbh-ai-fadein {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.dbh-ai-output-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.dbh-ai-output-label {
	font-weight: 700;
	font-size: 0.95rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dbh-gold);
}

.dbh-ai-output {
	background: var(--dbh-bg);
	border: 1px solid var(--dbh-border);
	border-radius: 10px;
	padding: 1.25rem 1.4rem;
	font-size: 0.97rem;
	line-height: 1.7;
	white-space: normal;
}

.dbh-ai-output strong {
	color: #fff;
}

.dbh-ai-table-wrap {
	overflow-x: auto;
	margin: 0.75rem 0;
}

table.dbh-ai-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.92rem;
}

table.dbh-ai-table th,
table.dbh-ai-table td {
	border: 1px solid var(--dbh-border);
	padding: 0.65rem 0.9rem;
	text-align: left;
	vertical-align: top;
}

table.dbh-ai-table th {
	background: var(--dbh-gold-soft);
	color: var(--dbh-gold);
	font-weight: 700;
}

table.dbh-ai-table tr:nth-child(even) td {
	background: rgba(255, 255, 255, 0.02);
}

.dbh-ai-provider {
	margin-top: 0.9rem;
	font-size: 0.8rem;
	color: #6d6a64;
}

/* ---------- Errors ---------- */

.dbh-ai-error,
.dbh-ai-error-box {
	background: rgba(255, 122, 122, 0.08);
	border: 1px solid rgba(255, 122, 122, 0.4);
	color: #ffb3b3;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.dbh-ai-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.dbh-ai-grid {
		grid-template-columns: 1fr;
	}

	.dbh-ai-hero-inner {
		padding: 2.5rem 1.5rem;
	}

	.dbh-ai-tool-head,
	.dbh-ai-form,
	.dbh-ai-output-wrap {
		padding: 1.25rem;
	}

	.dbh-ai-tool-head {
		flex-direction: column;
		gap: 0.9rem;
	}

	.dbh-ai-btn {
		width: 100%;
		justify-content: center;
	}
}
