/* Pitbull Training Investment Calculator — styles
   All selectors are scoped under .ptic-wrap to avoid theme conflicts. */

.ptic-wrap {
	--ptic-navy: #142033;
	--ptic-navy-2: #1e2f4a;
	--ptic-gold: #F4A93A;
	--ptic-gold-dark: #D9791A;
	--ptic-bg: #f6f7fb;
	--ptic-card-bg: #ffffff;
	--ptic-text: #1b2333;
	--ptic-text-muted: #6b7280;
	--ptic-border: #e6e8f0;
	--ptic-success: #2fa86a;
	--ptic-danger: #d9534f;
	--ptic-radius: 14px;
	--ptic-shadow: 0 10px 30px rgba(20, 32, 51, 0.08);
	--ptic-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	font-family: var(--ptic-font);
	color: var(--ptic-text);
	max-width: 900px;
	margin: 0 auto;
	box-sizing: border-box;
}
.ptic-wrap *, .ptic-wrap *::before, .ptic-wrap *::after { box-sizing: border-box; }

.ptic-wrap[data-theme="dark"] {
	--ptic-bg: #0e1626;
	--ptic-card-bg: #141f33;
	--ptic-text: #eef1f7;
	--ptic-text-muted: #9aa5b8;
	--ptic-border: #263353;
	--ptic-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.ptic-card {
	background: var(--ptic-card-bg);
	border-radius: var(--ptic-radius);
	box-shadow: var(--ptic-shadow);
	padding: 28px;
	position: relative;
	overflow: visible;
}

/* Defensive resets so the host theme's global styles (line-height,
   margins, font on form controls, etc.) can't bleed into the widget. */
.ptic-wrap button,
.ptic-wrap input,
.ptic-wrap select,
.ptic-wrap textarea {
	margin: 0;
	font-family: inherit;
	line-height: 1.4;
	letter-spacing: normal;
	text-shadow: none;
	box-shadow: none;
	vertical-align: middle;
}
.ptic-wrap h1, .ptic-wrap h2, .ptic-wrap h3, .ptic-wrap h4 {
	line-height: 1.3;
	letter-spacing: normal;
	text-shadow: none;
}
.ptic-wrap p { line-height: 1.5; }

/* Header */
.ptic-header {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 22px;
}
.ptic-header-icon { flex-shrink: 0; }
.ptic-header-text { flex: 1; min-width: 0; }
.ptic-title {
	font-size: clamp(20px, 3.4vw, 28px);
	line-height: 1.2;
	margin: 0 0 4px 0;
	font-weight: 800;
	color: var(--ptic-navy);
	letter-spacing: -0.01em;
}
.ptic-wrap[data-theme="dark"] .ptic-title { color: #fff; }
.ptic-subtitle {
	margin: 0;
	color: var(--ptic-text-muted);
	font-size: 14.5px;
}
.ptic-theme-toggle {
	background: var(--ptic-card-bg);
	border: 1.5px solid var(--ptic-border);
	box-shadow: 0 2px 6px rgba(20, 32, 51, 0.08);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	min-width: 40px;
	padding: 0;
	cursor: pointer;
	font-size: 16px;
	line-height: 1 !important;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	align-self: flex-start;
	position: relative;
	transition: transform .15s ease;
}
.ptic-theme-toggle:hover { transform: scale(1.08); }
.ptic-theme-icon { display: inline-block; line-height: 1; }

/* Progress steps */
.ptic-progress {
	display: flex;
	align-items: center;
	margin-bottom: 26px;
	gap: 4px;
}
.ptic-progress-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	opacity: 0.45;
	transition: opacity .2s ease;
}
.ptic-progress-step.is-active,
.ptic-progress-step.is-done { opacity: 1; }
.ptic-step-num {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--ptic-border);
	color: var(--ptic-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
	transition: all .2s ease;
}
.ptic-progress-step.is-active .ptic-step-num {
	background: linear-gradient(135deg, var(--ptic-gold), var(--ptic-gold-dark));
	color: #fff;
}
.ptic-progress-step.is-done .ptic-step-num {
	background: var(--ptic-success);
	color: #fff;
}
.ptic-step-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--ptic-text-muted);
	white-space: nowrap;
	display: none;
}
.ptic-progress-line {
	flex: 1;
	height: 2px;
	background: var(--ptic-border);
	min-width: 10px;
}
@media (min-width: 560px) {
	.ptic-step-label { display: block; }
}

/* Form / fields */
.ptic-step-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 6px 0;
	color: var(--ptic-navy);
}
.ptic-wrap[data-theme="dark"] .ptic-step-title { color: #fff; }
.ptic-step-desc {
	color: var(--ptic-text-muted);
	font-size: 13.5px;
	margin: 0 0 16px 0;
}

.ptic-grid { display: grid; gap: 16px; margin-bottom: 8px; }
.ptic-grid-2 { grid-template-columns: 1fr; }
.ptic-grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
	.ptic-grid-2 { grid-template-columns: 1fr 1fr; }
	.ptic-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

.ptic-field { display: flex; flex-direction: column; gap: 6px; }
.ptic-field label {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ptic-text);
}
.ptic-optional { font-weight: 400; color: var(--ptic-text-muted); }
.ptic-field input[type="text"],
.ptic-field input[type="number"],
.ptic-field input[type="email"] {
	display: block;
	width: 100%;
	height: 46px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1.5px solid var(--ptic-border);
	background-color: var(--ptic-bg);
	color: var(--ptic-text) !important;
	font-size: 15px;
	line-height: normal;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.ptic-field input:focus {
	outline: none;
	border-color: var(--ptic-gold);
	box-shadow: 0 0 0 3px rgba(244, 169, 58, 0.18);
}

/* Custom select: the real <select> is stretched over the box and kept
   interactive/accessible but visually invisible. A plain <span> renders
   the visible label using flexbox centering, so no browser/theme can
   ever clip or misalign the text via inherited line-height or native
   OS combo-box rendering. */
.ptic-select {
	position: relative;
	height: 46px;
}
.ptic-select select {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 12px;
	border: none;
	background: transparent;
	opacity: 0;
	cursor: pointer;
	font-size: 15px;
	z-index: 2;
}
.ptic-select select:focus + .ptic-select-display {
	border-color: var(--ptic-gold);
	box-shadow: 0 0 0 3px rgba(244, 169, 58, 0.18);
}
.ptic-select-display {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1.5px solid var(--ptic-border);
	background-color: var(--ptic-bg);
	color: var(--ptic-text);
	font-size: 15px;
	font-family: inherit;
	line-height: normal;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ptic-select-display::after {
	content: "";
	flex-shrink: 0;
	width: 14px;
	height: 14px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
}
.ptic-hint {
	font-size: 12px;
	color: var(--ptic-text-muted);
	margin: 0;
}
.ptic-checkbox-label {
	display: flex !important;
	flex-direction: row !important;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	cursor: pointer;
}
.ptic-checkbox-label input { width: 18px; height: 18px; }

.ptic-subblock {
	background: var(--ptic-bg);
	border: 1px solid var(--ptic-border);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 16px;
}
.ptic-subblock h4 {
	margin: 0 0 12px 0;
	font-size: 14px;
	color: var(--ptic-navy);
	font-weight: 700;
}
.ptic-wrap[data-theme="dark"] .ptic-subblock h4 { color: #fff; }

/* Pill toggle group */
.ptic-pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 4px;
}
.ptic-pill {
	border: 1.5px solid var(--ptic-border);
	background: var(--ptic-bg);
	color: var(--ptic-text);
	padding: 10px 16px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: all .15s ease;
}
.ptic-pill:hover { border-color: var(--ptic-gold); }
.ptic-pill.is-active {
	background: linear-gradient(135deg, var(--ptic-gold), var(--ptic-gold-dark));
	border-color: transparent;
	color: #fff;
}

/* Buttons */
.ptic-actions {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 22px;
	flex-wrap: wrap;
}
.ptic-actions-single { justify-content: flex-end; }
.ptic-btn {
	border: none;
	border-radius: 10px;
	padding: 13px 22px;
	font-size: 14.5px;
	font-weight: 700;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
	font-family: inherit;
}
.ptic-btn:active { transform: scale(0.97); }
.ptic-btn-primary {
	background: linear-gradient(135deg, var(--ptic-gold), var(--ptic-gold-dark));
	color: #fff;
	box-shadow: 0 6px 16px rgba(217, 121, 26, 0.35);
}
.ptic-btn-primary:hover { box-shadow: 0 8px 20px rgba(217, 121, 26, 0.45); }
.ptic-btn-ghost {
	background: transparent;
	color: var(--ptic-text-muted);
	border: 1.5px solid var(--ptic-border);
}
.ptic-btn-secondary {
	background: var(--ptic-navy);
	color: #fff;
}
.ptic-btn-outline {
	background: transparent;
	border: 1.5px solid var(--ptic-border);
	color: var(--ptic-text);
}
.ptic-btn-outline:hover { border-color: var(--ptic-gold); }
.ptic-btn-sm { padding: 9px 16px; font-size: 13px; }

/* Results */
.ptic-results-top {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	align-items: center;
	background: linear-gradient(135deg, var(--ptic-navy), var(--ptic-navy-2));
	border-radius: 14px;
	padding: 22px;
	margin-bottom: 20px;
	color: #fff;
}
@media (min-width: 680px) {
	.ptic-results-top { grid-template-columns: 1fr 260px; }
}
.ptic-grand-total { display: flex; flex-direction: column; gap: 4px; }
.ptic-grand-total-label { font-size: 13px; opacity: 0.85; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ptic-grand-total-value { font-size: clamp(30px, 6vw, 44px); font-weight: 800; color: var(--ptic-gold); line-height: 1.1; }
.ptic-grand-total-sub { font-size: 13px; opacity: 0.85; }

.ptic-chart-holder { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ptic-chart-holder canvas { max-width: 100%; height: auto; }
.ptic-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; font-size: 12px; }
.ptic-legend li { display: flex; align-items: center; gap: 6px; opacity: 0.92; }
.ptic-legend .ptic-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.ptic-breakdown-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 20px;
}
@media (min-width: 640px) {
	.ptic-breakdown-grid { grid-template-columns: repeat(3, 1fr); }
}
.ptic-breakdown-card {
	background: var(--ptic-bg);
	border: 1px solid var(--ptic-border);
	border-radius: 12px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.ptic-bd-label { font-size: 12px; color: var(--ptic-text-muted); font-weight: 600; }
.ptic-bd-value { font-size: 19px; font-weight: 800; color: var(--ptic-navy); }
.ptic-wrap[data-theme="dark"] .ptic-bd-value { color: #fff; }

.ptic-finance-box {
	background: rgba(244, 169, 58, 0.12);
	border: 1px solid rgba(244, 169, 58, 0.4);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 20px;
}
.ptic-finance-box h4 { margin: 0 0 6px 0; font-size: 14px; color: var(--ptic-gold-dark); }
.ptic-finance-box p { margin: 0; font-size: 15px; font-weight: 700; }

.ptic-compare { margin-bottom: 20px; }
.ptic-compare h4 { margin: 0 0 4px 0; font-size: 15px; color: var(--ptic-navy); }
.ptic-wrap[data-theme="dark"] .ptic-compare h4 { color: #fff; }
.ptic-compare-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-top: 10px;
}
@media (min-width: 640px) {
	.ptic-compare-grid { grid-template-columns: repeat(4, 1fr); }
}
.ptic-compare-card {
	border: 1.5px solid var(--ptic-border);
	border-radius: 12px;
	padding: 12px;
	text-align: center;
}
.ptic-compare-card.is-selected { border-color: var(--ptic-gold); background: rgba(244, 169, 58, 0.08); }
.ptic-compare-card .cc-label { display: block; font-size: 12px; font-weight: 700; color: var(--ptic-text-muted); margin-bottom: 6px; }
.ptic-compare-card .cc-value { display: block; font-size: 16px; font-weight: 800; color: var(--ptic-navy); }
.ptic-wrap[data-theme="dark"] .ptic-compare-card .cc-value { color: #fff; }

.ptic-value-box {
	background: var(--ptic-bg);
	border: 1px solid var(--ptic-border);
	border-radius: 12px;
	padding: 18px;
	margin-bottom: 20px;
}
.ptic-value-box h4 { margin: 0 0 10px 0; font-size: 15px; color: var(--ptic-navy); }
.ptic-wrap[data-theme="dark"] .ptic-value-box h4 { color: #fff; }
.ptic-value-box ul { margin: 0 0 12px 0; padding-left: 20px; }
.ptic-value-box li { margin-bottom: 6px; font-size: 13.5px; line-height: 1.5; }
.ptic-disclaimer { font-size: 11.5px; color: var(--ptic-text-muted); margin: 0; font-style: italic; }

.ptic-share-box { margin-bottom: 8px; }
.ptic-share-box h4 { margin: 0 0 10px 0; font-size: 15px; color: var(--ptic-navy); }
.ptic-wrap[data-theme="dark"] .ptic-share-box h4 { color: #fff; }
.ptic-email-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ptic-email-row input {
	flex: 1;
	min-width: 200px;
	padding: 11px 12px;
	border-radius: 10px;
	border: 1.5px solid var(--ptic-border);
	background: var(--ptic-bg);
	color: var(--ptic-text);
	font-size: 14px;
}
.ptic-email-status { font-size: 12.5px; margin: 4px 0 14px 0; min-height: 16px; }
.ptic-email-status.is-success { color: var(--ptic-success); }
.ptic-email-status.is-error { color: var(--ptic-danger); }
.ptic-share-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Sticky mobile bar */
.ptic-sticky-bar {
	position: sticky;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--ptic-navy);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-radius: 12px;
	margin-top: 16px;
	font-weight: 700;
	box-shadow: 0 -6px 18px rgba(0,0,0,0.15);
}
@media (min-width: 900px) { .ptic-sticky-bar { display: none !important; } }

/* Print styles */
@media print {
	.ptic-progress, .ptic-actions, .ptic-theme-toggle, .ptic-sticky-bar,
	.ptic-share-box, .ptic-email-row { display: none !important; }
	.ptic-step[data-step-panel] { display: block !important; }
	.ptic-card { box-shadow: none; }
}
