/**
 * Uncutbee Tools Main Stylesheet
 * Responsive, accessible, light-themed styling for all interactive relationship tools.
 */

.ub-tool-container {
	background: #ffffff;
	border: 1px solid #f1e5e9;
	border-radius: 20px;
	padding: 2.5rem;
	box-shadow: 0 4px 20px rgba(225, 29, 72, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
	position: relative;
	margin: 2rem auto;
	max-width: 900px;
	transition: all 0.2s ease;
}

@media (max-width: 768px) {
	.ub-tool-container {
		padding: 1.5rem 1rem;
		border-radius: 16px;
	}
}

/* Skeleton Loading State */
.ub-tool-skeleton {
	display: none;
}

.ub-tool-loading .ub-tool-skeleton {
	display: block;
}

.ub-skeleton-line {
	background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
	background-size: 200% 100%;
	animation: ub-skeleton 1.5s infinite;
	border-radius: 6px;
}

@keyframes ub-skeleton {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.ub-tool-noscript-alert {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #991b1b;
	padding: 1rem 1.25rem;
	border-radius: 10px;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

/* Step-by-Step Progress Header */
.ub-steps-indicator {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 2.25rem;
	position: relative;
}

.ub-steps-indicator::before {
	content: "";
	position: absolute;
	top: 18px;
	left: 20px;
	right: 20px;
	height: 3px;
	background: #f1e5e9;
	z-index: 1;
}

.ub-step-item {
	position: relative;
	z-index: 2;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
}

.ub-step-circle {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ffffff;
	border: 2px solid #cbd5e1;
	color: #64748b;
	font-weight: 700;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.ub-step-label {
	font-size: 0.8rem;
	font-weight: 600;
	color: #64748b;
}

.ub-step-item.is-active .ub-step-circle {
	background: #e11d48;
	border-color: #e11d48;
	color: #ffffff;
	box-shadow: 0 0 0 4px #ffe4e6;
}

.ub-step-item.is-active .ub-step-label {
	color: #e11d48;
}

.ub-step-item.is-completed .ub-step-circle {
	background: #10b981;
	border-color: #10b981;
	color: #ffffff;
}

/* Card Selection Grids */
.ub-options-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
	margin: 1.5rem 0;
}

.ub-option-card {
	background: #ffffff;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.15rem 1rem;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-align: left;
	font-family: inherit;
	color: #1e293b;
	position: relative;
}

.ub-option-card:hover {
	border-color: #fecdd3;
	background: #fffafb;
	transform: translateY(-2px);
}

.ub-option-card.is-selected {
	border-color: #e11d48;
	background: #fff5f7;
	color: #be123c;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
}

.ub-option-card__icon {
	font-size: 1.35rem;
	flex-shrink: 0;
}

.ub-option-card__text {
	font-size: 0.95rem;
	line-height: 1.35;
}

/* Pills Selection (Time / Style) */
.ub-pills-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.5rem 0;
}

.ub-pill-btn {
	background: #ffffff;
	border: 1.5px solid #cbd5e1;
	padding: 0.65rem 1.35rem;
	border-radius: 9999px;
	font-size: 0.95rem;
	font-weight: 500;
	color: #334155;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.ub-pill-btn:hover {
	border-color: #e11d48;
	color: #e11d48;
	background: #fff5f7;
}

.ub-pill-btn.is-selected {
	background: #e11d48;
	border-color: #e11d48;
	color: #ffffff;
	font-weight: 600;
	box-shadow: 0 4px 10px rgba(225, 29, 72, 0.2);
}

/* Tool Navigation Buttons */
.ub-wizard-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #f1e5e9;
	gap: 1rem;
	flex-wrap: wrap;
}

.ub-btn-prev {
	background: #f1f5f9;
	color: #475569;
	border: none;
	padding: 0.75rem 1.5rem;
	border-radius: 9999px;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.ub-btn-prev:hover {
	background: #e2e8f0;
	color: #1e293b;
}

.ub-btn-next, .ub-btn-generate {
	background: #e11d48;
	color: #ffffff;
	border: none;
	padding: 0.75rem 1.75rem;
	border-radius: 9999px;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	box-shadow: 0 4px 14px rgba(225, 29, 72, 0.25);
	transition: all 0.2s ease;
	font-family: inherit;
}

.ub-btn-next:hover, .ub-btn-generate:hover {
	background: #be123c;
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(225, 29, 72, 0.35);
}

/* Results Guide View */
.ub-result-card {
	animation: ub-fade-in 0.3s ease;
}

@keyframes ub-fade-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

.ub-opener-box {
	background: linear-gradient(135deg, #fff0f5 0%, #fffaf5 100%);
	border: 1px solid #fecdd3;
	border-radius: 16px;
	padding: 1.75rem 2rem;
	margin-bottom: 2rem;
	position: relative;
}

.ub-opener-label {
	font-size: 0.75rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #e11d48;
	margin-bottom: 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.ub-opener-text {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.45;
	margin: 0;
}

/* Section Containers inside Result */
.ub-result-section {
	margin-bottom: 2.25rem;
}

.ub-result-section-title {
	font-size: 1.15rem;
	font-weight: 700;
	color: #1e293b;
	margin: 0 0 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ub-starters-list {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
}

.ub-starter-item {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1rem 1.25rem;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	transition: all 0.2s ease;
}

.ub-starter-item:hover {
	border-color: #cbd5e1;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ub-starter-num {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #ffe4e6;
	color: #e11d48;
	font-size: 0.8rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 2px;
}

.ub-starter-text {
	font-size: 1rem;
	color: #1e293b;
	line-height: 1.5;
	flex-grow: 1;
}

.ub-btn-copy-single {
	background: transparent;
	border: none;
	cursor: pointer;
	color: #94a3b8;
	padding: 0.25rem;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.ub-btn-copy-single:hover {
	color: #e11d48;
	background: #fff1f2;
}

/* Empathy & Rules Box */
.ub-rules-box {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 14px;
	padding: 1.5rem 1.75rem;
	margin-bottom: 2rem;
}

.ub-rules-box h4 {
	color: #166534;
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.ub-rules-list {
	margin: 0;
	padding-left: 1.25rem;
	color: #1e293b;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* Activity Box */
.ub-activity-box {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 14px;
	padding: 1.5rem 1.75rem;
	margin-bottom: 2rem;
}

.ub-activity-box h4 {
	color: #92400e;
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.5rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.ub-activity-box p {
	margin: 0;
	font-size: 0.95rem;
	color: #1e293b;
	line-height: 1.55;
}

/* Action Toolbar on Generated Guide */
.ub-guide-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid #f1e5e9;
}

.ub-tool-btn {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #334155;
	padding: 0.65rem 1.25rem;
	border-radius: 9999px;
	font-size: 0.9rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.ub-tool-btn:hover {
	border-color: #e11d48;
	color: #e11d48;
	background: #fff5f7;
}

.ub-tool-btn.is-primary {
	background: #e11d48;
	border-color: #e11d48;
	color: #ffffff;
}

.ub-tool-btn.is-primary:hover {
	background: #be123c;
}

/* Toast Notification (Accessible) */
.ub-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: #18181b;
	color: #ffffff;
	padding: 0.85rem 1.5rem;
	border-radius: 9999px;
	font-size: 0.9rem;
	font-weight: 600;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	z-index: 1000;
	opacity: 0;
	transform: translateY(12px);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none;
}

.ub-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Flashcard Shuffle Style (Conversation Starters) */
.ub-flashcard {
	background: linear-gradient(135deg, #ffffff 0%, #fffbf8 100%);
	border: 2px solid #fecdd3;
	border-radius: 20px;
	padding: 3rem 2rem;
	text-align: center;
	box-shadow: 0 8px 24px rgba(225, 29, 72, 0.08);
	margin: 2rem 0;
	min-height: 180px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.ub-flashcard-category {
	font-size: 0.8rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #e11d48;
	margin-bottom: 1rem;
}

.ub-flashcard-question {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.45;
	margin: 0;
	max-width: 650px;
}

/* Print Styles for Tool Guides */
@media print {
	.ub-steps-indicator,
	.ub-wizard-actions,
	.ub-guide-toolbar,
	.ub-btn-copy-single,
	.ub-toast {
		display: none !important;
	}

	.ub-tool-container {
		border: none !important;
		box-shadow: none !important;
		padding: 0 !important;
		max-width: 100% !important;
	}

	.ub-opener-box, .ub-starter-item, .ub-rules-box, .ub-activity-box {
		border: 1px solid #cccccc !important;
		background: #ffffff !important;
		color: #000000 !important;
		break-inside: avoid;
	}
}

/* ============================================
   Contact Form (privacy-first honeypot form)
   ============================================ */
.ub-contact-form-container {
	max-width: 640px;
	margin: 0 auto;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.ub-contact-form {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
	margin: 0;
}

.ub-form-group {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.ub-form-group label {
	font-size: 0.88rem;
	font-weight: 700;
	color: #1e293b;
}

.ub-form-group .required {
	color: #e11d48;
}

.ub-input,
.ub-select,
.ub-textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.7rem 0.95rem;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	font-size: 0.98rem;
	font-family: inherit;
	color: #0f172a;
	background: #ffffff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ub-input:focus,
.ub-select:focus,
.ub-textarea:focus {
	outline: none;
	border-color: #e11d48;
	box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.ub-textarea {
	resize: vertical;
	min-height: 120px;
}

.ub-notice {
	border-radius: 12px;
	padding: 0.9rem 1.1rem;
	font-size: 0.95rem;
	line-height: 1.55;
	margin-bottom: 1.25rem;
}

.ub-notice-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

.ub-notice-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}
