/**
 * AL Prompt Hub - AI Tool Workspace Design System
 * Unified Modern Light Styles for all 10 AI Tools
 */

/* ==========================================================================
   Tool Page Breadcrumbs & Hero
   ========================================================================== */
.aph-tool-page-wrapper {
	background-color: #F8FAFC;
	color: #0F172A;
	min-height: 100vh;
	padding-bottom: 80px;
}

.aph-tool-breadcrumbs {
	padding: 18px 0;
	font-size: 0.875rem;
	color: #64748B;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.aph-tool-breadcrumbs a {
	color: #64748B;
	text-decoration: none;
	transition: color 0.2s ease;
}

.aph-tool-breadcrumbs a:hover {
	color: #2563EB;
}

.aph-tool-breadcrumbs .sep {
	color: #CBD5E1;
}

.aph-tool-breadcrumbs .current {
	color: #0F172A;
	font-weight: 600;
}

.aph-tool-hero {
	padding: 10px 0 32px 0;
	position: relative;
}

.aph-tool-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 14px;
	border-radius: 9999px;
	background: #EFF6FF;
	border: 1px solid #DBEAFE;
	color: #2563EB;
	font-size: 0.8125rem;
	font-weight: 700;
	margin-bottom: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.aph-tool-hero__badge-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #2563EB;
	box-shadow: 0 0 6px rgba(37, 99, 235, 0.4);
}

.aph-tool-hero__title {
	font-size: clamp(2rem, 3.5vw, 2.75rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	color: #0F172A;
	line-height: 1.15;
	margin: 0 0 10px 0;
}

.aph-tool-hero__title-gradient {
	background: linear-gradient(135deg, #2563EB 0%, #4F46E5 50%, #7C3AED 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.aph-tool-hero__subtitle {
	font-size: 1.0625rem;
	color: #475569;
	line-height: 1.6;
	max-width: 760px;
	margin: 0 0 18px 0;
}

.aph-tool-hero__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 4px;
}

.aph-tool-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.775rem;
	font-weight: 600;
	padding: 5px 12px;
	border-radius: 8px;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	color: #334155;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   Tool Workspace Layout (Immediately Above the Fold)
   ========================================================================== */
.aph-tool-workspace {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	gap: 24px;
	margin-bottom: 48px;
	align-items: start;
}

@media (max-width: 991px) {
	.aph-tool-workspace {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

/* Workspace Panels */
.aph-tool-panel {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.02);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aph-tool-panel:hover {
	border-color: #CBD5E1;
	box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08);
}

.aph-tool-panel__header {
	padding: 16px 20px;
	background: #F8FAFC;
	border-bottom: 1px solid #E2E8F0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.aph-tool-panel__title-box {
	display: flex;
	align-items: center;
	gap: 10px;
}

.aph-tool-panel__icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #EEF2FF;
	color: #4F46E5;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	flex-shrink: 0;
}

.aph-tool-panel__title {
	font-size: 1rem;
	font-weight: 700;
	color: #0F172A;
	margin: 0;
	letter-spacing: -0.01em;
}

.aph-tool-panel__status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 9999px;
	background: #F1F5F9;
	color: #475569;
}

.aph-tool-panel__status--active {
	background: #ECFDF5;
	color: #059669;
}

.aph-tool-panel__body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	flex: 1;
}

.aph-tool-panel__footer {
	padding: 16px 20px;
	background: #F8FAFC;
	border-top: 1px solid #E2E8F0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

/* ==========================================================================
   Form Controls & Inputs
   ========================================================================== */
.aph-form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px;
}

.aph-field-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.aph-field-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #1E293B;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.aph-field-label__hint {
	font-size: 0.75rem;
	font-weight: 400;
	color: #64748B;
}

.aph-field-input,
.aph-field-select,
.aph-field-textarea {
	width: 100%;
	background: #FFFFFF;
	border: 1px solid #CBD5E1;
	border-radius: 10px;
	color: #0F172A;
	padding: 10px 14px;
	font-size: 0.875rem;
	font-family: inherit;
	transition: all 0.2s ease;
	outline: none;
}

.aph-field-input:focus,
.aph-field-select:focus,
.aph-field-textarea:focus {
	border-color: #2563EB;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
	background: #FFFFFF;
}

.aph-field-textarea {
	min-height: 140px;
	resize: vertical;
	line-height: 1.55;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.875rem;
}

.aph-textarea-container {
	position: relative;
}

.aph-textarea-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 6px;
	font-size: 0.75rem;
	color: #64748B;
}

.aph-token-counter {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #475569;
}

/* Sample Presets */
.aph-presets {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	margin-bottom: 2px;
}

.aph-presets__label {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748B;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.aph-preset-pill {
	background: #F1F5F9;
	border: 1px solid #E2E8F0;
	color: #334155;
	font-size: 0.75rem;
	padding: 3px 10px;
	border-radius: 9999px;
	cursor: pointer;
	transition: all 0.15s ease;
	user-select: none;
}

.aph-preset-pill:hover {
	background: #EFF6FF;
	border-color: #93C5FD;
	color: #2563EB;
	transform: translateY(-1px);
}

/* Action Buttons */
.aph-tool-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	font-size: 0.875rem;
	font-weight: 600;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s ease;
	border: 1px solid transparent;
	text-decoration: none;
	user-select: none;
}

.aph-tool-btn--primary {
	background: #2563EB;
	color: #FFFFFF !important;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.aph-tool-btn--primary:hover {
	background: #1D4ED8;
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
	transform: translateY(-1px);
}

.aph-tool-btn--primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.aph-tool-btn--secondary {
	background: #F1F5F9;
	color: #1E293B;
	border: 1px solid #CBD5E1;
}

.aph-tool-btn--secondary:hover {
	background: #E2E8F0;
	color: #0F172A;
}

.aph-tool-btn--sm {
	padding: 6px 12px;
	font-size: 0.8125rem;
	border-radius: 8px;
}

.aph-tool-btn--outline {
	background: #FFFFFF;
	border-color: #CBD5E1;
	color: #334155;
}

.aph-tool-btn--outline:hover {
	background: #F8FAFC;
	border-color: #94A3B8;
	color: #0F172A;
}

.aph-tool-btn--copy.copied {
	background: #10B981 !important;
	border-color: #059669 !important;
	color: #FFFFFF !important;
}

/* Loading Spinner */
.aph-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-top-color: #FFFFFF;
	border-radius: 50%;
	animation: aph-spin 0.6s linear infinite;
}

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

/* ==========================================================================
   Output & Results Panel
   ========================================================================== */
.aph-tool-output-box {
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 12px;
	padding: 16px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.875rem;
	color: #0F172A;
	line-height: 1.6;
	white-space: pre-wrap;
	word-break: break-word;
	min-height: 220px;
	max-height: 480px;
	overflow-y: auto;
	position: relative;
}

.aph-tool-output-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 220px;
	color: #64748B;
	gap: 10px;
}

.aph-tool-output-placeholder svg {
	width: 44px;
	height: 44px;
	stroke: #94A3B8;
}

/* Diff / Before & After (Prompt Optimizer) */
.aph-diff-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 640px) {
	.aph-diff-container {
		grid-template-columns: 1fr;
	}
}

.aph-diff-col {
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.aph-diff-col--before {
	border-color: #FECACA;
	background: #FEF2F2;
}

.aph-diff-col--after {
	border-color: #A7F3D0;
	background: #ECFDF5;
}

.aph-diff-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
	width: fit-content;
}

.aph-diff-tag--before {
	background: #FEE2E2;
	color: #DC2626;
}

.aph-diff-tag--after {
	background: #D1FAE5;
	color: #059669;
}

.aph-improvements-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.aph-improvement-badge {
	font-size: 0.75rem;
	background: #EFF6FF;
	border: 1px solid #BFDBFE;
	color: #1D4ED8;
	padding: 3px 8px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Pillar Scores (Prompt Analyzer) */
.aph-analyzer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.aph-pillar-card {
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.aph-pillar-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.75rem;
	color: #64748B;
}

.aph-pillar-score {
	font-size: 1.25rem;
	font-weight: 800;
	color: #0F172A;
}

.aph-pillar-bar-bg {
	height: 6px;
	background: #E2E8F0;
	border-radius: 9999px;
	overflow: hidden;
}

.aph-pillar-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #2563EB, #4F46E5);
	border-radius: 9999px;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.aph-grade-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 8px;
	background: #EEF2FF;
	border: 1px solid #C7D2FE;
	color: #4338CA;
	font-weight: 700;
	font-size: 0.9375rem;
}

/* Image & Screenshot Dropzone */
.aph-dropzone {
	border: 2px dashed #CBD5E1;
	border-radius: 12px;
	padding: 32px 20px;
	text-align: center;
	background: #FFFFFF;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.aph-dropzone:hover,
.aph-dropzone--dragover {
	border-color: #2563EB;
	background: #EFF6FF;
}

.aph-dropzone__icon {
	width: 48px;
	height: 48px;
	color: #2563EB;
}

.aph-dropzone__text {
	font-size: 0.9375rem;
	font-weight: 600;
	color: #0F172A;
}

.aph-dropzone__subtext {
	font-size: 0.75rem;
	color: #64748B;
}

.aph-dropzone__preview {
	max-height: 180px;
	border-radius: 8px;
	object-fit: contain;
	display: none;
	border: 1px solid #E2E8F0;
}

/* Next Step Pipeline Bar */
.aph-pipeline-bar {
	margin-top: 14px;
	padding: 12px 14px;
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.aph-pipeline-bar__text {
	font-size: 0.8125rem;
	color: #475569;
}

.aph-pipeline-bar__links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* ==========================================================================
   Informational / SEO & AEO Content Sections
   ========================================================================== */
.aph-tool-section {
	padding: 56px 0;
	border-top: 1px solid #E2E8F0;
}

.aph-tool-section__header {
	margin-bottom: 36px;
	text-align: left;
}

.aph-tool-section__tag {
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #2563EB;
	margin-bottom: 8px;
}

.aph-tool-section__title {
	font-size: clamp(1.6rem, 2.5vw, 2.1rem);
	font-weight: 800;
	color: #0F172A;
	margin: 0 0 10px 0;
	letter-spacing: -0.02em;
}

.aph-tool-section__desc {
	font-size: 1rem;
	color: #475569;
	max-width: 720px;
	line-height: 1.6;
	margin: 0;
}

/* Step-by-Step Workflow */
.aph-steps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
}

.aph-step-card {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	position: relative;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
	transition: all 0.2s ease;
}

.aph-step-card:hover {
	border-color: #CBD5E1;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
	transform: translateY(-2px);
}

.aph-step-card__number {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #EFF6FF;
	color: #2563EB;
	font-weight: 800;
	font-size: 0.9375rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.aph-step-card__title {
	font-size: 1.0625rem;
	font-weight: 700;
	color: #0F172A;
	margin: 0;
}

.aph-step-card__desc {
	font-size: 0.875rem;
	color: #64748B;
	line-height: 1.6;
	margin: 0;
}

/* In-depth Educational Guide */
.aph-guide-content {
	color: #334155;
	line-height: 1.8;
	font-size: 1rem;
}

.aph-guide-content h2 {
	font-size: 1.5rem;
	font-weight: 800;
	color: #0F172A;
	margin: 36px 0 16px 0;
	letter-spacing: -0.015em;
}

.aph-guide-content h3 {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1E293B;
	margin: 28px 0 12px 0;
}

.aph-guide-content p {
	margin-bottom: 18px;
}

.aph-guide-content ul,
.aph-guide-content ol {
	margin-bottom: 20px;
	padding-left: 24px;
}

.aph-guide-content li {
	margin-bottom: 8px;
}

.aph-guide-content a {
	color: #2563EB;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

.aph-guide-content a:hover {
	color: #1D4ED8;
}

.aph-callout {
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-left: 4px solid #2563EB;
	border-radius: 0 10px 10px 0;
	padding: 16px 20px;
	margin: 24px 0;
}

.aph-callout__title {
	font-weight: 700;
	color: #0F172A;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.aph-callout p:last-child {
	margin-bottom: 0;
}

/* FAQ Accordion */
.aph-faq-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: 860px;
}

.aph-faq-item {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.aph-faq-item:hover {
	border-color: #CBD5E1;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.aph-faq-question {
	width: 100%;
	padding: 18px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: transparent;
	border: none;
	color: #0F172A;
	font-size: 1rem;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
	gap: 12px;
}

.aph-faq-icon {
	width: 20px;
	height: 20px;
	transition: transform 0.2s ease;
	flex-shrink: 0;
	color: #2563EB;
}

.aph-faq-item.active .aph-faq-icon {
	transform: rotate(180deg);
}

.aph-faq-answer {
	display: none;
	padding: 0 20px 20px 20px;
	color: #475569;
	font-size: 0.9375rem;
	line-height: 1.7;
}

.aph-faq-item.active .aph-faq-answer {
	display: block;
}

/* Related Tools & Templates Grid */
.aph-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
}

.aph-related-card {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	padding: 22px;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
	transition: all 0.2s ease;
}

.aph-related-card:hover {
	border-color: #93C5FD;
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(37, 99, 235, 0.08);
	background: #FFFFFF;
}

.aph-related-card__icon {
	width: 36px;
	height: 36px;
	border-radius: 8px;
	background: #EFF6FF;
	color: #2563EB;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
}

.aph-related-card__title {
	font-size: 1.0625rem;
	font-weight: 700;
	color: #0F172A;
	margin: 0;
}

.aph-related-card__desc {
	font-size: 0.875rem;
	color: #64748B;
	line-height: 1.5;
	margin: 0;
}

.aph-related-card__cta {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #2563EB;
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: auto;
}
