/**
 * MARSO Tools - Frontend Stylesheet
 * Scoped under .marso-tools-
 */

:root {
	--marso-primary: #ff5c8d;
	--marso-primary-hover: #e04b78;
	--marso-primary-light: #fff0f5;
	--marso-text: #2c3338;
	--marso-text-muted: #646970;
	--marso-bg-card: #ffffff;
	--marso-border: #e2e4e7;
	--marso-radius: 12px;
	--marso-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.marso-tools-container,
.marso-tools-landing-page-wrap,
.marso-tools-result-page-wrap,
.marso-tools-card,
.marso-tools-select,
.marso-tools-input,
.marso-tools-btn,
.marso-chip-btn,
.marso-spec-badge,
.marso-budget-item-card {
	font-family: var(--marso-font-family) !important;
	-webkit-font-smoothing: antialiased !important;
	-moz-osx-font-smoothing: grayscale !important;
	text-rendering: optimizeLegibility !important;
}

.marso-tools-container *,
.marso-tools-landing-page-wrap *,
.marso-tools-result-page-wrap * {
	font-family: var(--marso-font-family);
}

.marso-tools-container {
	color: var(--marso-text);
	margin: 0 auto;
	max-width: 860px;
}

.marso-tools-hero {
	text-align: center;
	margin-bottom: 30px;
}

.marso-tools-brand-logo {
	max-height: 60px;
	margin-bottom: 12px;
	object-fit: contain;
}

.marso-tools-title {
	font-size: 28px;
	font-weight: 700;
	color: var(--marso-primary);
	margin: 0 0 10px 0;
	line-height: 1.3;
}

.marso-tools-intro {
	font-size: 16px;
	color: var(--marso-text-muted);
	margin: 0 auto;
	max-width: 680px;
	line-height: 1.5;
}

/* Card & Steps */
.marso-tools-card {
	background: var(--marso-bg-card);
	border: 1px solid var(--marso-border);
	border-radius: var(--marso-radius);
	padding: 24px;
	margin-bottom: 20px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

.marso-tools-card-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 16px 0;
	color: var(--marso-text);
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Form Controls */
.marso-tools-form-group {
	margin-bottom: 18px;
}

.marso-tools-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 8px;
	color: #2c3e50;
}

.marso-tools-select,
.marso-tools-input {
	width: 100% !important;
	height: 48px !important;
	min-height: 48px !important;
	line-height: 1.5 !important;
	padding: 10px 16px !important;
	border: 1.5px solid #dcdfe6 !important;
	border-radius: 10px !important;
	font-size: 15px !important;
	font-family: inherit !important;
	background-color: #ffffff !important;
	color: #2c3e50 !important;
	box-sizing: border-box !important;
	display: block;
	width: 100%;
	transition: all 0.2s ease !important;
	box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
}

.marso-tools-select {
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
	background-size: 14px !important;
	padding-right: 38px !important;
	cursor: pointer !important;
}

.marso-tools-select:hover,
.marso-tools-input:hover {
	border-color: #b3bac5 !important;
}

.marso-tools-select:focus,
.marso-tools-input:focus {
	outline: none !important;
	border-color: #ff5c8d !important;
	box-shadow: 0 0 0 3px rgba(255, 92, 141, 0.18) !important;
	background-color: #ffffff !important;
}

/* Quick Select Chips */
.marso-chips-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 8px;
}

.marso-chip-btn {
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 5px 12px;
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
	transition: all 0.2s ease;
	line-height: 1.4;
}

.marso-chip-btn:hover {
	background: #e2e8f0;
	color: #1e293b;
	border-color: #cbd5e1;
}

.marso-chip-btn.active {
	background: #ff5c8d;
	color: #ffffff;
	border-color: #ff5c8d;
	box-shadow: 0 2px 6px rgba(255, 92, 141, 0.25);
}

/* Auto-Detected Specification Badge */
.marso-spec-badge {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
	border-radius: 10px;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	min-height: 48px;
	box-sizing: border-box;
}

.marso-spec-badge strong {
	color: #15803d;
	background: #ffffff;
	padding: 2px 8px;
	border-radius: 6px;
	border: 1px solid #86efac;
}

.marso-tools-hint {
	font-size: 13px;
	color: var(--marso-text-muted);
	margin-top: 5px;
	display: block;
}

/* Buttons */
.marso-tools-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 25px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.2s ease;
	width: 100%;
	box-sizing: border-box;
}

.marso-tools-btn-primary {
	background: var(--marso-primary);
	color: #fff;
}

.marso-tools-btn-primary:hover {
	background: var(--marso-primary-hover);
}

.marso-tools-btn-secondary {
	background: #f0f0f1;
	color: var(--marso-text);
}

.marso-tools-btn-secondary:hover {
	background: #e2e4e7;
}

/* Result Box */
.marso-tools-result-box {
	background: var(--marso-primary-light);
	border: 2px solid var(--marso-primary);
	border-radius: var(--marso-radius);
	padding: 24px;
	text-align: center;
	margin-top: 25px;
}

.marso-tools-cost-headline {
	font-size: 14px;
	font-weight: 700;
	color: var(--marso-primary);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.marso-tools-cost-number {
	font-size: 38px;
	font-weight: 800;
	color: var(--marso-primary);
	margin: 10px 0;
}

.marso-tools-cost-daily {
	font-size: 15px;
	font-weight: 600;
	color: var(--marso-text);
}

/* Breakdown Grid */
.marso-tools-breakdown-list {
	display: grid;
	gap: 10px;
	margin: 20px 0;
	text-align: left;
}

.marso-tools-breakdown-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fff;
	padding: 12px 16px;
	border-radius: 8px;
	border: 1px solid var(--marso-border);
}

/* Loading Spinner */
.marso-tools-loading-state {
	text-align: center;
	padding: 40px;
}

.marso-tools-spinner {
	width: 36px;
	height: 36px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid var(--marso-primary);
	border-radius: 50%;
	animation: marso-spin 0.8s linear infinite;
	margin: 0 auto 12px auto;
}

@keyframes marso-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.marso-tools-footer {
	text-align: center;
	margin-top: 30px;
	color: var(--marso-text-muted);
}

@media (max-width: 600px) {
	.marso-tools-title {
		font-size: 22px;
	}
	.marso-tools-cost-number {
		font-size: 30px;
	}
	.marso-tools-card {
		padding: 16px;
	}
}

/* Total Budget Calculator Styles */
.marso-total-tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	margin-bottom: 20px;
	padding-bottom: 6px;
	border-bottom: 2px solid #f0f0f1;
}

.marso-total-tab-btn {
	background: #f7f7f8;
	border: 1.5px solid #e2e4e7;
	border-radius: 20px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: #444;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s;
}

.marso-total-tab-btn:hover {
	background: #fff0f5;
	border-color: #ff5c8d;
	color: #ff5c8d;
}

.marso-total-tab-btn.active {
	background: #ff5c8d;
	border-color: #ff5c8d;
	color: #fff;
	box-shadow: 0 2px 8px rgba(255, 92, 141, 0.3);
}

.marso-total-panel {
	display: none;
	animation: marso-fade-in 0.25s ease-in-out;
}

.marso-total-panel.active {
	display: block;
}

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

.marso-budget-item-card {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #fdfdfd;
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 12px 16px;
	margin-bottom: 10px;
	transition: all 0.2s;
}

.marso-budget-item-card:hover {
	border-color: #ffd1e1;
	background: #fffbfe;
}

.marso-budget-item-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 12px;
	margin-right: 8px;
}

.marso-badge-diaper { background: #e3f2fd; color: #1976d2; }
.marso-badge-milk { background: #fff8e1; color: #f57f17; }
.marso-badge-wipes { background: #e8f5e9; color: #388e3c; }
.marso-badge-category { background: #f3e5f5; color: #7b1fa2; }

.marso-btn-remove-item {
	background: #f1f3f4;
	border: 1px solid #ddd;
	color: #666;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	width: 26px;
	height: 26px;
	line-height: 1;
	border-radius: 50%;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-left: 8px;
}

.marso-btn-remove-item:hover {
	color: #fff;
	background: #e53935;
	border-color: #e53935;
	transform: scale(1.15);
	box-shadow: 0 2px 6px rgba(229, 57, 53, 0.35);
}

.marso-toast-notice {
	position: fixed;
	bottom: 35px;
	right: 28px;
	background: #1e293b;
	color: #fff;
	padding: 13px 20px;
	border-radius: 30px;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	z-index: 9999999;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	animation: marso-slide-up 0.3s ease-out;
	transition: transform 0.2s ease, opacity 0.4s ease;
}

.marso-toast-notice:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

@keyframes marso-slide-up {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}
