/* css-gradient — 新版工具頁（對齊全站 app.css / color-converter 佈局） */

.grad-tool-header {
	margin-bottom: 24px;
}

.tool-header-actions {
	display: none !important;
}

.tool-top-ad-primary {
	margin: 16px 0 20px;
}

.tool-top-ad-secondary {
	margin: 20px 0;
}

.grad-work-toolbar {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 10px;
	padding-top: 12px;
	margin-bottom: 0;
	min-width: 0;
}

.grad-work-toolbar .toolbar-group {
	flex: 0 1 auto;
	min-width: 0;
}

.grad-toolbar-hint {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--c-text-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: min(100%, 520px);
}

.grad-toolbar-hint i {
	flex-shrink: 0;
	color: var(--c-primary);
}

.grad-toolbar-actions {
	margin-left: auto;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
}

.grad-work-toolbar .btn.btn-primary.btn-sm,
.grad-work-toolbar .btn.btn-outline.btn-sm {
	height: 34px;
	padding-top: 0;
	padding-bottom: 0;
	white-space: nowrap;
}

.grad-editor-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
	margin-bottom: 10px;
}

.grad-flow-bridge {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	align-self: stretch;
}

.grad-flow-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 1px solid var(--c-border);
	background: var(--c-surface-2);
	color: var(--c-text-2);
	font-size: 1.25rem;
}

.grad-editor-wrap .editor-panel {
	min-height: 0;
}

.grad-controls-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	flex: 1;
}

.grad-stops-block {
	padding-top: 4px;
	border-top: 1px solid var(--c-border);
	margin-top: 4px;
	padding-bottom: 2px;
}

.stop-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-wrap: nowrap;
	min-width: 0;
}

.stop-color-swatch {
	flex-shrink: 0;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: 0.4rem;
	border: 2px solid var(--c-border);
	cursor: pointer;
	padding: 0;
	overflow: hidden;
}

.stop-color-swatch input[type="color"] {
	width: 160%;
	height: 160%;
	margin: -30%;
	border: none;
	cursor: pointer;
	background: none;
}

.stop-hex-input {
	width: 96px;
	flex-shrink: 0;
}

.grad-presets-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.grad-presets-wrap .grad-preset-btn {
	border-radius: 10px;
	min-height: 34px;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 6px 12px;
	border: 1px solid var(--c-border);
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.grad-output-body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	gap: 0;
	flex: 1;
}

.grad-preview {
	height: 200px;
	border-radius: var(--radius, 12px);
	transition: background 0.2s ease;
	min-height: 160px;
}

.grad-css-output {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.84rem;
	resize: vertical;
	min-height: 72px;
}

.grad-angle-val {
	font-weight: 700;
	color: var(--c-primary);
	font-size: 0.85rem;
}

.grad-info-section {
	margin-top: 34px !important;
	padding-top: 28px !important;
}

.grad-usage-note {
	font-size: 0.86rem;
	color: var(--c-text-2);
	line-height: 1.7;
	margin: 0;
}

.grad-faq-list .faq-item {
	margin-bottom: 12px;
	border-radius: 16px;
}

.grad-faq-list .faq-q {
	font-size: 0.9rem;
	padding: 14px 18px;
}

.grad-faq-list .faq-a {
	display: none;
	font-size: 0.86rem;
	line-height: 1.7;
	padding-top: 12px;
}

.grad-faq-list .faq-item.is-open .faq-a {
	display: block;
}

.grad-faq-list .faq-item .faq-q i {
	transition: transform 0.2s ease;
}

.grad-faq-list .faq-item.is-open .faq-q i {
	transform: rotate(180deg);
}

.grad-info-section .rk-item {
	padding: 18px 0;
	margin: 0;
	border-radius: 0;
	background: transparent !important;
}

.grad-info-section .rk-thumb {
	width: 84px;
	height: 84px;
	min-width: 84px;
	min-height: 84px;
	border-radius: 14px;
	align-self: flex-start;
}

.grad-info-section .rk-thumb::after {
	background: rgba(0, 0, 0, 0.16);
}

.grad-info-section .rk-thumb-icon {
	font-size: 1.45rem;
}

.grad-info-section .rk-info > .d-flex {
	margin-bottom: 4px !important;
}

.grad-info-section .rk-info > .d-flex > div:first-child,
.grad-info-section .rk-tag {
	display: none !important;
}

.grad-info-section .rk-title {
	font-size: 0.875rem;
	line-height: 1.35;
	margin-bottom: 6px;
}

.grad-info-section .rk-excerpt {
	font-size: 0.77rem;
	line-height: 1.55;
}

.grad-info-section .rk-date {
	margin-top: 8px;
	font-size: 0.88rem;
}

@media (max-width: 575.98px) {
	.grad-work-toolbar {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.grad-toolbar-actions {
		margin-left: 0;
		width: 100%;
		justify-content: flex-end;
		flex-wrap: wrap;
	}
}

@media (max-width: 767.98px) {
	.grad-editor-wrap {
		grid-template-columns: 1fr;
	}

	.grad-flow-bridge {
		min-height: unset;
		padding: 6px 0;
	}

	.grad-flow-arrow .bi {
		transform: rotate(90deg);
	}

	
	
	.grad-info-section .rk-title {
		font-size: 1rem;
	}

	.grad-info-section .rk-excerpt {
		font-size: 0.84rem;
	}
}
