@import url('images/fonts/Fredoka/fredoka.css');

:root {
	--highlightColor: #33A2AB;
	--bgColor: #000000;
	--accentColor: #487B5C60;
	--color: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bgColor: #000000;
		--color: #FFFFFF;
	}
}

@media (prefers-color-scheme: light) {
	:root {
		--bgColor: #FFFFFF;
		--color: #000000;
	}
}

body {
	/*font-family: "Segoe UI", Tahoma, sans-serif;
	font-family: 'Bubblegum Sans', cursive;*/
	font-family: 'Fredoka', sans-serif;
	background-color: var(--bgColor);
	color: var(--color);
	margin: 0;
}

[type="checkbox"] {
	cursor: pointer;
}

.todo-app {
	width: 600px;
	max-width: 100%;
	margin: 0 auto;
	border-radius: 0.5em;
	height: calc(100vh - 110px);
	overflow-y: auto;
	overflow-x: hidden;
}

@media (min-width: 601px) {
	.todo-app {
		border: 1px solid #e0e0e0;
	}
}

.list-item,
.task-item {
	display: flex;
	align-items: center;
	padding: 0.5em 0;
	border-bottom: 1px solid #e0e0e0;
	user-select: none;
	transition: transform 0.3s, background-color 0.5s;
	padding: 10px 15px;
}

.list-item {
	cursor: pointer;
}

.list-item .priority-star {
	margin-left: auto;
	width: 25px;
	height: 25px;
	margin-right: 5px;
}

.list-item.selected {
	background-color: #f0f0f0;
}

.todo-app-content,
.lists-section {
	padding-top: 0;
	padding-bottom: 120px;
}

.section-title {
	display: none;
	padding: 10px 15px;
	margin: 0;
	background-color: #ffffff;
	color: black;
	border-radius: 5px;
	font-weight: bold;
	margin-top: 10px;
}

.entry-form {
	margin-bottom: 0;
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--bgColor);
}

.input-wrapper {
	position: relative;
}

.placeholder-overlay {
	position: absolute;
	left: 1.2em;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: #777;
}

.auth-form input:-webkit-autofill+.placeholder-overlay {
	display: none;
}

@keyframes autofill {
	from {}

	to {}
}

.auth-form input:-webkit-autofill {
	animation-name: autofill;
	animation-duration: 0s;
}

.entry-form input[type="text"]
{
	width: 100%;
	padding: 1em;
	border: 1px solid #ccc;
	box-sizing: border-box;
	font-size: 1em;
}

.input-logo-image {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);

	/* prevent clicks on the image from stealing focus */
	pointer-events: none;

	/* size the logo */
	width: 110px;
	height: 30px;
}

/*
.entry-form::after {
			content: "ShareList.me";
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	color: #999;
	pointer-events: none;
	font-size: 0.9em;
	line-height: 1;

}
*/

.entry-form input[type="text"]:focus
{
	outline: none;
	border: 1px solid var(--highlightColor);
}

#suggestions {
	position: absolute;
	background-color: #fff;
	border: 1px solid #ccc;
	border-radius: 15px;
	width: 100%;
	max-height: 150px;
	overflow-y: auto;
	z-index: 200;
}

#suggestions div {
	padding: 0.5em;
	color: #000;
	cursor: pointer;
}

#suggestions div:hover {
	background-color: #f0f0f0;
}

#suggestions button {
	padding: 0.75em 1.25em;
	border: none;
	background-color: var(--accentColor);
	color: #000;
	border-radius: 16px;
	cursor: pointer;
}

#suggestions button:hover {
	background-color: var(--accentColor);
}

.task-item.completed {
	color: #777;
}

.task-item.highlight {
	background-color: var(--highlightColor);
	animation: new-highlight 3s forwards;
}

@keyframes new-highlight {
	from {
		background-color: var(--highlightColor);
	}

	to {
		background-color: transparent;
	}
}

.priority-star
{
	cursor: pointer;
	width: 25px;
	height: 25px;
}

.task-item .priority-star
{
	margin-right: 10px;
	margin-left: auto;
	width: 25px;
	height: 25px;
	flex-shrink: 0;
}

.task-item input[type="checkbox"]
{
	transform: scale(1.6);
	margin-right: 0.5em;
	flex-shrink: 0;
}

.task-text
{
	display: flex;
	flex-direction: column;
	flex: 1;
	width: 100%;
	min-width: 0;
}

.task-name
{
	word-break: break-word;
	overflow-wrap: anywhere;
}

.task-description
{
	display: block;
	font-size: 0.9em;
	color: #555;
	white-space: pre-line;
	word-break: break-word;
	overflow-wrap: anywhere;
}

input[type="checkbox"]:checked {
	accent-color: var(--accentColor);
}

.edit-task-input {
	width: 100%;
	font-size: 1em;
	padding: 0.5em 0.75em;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-family: inherit;
	box-sizing: border-box;
}

.edit-task-input:focus {
	outline: none;
	border-color: var(--highlightColor);
}

.edit-task-input--multiline {
	min-height: 90px;
	resize: vertical;
	line-height: 1.4;
}

.task-item button {
	margin-left: auto;
	border: none;
	background-color: #dc3545;
	color: #fff;
	padding: 0.5em 0.75em;
	border-radius: 0.5em;
	cursor: pointer;
}

.task-item button:hover {
	background-color: #c82333;
}

.list-item button {
	margin-left: auto;
	border: none;
	background-color: #dc3545;
	color: #fff;
	padding: 0.5em 0.75em;
	border-radius: 0.5em;
	cursor: pointer;
}

.invite-actions {
	display: flex;
	gap: 0.5em;
	margin-right: 0.5em;
}

.invite-actions .accept-btn,
.invite-actions .decline-btn {
	cursor: pointer;
	padding: 0.25em 0.5em;
	border-radius: 0.5em;
	color: #fff;
}

.invite-actions .accept-btn {
	background-color: #28a745;
}

.invite-actions .accept-btn:hover {
	background-color: #218838;
}

.invite-actions .decline-btn {
	background-color: #dc3545;
}

.invite-actions .decline-btn:hover {
	background-color: #c82333;
}

.list-item button:hover {
	background-color: #c82333;
}

h2 {
	margin-top: 1em;
	border-bottom: 1px solid #e0e0e0;
	padding-bottom: 0.5em;
	font-size: 1.2em;
}

.back-button {
	display: inline-block;
}

.back-button img {
	display: block;
	width: 1em;
	height: 1em;
}

.back-button:hover {
	background-color: var(--accentColor);
}

@media (prefers-color-scheme: dark) {
	#back-icon {
		content: url('images/icons/left-arrow-white.png');
	}

	.share-btn img {
		content: url('images/icons/sharing-white.png');
	}
}

.auth-button {
	position: fixed;
	right: 5px;
	bottom: 120px;
	padding: 1em 2em;
	background-color: var(--highlightColor);
	background-image: linear-gradient(45deg, var(--highlightColor), var(--accentColor));
	background-size: 0% 100%;
	background-repeat: no-repeat;
	background-position: left;
	color: #fff;
	border: none;
	border-radius: 0.5em;
	font-size: 0.85em;
	cursor: pointer;
	z-index: 1010;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	transition: background-size 0.5s;
}

.auth-button:hover {
	background-size: 100% 100%;
}

.settings-button {
	position: fixed;
	right: 110px;
	bottom: 120px;
	padding: 1em 2em;
	background-color: var(--highlightColor);
	background-image: linear-gradient(45deg, var(--highlightColor), var(--accentColor));
	background-size: 0% 100%;
	background-repeat: no-repeat;
	background-position: left;
	color: #fff;
	border: none;
	border-radius: 0.5em;
	font-size: 0.85em;
	cursor: pointer;
	z-index: 1010;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
	transition: background-size 0.5s;
}

.settings-button:hover {
	background-size: 100% 100%;
}

@media (max-width: 600px)
{
	.auth-button,
	.settings-button
	{
		bottom: 80px;
	}
}


.auth-option {
	display: block;
	margin: 0.5em auto;
	padding: 0.75em 1.25em;
	background-color: var(--highlightColor);
	color: #fff;
	border: none;
	border-radius: 0.5em;
	cursor: pointer;

}

.auth-option:hover {
	background-color: var(--accentColor);
}

.offline-link {
	display: block;
	margin: 0.5em auto;
	color: var(--highlightColor);
	text-align: center;
	text-decoration: underline;
}

.signup-link {
	display: block;
	margin: 0.5em auto;
	padding: 0;
	background-color: transparent;
	color: var(--highlightColor);
	text-align: center;
	text-decoration: underline;
	font-size: 0.9em;
	border: none;
}

.signup-link:hover {
	background-color: transparent;
	color: var(--accentColor);
}

.header-bar {
	display: flex;
	align-items: center;
	padding: 0.5em;
	z-index: 50;
}

.entry-form.view-only
{
	background-color: #ffffff;
}

.entry-form.view-only .input-wrapper
{
	background-color: #ffffff;
}

#current-list-name {
	margin-left: 1em;
	font-weight: bold;
}

#edit-list-name-input {
	margin-left: 1em;
	font-weight: bold;
	padding: 0.25em;
	border: 1px solid #ccc;
}
.current-list-details
{
	display: flex;
	align-items: baseline;
	flex: 1;
	gap: 0.5em;
}
#current-list-description
{
	margin-left: auto;
	color: #555;
	font-size: 0.9em;
	text-align: right;
	white-space: pre-line;
}
.edit-list-description-input
{
	margin-left: auto;
	display: block;
	flex: 1 1 200px;
	min-width: 160px;
	max-width: 320px;
	width: 100%;
	resize: vertical;
}

#app-title {
	font-weight: bold;
	font-size: 1.75em;
	padding-left: 7px;
}

.sticky-banner {
	position: fixed;
	bottom: 0;
	left: 50%;
	width: 100%;
	max-width: 600px;
	transform: translateX(-50%);
	text-align: center;
	overflow: visible;
	z-index: 1000;
	height: auto;

}

.custom-banner {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 16px 16px 0 0;
	cursor: pointer;
	position: relative;
}

.custom-banner img {
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: 100px;
}

.custom-banner-loader {
	width: 40px;
	height: 40px;
	border: 4px solid #ccc;
	border-top-color: #333;
	border-radius: 50%;
	animation: custom-spin 1s linear infinite;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.adsense-banner {
	width: 100%;
	min-height: 100px;
	display: none;
}

@keyframes custom-spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}


.swal2-popup {
	max-width: 400px;
	width: 90vw !important;
	box-sizing: border-box;
}

.swal2-input
{
	width: 100%;
	box-sizing: border-box;
	margin: 0;
}

.share-access-options
{
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.75em;
	margin-top: 0.5em;
}

.share-access-option
{
	position: relative;
	display: block;
	width: 100%;
	cursor: pointer;
}

.share-access-option input
{
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.share-access-card
{
	display: flex;
	flex-direction: column;
	gap: 0.2em;
	padding: 0.9em 1em;
	border: 1px solid #d3dde3;
	border-radius: 10px;
	background-color: transparent;
	color: #000000;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.share-access-option input:checked + .share-access-card
{
	border-color: var(--highlightColor);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.share-access-option input:not(:checked) + .share-access-card
{
	border-color: #d3dde3;
	box-shadow: none;
}

.share-access-option input:focus-visible + .share-access-card
{
	box-shadow: 0 0 0 2px rgba(51, 162, 171, 0.5);
}

.share-access-title
{
	font-weight: 600;
	color: inherit;
}

.share-access-description
{
	font-size: 0.85em;
	opacity: 0.8;
	color: inherit;
}

@media (prefers-color-scheme: dark)
{
	.share-access-card
	{
		border-color: rgba(255, 255, 255, 0.25);
	}

	.share-access-option input:checked + .share-access-card
	{
		box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
	}
}

.swal2-confirm {
	background-color: var(--highlightColor) !important;
	color: #fff !important;
}

.swal2-confirm:hover {
	background-color: var(--accentColor) !important;
}

#task-list,
#priority-list,
#completed-list,
#lists {
	overflow-x: hidden;
	overflow-y: auto;
}

.share-btn {
	cursor: pointer;
	width: 25px;
	height: 25px;
}

.share-btn img {
	display: block;
	width: 25px;
	height: 25px;
}

.list-item .list-right {
	display: flex;
	align-items: center;
	margin-left: auto;
}

.list-item .shared-users {
	display: flex;
}

.list-item .shared-user-circle {
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background-color: #e0e0e0;
	border: 2px solid transparent;
	color: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8em;
	margin-right: 5px;
}

.list-item .shared-user-circle.shared-access-full
{
	border-color: #28a745;
}

.list-item .shared-user-circle.shared-access-view
{
	border-color: #ffc107;
}

@media (hover: hover) {

	.task-item:hover,
	.list-item:hover {
		background-color: var(--accentColor);
	}
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
	width: calc(100% - 0.4em);
	padding: 1em;
	margin: 0.2em;
	border: 1px solid #ccc;
	box-sizing: border-box;
	font-size: 1em;
	border-radius: 16px;
}

.auth-form button {
	padding: 0.75em 1.25em;
	border: none;
	background-color: var(--highlightColor);
	color: #fff;
	border-radius: 0.5em;
	cursor: pointer;
}

.auth-form button:hover {
	background-color: var(--accentColor);
}

.error-message {
	color: red;
	text-align: center;
	margin: 1em;
}

.sync-overlay
{
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	color: #FFFFFF;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 2em;
	box-sizing: border-box;
	z-index: 20000;
}

.sync-overlay__content
{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.5em;
}

.sync-overlay__spinner
{
	width: 48px;
	height: 48px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top-color: #FFFFFF;
	border-radius: 50%;
	animation: sync-spin 1s linear infinite;
}

.sync-overlay__message
{
	margin: 0;
	font-size: 1.25em;
}

@keyframes sync-spin
{
	from
	{
		transform: rotate(0deg);
	}

	to
	{
		transform: rotate(360deg);
	}
}

body.sync-lock
{
	overflow: hidden;
}

.toast-undo-text
{
	font-weight: 600;
	margin-bottom: 0.5em;
}

.toast-undo-actions
{
	margin-top: 0.25em;
}

.toast-undo-button
{
	display: block;
	width: 100%;
	padding: 0.65em 0.85em;
	background-color: #FFFFFF;
	color: #0f2535;
	border: 1px solid #d6dde5;
	border-radius: 6px;
	font-weight: 700;
	letter-spacing: 0.01em;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	transition: background-color 0.2s, transform 0.1s, border-color 0.2s, color 0.2s;
}

.toast-undo-button:hover
{
	background-color: #f3f6f9;
	border-color: #c8d3dd;
}

.toast-undo-button:active
{
	transform: translateY(1px);
}
