:root {
	--toodoo-navbar-bg: #c03939;
	--toodoo-today: #c03939;
	--toodoo-border: #d0d0d0;
	--toodoo-primary-hover: #a33030;
}

.navbar-toodoo {
	background-color: var(--toodoo-navbar-bg);
}

.btn-primary {
	background-color: var(--toodoo-navbar-bg);
	border-color: var(--toodoo-navbar-bg);
}
.btn-primary:hover,
.btn-primary:focus {
	background-color: var(--toodoo-primary-hover);
	border-color: var(--toodoo-primary-hover);
}
.btn-primary:focus-visible {
	box-shadow: 0 0 0 0.25rem rgba(192, 57, 57, 0.5);
}
.btn-primary:active {
	background-color: var(--toodoo-primary-hover);
	border-color: var(--toodoo-primary-hover);
}

.btn-outline-primary {
	color: var(--toodoo-navbar-bg);
	border-color: var(--toodoo-navbar-bg);
	background: transparent;
}
.btn-outline-primary:hover {
	color: #fff;
	background-color: var(--toodoo-primary-hover);
	border-color: var(--toodoo-primary-hover);
}
.btn-outline-primary:focus-visible {
	box-shadow: 0 0 0 0.25rem rgba(192, 57, 57, 0.5);
}

/* Auth pages: login, register, password reset */
.auth-page {
	max-width: 22rem;
	margin-left: auto;
	margin-right: auto;
}
.auth-page .form-group {
	margin-bottom: 1rem;
}
.auth-page .btn-primary {
	min-width: 10rem;
	white-space: nowrap;
}
.auth-page .d-flex.justify-content-center .btn-primary {
	width: auto;
	min-width: 12rem;
}
.auth-page .auth-actions .btn {
	width: 12rem;
	min-width: 12rem;
}
.auth-page .auth-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
	justify-content: center;
}

.toodoo-done {
	text-decoration: line-through;
	color: grey;
}

.toodoo-element {
	display: inline-block;
	width: 100%;
}

.toodoo-shadow {
	display: inline-block;
	width: 100%;
	color: grey;
	font-style: italic;
}

.today {
	color: var(--toodoo-today);
	font-weight: 600;
	border-left: 2px solid var(--toodoo-today);
}

div.hidden {
	display: none;
}

div.col {
	font-size: 0.9em;
	border-right: 1px solid var(--toodoo-border);
}

/* Touch overlay: per-column, covers list but not the new-todo input row so taps on the input work natively */
.toodoo-list-wrap {
	position: relative;
}
.toodoo-touch-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	/* Leave bottom space for the new-todo input row so the tap reaches the input and keyboard stays open */
	bottom: 2.8rem;
	pointer-events: none;
	z-index: 1;
}
body.toodoo-touch .toodoo-touch-overlay {
	pointer-events: auto;
}
body.toodoo-dragging {
	-webkit-user-select: none;
	user-select: none;
}
/* Prevent iOS zoom on input focus: 16px minimum (touch only) */
body.toodoo-touch ol.toodoo-list li input.toodoo-input,
body.toodoo-touch ol.toodoo-list li input.toodoo-input-edit {
	font-size: 16px !important;
}

/* Pull-to-refresh indicator: hidden on desktop */
.pull-to-refresh-indicator {
	display: none;
}

/* Mobile: one column with five days stacked (no wrapping/cut-off) */
@media (max-width: 767px) {
	/* Pull-to-refresh indicator */
	.pull-to-refresh-indicator {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		padding: 0.75rem;
		background: var(--toodoo-navbar-bg);
		color: #fff;
		font-size: 0.9rem;
		z-index: 1030;
		opacity: 0;
		transform: translateY(-100%);
		transition: opacity 0.2s ease, transform 0.2s ease;
		pointer-events: none;
	}
	.pull-to-refresh-indicator.ptr-visible {
		opacity: 1;
		transform: translateY(0);
	}
	.pull-to-refresh-icon {
		flex-shrink: 0;
	}

	/* Allow vertical scroll when touch is released from drag handling */
	body {
		touch-action: pan-y;
	}
	#day-columns-row {
		flex-direction: column;
	}
	#day-columns-row > div.col {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		border-right: none;
		border-bottom: 1px solid var(--toodoo-border);
		padding-top: 1rem;
		padding-left: 1rem;
		padding-right: 1rem;
	}
	#day-columns-row > div.col:first-child {
		padding-top: 0;
	}
	#day-columns-row > div.col:last-child {
		border-bottom: none;
	}
	#day-columns-row ol.toodoo-list {
		padding-left: 0.25rem;
		padding-right: 0.25rem;
		margin-left: 0;
		margin-right: 0;
	}
}

.toodoo-icon-edit, .toodoo-icon-delete, .toodoo-icon-stop {
	width: 16px;
	height: 16px;
	float: right;
	/*visibility: hidden;*/
	display: none;
	cursor: pointer;
}

.toodoo-icon-recurring, .toodoo-icon-pause {
	display: inline-block;
}

ol.toodoo-list {
	list-style: none;
	text-align: left;
	margin-left: 0;
	margin-right: 0;
	padding-left: 0.25rem;
	padding-right: 0.25rem;
}

ol.toodoo-list li {
	border-bottom: 1px solid var(--toodoo-border);
	cursor: -webkit-grab; cursor: grab;
	line-height: 1.4;
	padding: 3px 0;
}

.no-border {
	border: none;
}

ol.toodoo-list li input {
	border: none;
}

ol.toodoo-list li input.toodoo-input,
ol.toodoo-list li input.toodoo-input-edit {
	font-size: inherit;
	line-height: 1.4;
	padding: 0;
	margin: 0;
	width: 100%;
	box-sizing: border-box;
}

ol.toodoo-list li input:focus {
	outline: none;
}

svg.svg-icons {
	display: none;
}

#datepicker {
	display: none;
}

/* Main nav bar: pointer cursor on clickable controls */
#week-zurueck, #zurueck, #weiter, #week-weiter,
.ui-datepicker-trigger {
	cursor: pointer;
}

/* Datepicker year navigation (prev/next year buttons) */
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-title {
	margin: 0 4.6em;
}
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-prev {
	left: 2em;
}
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-next {
	right: 2em;
}
.ui-datepicker .ui-datepicker-prev-year,
.ui-datepicker .ui-datepicker-next-year {
	position: absolute;
	top: 2px;
	width: 1.8em;
	height: 1.8em;
	cursor: pointer;
}
.ui-datepicker .ui-datepicker-prev-year:hover,
.ui-datepicker .ui-datepicker-next-year:hover {
	top: 1px;
}
.ui-datepicker .ui-datepicker-prev-year {
	left: 2px;
}
.ui-datepicker .ui-datepicker-next-year {
	right: 2px;
}
.ui-datepicker .ui-datepicker-prev-year span,
.ui-datepicker .ui-datepicker-next-year span {
	display: block;
	position: absolute;
	left: 50%;
	margin-left: -8px;
	top: 50%;
	margin-top: -8px;
}

/* Unified style: same size & hover for all 4 nav buttons */
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-next,
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-prev-year,
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-next-year {
	width: 1.8em;
	height: 1.8em;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.05);
	cursor: pointer;
}
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-next:hover,
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-prev-year:hover,
.ui-datepicker .ui-datepicker-header.toodoo-year-nav-added .ui-datepicker-next-year:hover {
	background: rgba(0, 0, 0, 0.1);
}

/* Home icon: no color change on hover, still show pointer */
.container-fluid .p-3.d-flex a[href="/"],
.container-fluid .p-3.d-flex a[href="/"]:hover,
.container-fluid .p-3.d-flex a[href="/"]:focus {
	color: inherit;
	cursor: pointer;
}

a, a:visited {
    color: inherit;
}

/* Username dropdown in navbar: keep white, prettier focus/active state */
.navbar .nav-link.dropdown-toggle {
	color: #fff !important;
}
.navbar .nav-link.dropdown-toggle:hover {
	color: rgba(255, 255, 255, 0.9) !important;
}
.navbar .nav-link.dropdown-toggle:focus,
.navbar .nav-link.dropdown-toggle:active,
.navbar .nav-link.dropdown-toggle.show {
	color: #fff !important;
	outline: none;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
	border-radius: 6px;
}

svg.bi {
	padding-bottom: 2px;
}

/* Recurring overview modal */
.recurring-overview-modal-dialog {
	max-width: min(90vw, 52rem);
}
@media (min-width: 992px) {
	.recurring-overview-modal-dialog {
		max-width: min(90vw, 56rem);
	}
}
#recurring-overview-table-wrapper {
	margin-top: 0.25rem;
}
#recurring-overview-table {
	margin-bottom: 0;
	table-layout: fixed;
	width: 100%;
}
#recurring-overview-table th,
#recurring-overview-table td {
	vertical-align: middle;
}
#recurring-overview-table th:nth-child(1),
#recurring-overview-table td:nth-child(1) {
	min-width: 10rem;
	width: 38%;
}
#recurring-overview-table th:nth-child(2),
#recurring-overview-table td:nth-child(2) {
	min-width: 10rem;
	width: 28%;
}
#recurring-overview-table th:nth-child(3),
#recurring-overview-table td:nth-child(3) {
	width: 22%;
	min-width: 12rem;
	white-space: nowrap;
}
#recurring-overview-table th:nth-child(4),
#recurring-overview-table td:nth-child(4) {
	width: 16%;
	min-width: 6rem;
}
#recurring-overview-modal .modal-body {
	min-height: 6rem;
}
#recurring-overview-modal .recurring-edit-text {
	min-width: 8rem;
	width: 100%;
	box-sizing: border-box;
}
#recurring-overview-modal .recurring-period-select {
	min-width: 6.5rem;
}
#recurring-overview-modal .input-group-sm .recurring-edit-every {
	width: 3rem;
}
/* Recurring modal: all four action icons (edit, stop, save, cancel) share the same design */
#recurring-overview-modal .recurring-action-btns .recurring-action-btn {
	width: 2rem;
	height: 2rem;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
#recurring-overview-modal .recurring-action-btns .recurring-action-btn svg {
	display: block;
	flex-shrink: 0;
}

/* Recurring overview modal: mobile only (desktop unchanged) */
@media (max-width: 991px) {
	.recurring-overview-modal-dialog {
		max-width: 96vw;
		margin-left: auto;
		margin-right: auto;
	}
	#recurring-overview-modal .modal-dialog {
		margin: 0.5rem;
	}
	#recurring-overview-table-wrapper {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		margin-left: -0.25rem;
		margin-right: -0.25rem;
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}
	#recurring-overview-table {
		table-layout: auto;
		width: max-content;
		min-width: 100%;
	}
	#recurring-overview-table th:nth-child(1),
	#recurring-overview-table td:nth-child(1) {
		min-width: 4.5rem;
		width: auto;
	}
	#recurring-overview-table th:nth-child(2),
	#recurring-overview-table td:nth-child(2) {
		min-width: 5.5rem;
		width: auto;
	}
	#recurring-overview-table th:nth-child(3),
	#recurring-overview-table td:nth-child(3) {
		min-width: 12rem;
		width: auto;
		white-space: nowrap;
	}
	#recurring-overview-table th:nth-child(4),
	#recurring-overview-table td:nth-child(4) {
		min-width: 5rem;
		width: auto;
	}
	#recurring-overview-modal .recurring-edit-text {
		min-width: 4rem;
	}
	#recurring-overview-modal .recurring-period-select {
		min-width: 5rem;
	}
}

/* Account modal: edit and action icon buttons (match recurring action button look) */
#account-modal .account-edit-btn,
#account-modal .account-action-btns .account-save-btn,
#account-modal .account-action-btns .account-cancel-btn {
	width: 2rem;
	height: 2rem;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
#account-modal .account-edit-btn svg,
#account-modal .account-action-btns .account-save-btn svg,
#account-modal .account-action-btns .account-cancel-btn svg {
	display: block;
	flex-shrink: 0;
}