/* ==========================================================================
 * Ironbound Habit Tracker — namespaced styles
 * Every rule prefixed with .ihbt-shell to defend against Elementor / theme bleed.
 * Brand colors hardcoded; do NOT inherit from theme.
 * ========================================================================== */

.ihbt-shell {
	background: #0f0f10;
	color: #ffffff;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	padding: 48px 16px;
	min-width: 0;
}

.ihbt-shell *,
.ihbt-shell *::before,
.ihbt-shell *::after {
	box-sizing: border-box;
	min-width: 0;
}

/* HTML `hidden` attribute must always win — author CSS can otherwise override
   the UA stylesheet's `[hidden] { display: none }`. Without this, hidden
   wrappers can leak through media queries that set display: flex/block. */
.ihbt-shell [hidden] {
	display: none !important;
}

.ihbt-shell .ihbt-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* ---------- Header ---------- */

.ihbt-shell .ihbt-header {
	text-align: center;
	margin-bottom: 40px;
}

.ihbt-shell .ihbt-chip {
	display: inline-block;
	padding: 6px 18px;
	border: 1px solid #fb923c;
	border-radius: 999px;
	color: #fb923c;
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 12px;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	margin-bottom: 24px;
}

.ihbt-shell .ihbt-headline {
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: clamp(36px, 6vw, 64px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #ffffff;
	margin: 0 0 16px;
}

.ihbt-shell .ihbt-subhead {
	font-size: 16px;
	line-height: 1.6;
	color: #a0a0a0;
	max-width: 720px;
	margin: 0 auto;
}

/* ---------- Grid layout ---------- */

.ihbt-shell .ihbt-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	gap: 24px;
	align-items: start;
}

@media (max-width: 900px) {
	.ihbt-shell .ihbt-grid {
		grid-template-columns: 1fr;
	}
}

.ihbt-shell .ihbt-panel {
	background: #1a1a1c;
	border: 1px solid #2a2a2c;
	border-radius: 8px;
	padding: 28px;
	min-width: 0;
	overflow-wrap: break-word;
}

.ihbt-shell .ihbt-panel--setup {
	border-top: 3px solid #fb923c;
}

.ihbt-shell .ihbt-panel--grid {
	border-top: 3px solid #fb923c;
}

.ihbt-shell .ihbt-panel-title {
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #ffffff;
	margin: 0 0 20px;
}

.ihbt-shell .ihbt-section {
	margin-bottom: 28px;
}

.ihbt-shell .ihbt-section:last-child {
	margin-bottom: 0;
}

.ihbt-shell .ihbt-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 10px;
}

.ihbt-shell .ihbt-label {
	display: block;
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #a0a0a0;
	margin-bottom: 8px;
}

.ihbt-shell .ihbt-helper {
	font-size: 13px;
	line-height: 1.5;
	color: #8a8a8a;
	margin: 8px 0 0;
}

/* ---------- Suggested chips ---------- */

.ihbt-shell .ihbt-suggested {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ihbt-shell .ihbt-suggest-chip {
	background: transparent !important;
	border: 1px solid #3a3a3c !important;
	color: #ffffff !important;
	padding: 8px 14px !important;
	border-radius: 999px !important;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
	text-decoration: none !important;
	line-height: 1.2 !important;
}

.ihbt-shell .ihbt-suggest-chip:hover,
.ihbt-shell .ihbt-suggest-chip:focus,
.ihbt-shell .ihbt-suggest-chip:active {
	background: transparent !important;
	border-color: #fb923c !important;
	color: #fb923c !important;
	text-decoration: none !important;
	outline: none;
}

.ihbt-shell .ihbt-suggest-chip[data-selected="true"] {
	background: #fb923c !important;
	border-color: #fb923c !important;
	color: #000000 !important;
}

/* ---------- Habit list ---------- */

.ihbt-shell .ihbt-habits-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ihbt-shell .ihbt-habit-item {
	background: #0f0f10;
	border: 1px solid #2a2a2c;
	border-radius: 6px;
	padding: 12px;
}

.ihbt-shell .ihbt-habit-item input[type="text"] {
	width: 100%;
	background: #1a1a1c;
	border: 1px solid #2a2a2c;
	border-radius: 4px;
	color: #ffffff;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	padding: 8px 10px;
	margin-bottom: 6px;
}

.ihbt-shell .ihbt-habit-item input[type="text"]:focus {
	outline: none;
	border-color: #fb923c;
}

.ihbt-shell .ihbt-habit-item .ihbt-habit-row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.ihbt-shell .ihbt-habit-item .ihbt-habit-row input {
	flex: 1;
	margin-bottom: 0;
}

.ihbt-shell .ihbt-remove-btn {
	background: transparent !important;
	border: 1px solid #3a3a3c !important;
	color: #8a8a8a !important;
	padding: 6px 10px !important;
	border-radius: 4px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	cursor: pointer;
	font-family: 'Oswald', 'Impact', Arial, sans-serif !important;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none !important;
	line-height: 1.2 !important;
}

.ihbt-shell .ihbt-remove-btn:hover,
.ihbt-shell .ihbt-remove-btn:focus,
.ihbt-shell .ihbt-remove-btn:active {
	background: transparent !important;
	border-color: #fb923c !important;
	color: #fb923c !important;
	text-decoration: none !important;
	outline: none;
}

/* ---------- Inputs ---------- */

.ihbt-shell .ihbt-input {
	width: 100%;
	background: #0f0f10;
	border: 1px solid #2a2a2c;
	border-radius: 6px;
	color: #ffffff;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	font-size: 15px;
	padding: 12px 14px;
}

.ihbt-shell .ihbt-input:focus {
	outline: none;
	border-color: #fb923c;
}

/* ---------- Buttons (bulletproof from theme bleed) ---------- */

.ihbt-shell .ihbt-button-row {
	display: flex;
	gap: 10px;
	margin-top: 14px;
	flex-wrap: wrap;
}

.ihbt-shell .ihbt-btn {
	flex: 1;
	min-width: 160px;
	padding: 14px 22px !important;
	border-radius: 6px !important;
	font-family: 'Oswald', 'Impact', Arial, sans-serif !important;
	font-weight: 700 !important;
	font-size: 14px !important;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	text-decoration: none !important;
	cursor: pointer;
	transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
	line-height: 1.2 !important;
	border: 1px solid transparent !important;
}

.ihbt-shell .ihbt-btn--primary {
	background: #fb923c !important;
	color: #000000 !important;
	border-color: #fb923c !important;
}

.ihbt-shell .ihbt-btn--primary:hover,
.ihbt-shell .ihbt-btn--primary:focus,
.ihbt-shell .ihbt-btn--primary:active {
	background: #fb923c !important;
	color: #000000 !important;
	border-color: #fb923c !important;
	opacity: 0.85;
	text-decoration: none !important;
	outline: none;
}

.ihbt-shell .ihbt-btn--secondary {
	background: transparent !important;
	color: #fb923c !important;
	border-color: #fb923c !important;
}

.ihbt-shell .ihbt-btn--secondary:hover,
.ihbt-shell .ihbt-btn--secondary:focus,
.ihbt-shell .ihbt-btn--secondary:active {
	background: #fb923c !important;
	color: #000000 !important;
	border-color: #fb923c !important;
	text-decoration: none !important;
	outline: none;
}

.ihbt-shell .ihbt-btn--ghost {
	background: transparent !important;
	color: #a0a0a0 !important;
	border-color: #3a3a3c !important;
}

.ihbt-shell .ihbt-btn--ghost:hover,
.ihbt-shell .ihbt-btn--ghost:focus,
.ihbt-shell .ihbt-btn--ghost:active {
	background: transparent !important;
	color: #ffffff !important;
	border-color: #ffffff !important;
	text-decoration: none !important;
	outline: none;
}

.ihbt-shell .ihbt-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.ihbt-shell .ihbt-link-btn {
	background: transparent !important;
	border: none !important;
	color: #fb923c !important;
	font-family: 'Oswald', 'Impact', Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	padding: 0 !important;
	text-decoration: none !important;
	line-height: 1.2 !important;
}

.ihbt-shell .ihbt-link-btn:hover,
.ihbt-shell .ihbt-link-btn:focus,
.ihbt-shell .ihbt-link-btn:active {
	background: transparent !important;
	color: #ffffff !important;
	text-decoration: none !important;
	outline: none;
}

/* ---------- Status text ---------- */

.ihbt-shell .ihbt-status {
	margin-top: 14px;
	min-height: 20px;
	font-size: 13px;
	color: #a0a0a0;
}

.ihbt-shell .ihbt-status.is-error {
	color: #ef4444;
}

.ihbt-shell .ihbt-status.is-success {
	color: #22c55e;
}

/* ---------- Tracker grid ---------- */

.ihbt-shell .ihbt-grid-empty {
	padding: 40px 20px;
	text-align: center;
	color: #6a6a6a;
	border: 1px dashed #2a2a2c;
	border-radius: 6px;
	font-style: italic;
}

.ihbt-shell .ihbt-grid-wrapper {
	overflow-x: auto;
	border-radius: 6px;
	border: 1px solid #2a2a2c;
}

.ihbt-shell .ihbt-tracker-table {
	width: 100%;
	border-collapse: collapse;
	background: #0f0f10;
	color: #ffffff;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	font-size: 13px;
}

.ihbt-shell .ihbt-tracker-table th,
.ihbt-shell .ihbt-tracker-table td {
	padding: 8px 6px;
	text-align: center;
	border-right: 1px solid #1f1f21;
	border-bottom: 1px solid #1f1f21;
}

.ihbt-shell .ihbt-tracker-table th {
	background: #1a1a1c;
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #a0a0a0;
	white-space: nowrap;
}

.ihbt-shell .ihbt-tracker-table th.ihbt-th-day {
	width: 60px;
}

.ihbt-shell .ihbt-tracker-table th.ihbt-th-score {
	width: 80px;
	background: #2a1f10;
	color: #fb923c;
}

.ihbt-shell .ihbt-tracker-table td.ihbt-td-day {
	font-weight: 700;
	color: #6a6a6a;
}

.ihbt-shell .ihbt-tracker-table td.ihbt-td-score {
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-weight: 700;
	color: #fb923c;
	background: #160e07;
}

/* ---------- Cell marks ---------- */

.ihbt-shell .ihbt-cell-btn {
	width: 100%;
	height: 32px;
	background: transparent !important;
	border: 1px solid transparent !important;
	color: transparent !important;
	cursor: pointer;
	border-radius: 3px;
	font-family: 'Oswald', 'Impact', Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	padding: 0 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: background-color 0.1s ease;
}

.ihbt-shell .ihbt-cell-btn:hover,
.ihbt-shell .ihbt-cell-btn:focus,
.ihbt-shell .ihbt-cell-btn:active {
	background: #1f1f21 !important;
	text-decoration: none !important;
	outline: none;
}

.ihbt-shell .ihbt-cell-btn[data-mark="X"] {
	background: #fb923c !important;
	color: #000000 !important;
	border-color: #fb923c !important;
}

.ihbt-shell .ihbt-cell-btn[data-mark="O"] {
	background: transparent !important;
	color: #fb923c !important;
	border: 2px solid #fb923c !important;
}

.ihbt-shell .ihbt-cell-btn[data-mark="-"] {
	background: transparent !important;
	color: #6a6a6a !important;
	border-color: #3a3a3c !important;
}

.ihbt-shell .ihbt-cell-btn[data-mark="X"]:hover,
.ihbt-shell .ihbt-cell-btn[data-mark="O"]:hover,
.ihbt-shell .ihbt-cell-btn[data-mark="-"]:hover {
	opacity: 0.85;
}

/* Inline legend marks (in helper text) */

.ihbt-shell .ihbt-mark {
	display: inline-block;
	min-width: 22px;
	padding: 2px 6px;
	border-radius: 3px;
	text-align: center;
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-weight: 700;
	font-size: 12px;
	margin: 0 2px;
}

.ihbt-shell .ihbt-mark--x {
	background: #fb923c;
	color: #000000;
}

.ihbt-shell .ihbt-mark--o {
	background: transparent;
	color: #fb923c;
	border: 1px solid #fb923c;
}

.ihbt-shell .ihbt-mark--dash {
	background: transparent;
	color: #6a6a6a;
	border: 1px solid #3a3a3c;
}

/* ---------- Weekly progress ---------- */

.ihbt-shell .ihbt-progress {
	background: #1a1a1c;
	border: 1px solid #2a2a2c;
	border-top: 3px solid #fb923c;
	border-radius: 8px;
	padding: 28px;
	margin-top: 24px;
}

.ihbt-shell .ihbt-week-rows {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin-top: 18px;
}

.ihbt-shell .ihbt-week-row {
	background: #0f0f10;
	border: 1px solid #2a2a2c;
	border-radius: 6px;
	padding: 14px;
}

.ihbt-shell .ihbt-week-label {
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 12px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #a0a0a0;
	margin-bottom: 6px;
}

.ihbt-shell .ihbt-week-bar {
	height: 6px;
	background: #2a2a2c;
	border-radius: 3px;
	overflow: hidden;
	margin: 8px 0;
}

.ihbt-shell .ihbt-week-bar-fill {
	height: 100%;
	background: #fb923c;
	transition: width 0.3s ease;
}

.ihbt-shell .ihbt-week-bar-fill.is-target-met {
	background: #22c55e;
}

.ihbt-shell .ihbt-week-stats {
	font-size: 13px;
	color: #ffffff;
	display: flex;
	justify-content: space-between;
}

.ihbt-shell .ihbt-week-stats .ihbt-target {
	color: #6a6a6a;
}

.ihbt-shell .ihbt-overall {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #2a2a2c;
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 16px;
	letter-spacing: 1px;
	color: #fb923c;
	text-align: center;
}

/* ---------- Quote ---------- */

.ihbt-shell .ihbt-quote {
	margin-top: 36px;
	text-align: center;
	font-style: italic;
	color: #fb923c;
	font-size: 16px;
	letter-spacing: 1px;
}

/* ==========================================================================
 * MOBILE CARD VIEW
 * Below 768px we hide the wide table and show a vertical stack of day cards.
 * Above 768px the cards stay hidden — the table takes over.
 * ========================================================================== */

.ihbt-shell .ihbt-day-cards {
	display: none;
	flex-direction: column;
	gap: 12px;
}

.ihbt-shell .ihbt-day-card {
	background: #0f0f10;
	border: 1px solid #2a2a2c;
	border-radius: 8px;
	overflow: hidden;
}

.ihbt-shell .ihbt-day-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	background: #1a1a1c;
	border-bottom: 1px solid #2a2a2c;
}

.ihbt-shell .ihbt-day-card-num {
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 1.5px;
	color: #ffffff;
	text-transform: uppercase;
}

.ihbt-shell .ihbt-day-card-score {
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 14px;
	font-weight: 700;
	color: #fb923c;
	letter-spacing: 1px;
}

.ihbt-shell .ihbt-day-card-body {
	display: flex;
	flex-direction: column;
}

/* Each habit row inside a card. Whole row is the tap target. */
.ihbt-shell .ihbt-day-habit-row {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	width: 100% !important;
	background: transparent !important;
	border: none !important;
	border-bottom: 1px solid #1f1f21 !important;
	padding: 14px 16px !important;
	color: #ffffff !important;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	text-align: left !important;
	cursor: pointer;
	gap: 12px;
	text-decoration: none !important;
	line-height: 1.3 !important;
	border-radius: 0 !important;
	min-height: 48px; /* iOS tap-target minimum */
}

.ihbt-shell .ihbt-day-habit-row:last-child {
	border-bottom: none !important;
}

.ihbt-shell .ihbt-day-habit-row:hover,
.ihbt-shell .ihbt-day-habit-row:focus,
.ihbt-shell .ihbt-day-habit-row:active {
	background: #161618 !important;
	color: #ffffff !important;
	text-decoration: none !important;
	outline: none;
}

.ihbt-shell .ihbt-day-habit-label {
	flex: 1;
	min-width: 0;
	overflow-wrap: break-word;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	color: #ffffff;
}

.ihbt-shell .ihbt-day-habit-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 36px;
	padding: 0 12px;
	border-radius: 6px;
	font-family: 'Oswald', 'Impact', Arial, sans-serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 1px;
	background: transparent;
	color: #4a4a4a;
	border: 1px solid #3a3a3c;
	flex-shrink: 0;
}

.ihbt-shell .ihbt-day-habit-mark[data-mark="X"] {
	background: #fb923c;
	color: #000000;
	border-color: #fb923c;
}

.ihbt-shell .ihbt-day-habit-mark[data-mark="O"] {
	background: transparent;
	color: #fb923c;
	border: 2px solid #fb923c;
}

.ihbt-shell .ihbt-day-habit-mark[data-mark="-"] {
	background: transparent;
	color: #6a6a6a;
	border-color: #3a3a3c;
}

/* ==========================================================================
 * MOBILE BREAKPOINT
 * Below 768px: hide the wide table, show the stacked day cards.
 * Tighten padding + stack action buttons.
 * ========================================================================== */

@media (max-width: 768px) {
	.ihbt-shell {
		padding: 32px 12px;
	}

	.ihbt-shell .ihbt-panel,
	.ihbt-shell .ihbt-progress {
		padding: 20px 16px;
	}

	.ihbt-shell .ihbt-headline {
		font-size: clamp(32px, 9vw, 48px);
	}

	.ihbt-shell .ihbt-subhead {
		font-size: 15px;
	}

	/* Table view OFF — cards view ON. */
	.ihbt-shell .ihbt-grid-wrapper {
		display: none !important;
	}

	.ihbt-shell .ihbt-day-cards {
		display: flex;
	}

	/* Stack the action buttons full-width so each is easy to tap. */
	.ihbt-shell .ihbt-button-row {
		flex-direction: column;
		gap: 8px;
	}

	.ihbt-shell .ihbt-btn {
		min-width: 0;
		width: 100%;
	}

	/* Tighten the suggested-chip wrap — let them breathe but not balloon. */
	.ihbt-shell .ihbt-suggest-chip {
		font-size: 12px !important;
		padding: 6px 12px !important;
	}

	/* Habit list inputs — give a bit more breathing room. */
	.ihbt-shell .ihbt-habit-item {
		padding: 14px;
	}

	/* Weekly progress: single column on the smallest screens. */
	.ihbt-shell .ihbt-week-rows {
		grid-template-columns: 1fr;
	}
}

/* Even tighter at 380px (small phones) — clamp font sizes harder. */
@media (max-width: 400px) {
	.ihbt-shell .ihbt-headline {
		font-size: 32px;
		letter-spacing: 0;
	}

	.ihbt-shell .ihbt-panel-title {
		font-size: 18px;
	}

	.ihbt-shell .ihbt-day-habit-label {
		font-size: 13px;
	}

	.ihbt-shell .ihbt-day-habit-mark {
		min-width: 40px;
		height: 32px;
	}
}
