/* Light */
body.theme-light {
    background-color: #fcfcff;
    color: black;
}
body.theme-light input[type='text'], body.theme-light input[type='email'], body.theme-light input[type='password'], body.theme-light input[type='number'], body.theme-light input[type="date"] {
	background-color: #fcfcff;
	color: #222222;
	border: 1px solid #2223;
}
/* Dark */
body.theme-dark {
    background-color: #111;
    /* background-color: #07090f; */
    color: #eee;
}
body.theme-dark input[type='text'], body.theme-dark input[type='email'], body.theme-dark input[type='password'], body.theme-dark input[type='number'], body.theme-dark input[type="date"] {
	background-color: #000000;
	color: #eee;
	border: 1px solid #2223;
}
/* App top bar: logo on the left, theme toggle on the right */
.app-top-bar {
    width: calc(99vw - env(safe-area-inset-left) - env(safe-area-inset-right));
    height: 60px;
    max-height: 60px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* align-items: center; */
}
/* Theme Toggle */
#theme-toggle {
    /* width: 100vw; */
    height: 60px;
    max-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: end;
}
.app-logo-top {
    height: 50px;
    max-width: 50px;
    max-height: 50px;
    margin: 10px;
}
.app-top-link a {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    color: currentColor!important;
    font-size: 1.3rem;
    text-transform: uppercase;
}
.app-top-link a:hover {
    text-decoration: none!important;
    text-transform: uppercase;
    color: currentColor!important;
}
.theme-toggle-button {
    margin: 8px;
    padding: 8px;
    font-size: 24px;
    max-width: 50px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}
.login-logout {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 10px;
}
.login-link, .logout-link, .admin-link {
    margin-right: 10px;
    font-size: 1.2rem;
    color: currentColor!important;
    cursor: pointer;
}
.login-link:hover, .logout-link:hover, .admin-link:hover {
    text-decoration: none!important;
}
.login-link i, .logout-link i, .admin-link i {
    font-size: 24px;
}
.top-right{
    height: 60px;
    max-height: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
}
body.theme-light #logo {
    filter: invert(0);
}
body.theme-light #app-logo-top {
    filter: invert(1);
}
a {
    color: #0076ff;
    text-decoration: none;
}
a:hover {
    color: #0076ff;
    text-decoration: underline;
}
a:active {
    color: #0076ff;
    text-decoration: underline;
}
a:visited {
    color: #0076ff;
    text-decoration: none;
}
.disabled {
    pointer-events: none;
    cursor: default;
}

#loading {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
input[type=number] {
	-moz-appearance: textfield;
	appearance: textfield;
}
input[type='text'], input[type='email'], input[type='password'], input[type='number'], button[type="submit"], input[type="submit"], input[type="date"] {
    min-height: 36px;
    min-width: 280px;
    flex: 1;
    padding: 10px;
    /* width: 100%; */
    width: calc(100% - 20px);
    border-radius: 8px;
    border-width: 0;
    font-size: 1.3rem;
}
input[type='text'][readonly], input[type='email'][readonly], input[type='password'][readonly], input[type='number'][readonly], input[type="date"][readonly] {
    min-height: 30px;
    min-width: 280px;
    flex: 1;
    padding: 10px;
    width: calc(100% - 20px);
    border-radius: 8px;
    border-width: 0;
    opacity: 0.7;
}
label {
    display: none;
}
select {
    margin: 10px 0;
    min-height: 36px;
    min-width: 310px;
    flex: 1;
    padding: 10px;
    width: 100%;
    border-radius: 8px;
    border-width: 0;
    font-size: 1.3rem;
}
body.theme-light select {
    background-color: #fcfcff;
    color: #222222;
    border: 1px solid #2223;
}
body.theme-dark select {
    background-color: #000000;
    color: #eee;
    border: 1px solid #2223;
}
input[type="date"] {
    font-family: unset;
}
body.theme-dark input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}
body.theme-dark input[type="date"]::-moz-calendar-picker-indicator {
    filter: invert(1);
}
body.theme-light input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0);
}
body.theme-light input[type="date"]::-moz-calendar-picker-indicator {
    filter: invert(0);
}
.primaryAction, .primary-action, button[type="submit"], input[type="submit"] {
	margin-top: 20px;
	margin-bottom: 10px;
	padding: 14px 10px;
	width: 100%;
	border-radius: 8px;
	border-width: 0;
	cursor: pointer;
	font-size: 1.3rem;
	background-color: rgb(0,122,255);
	color: white;
}
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 1px);
    margin: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.app {
	flex: 1;
	border-radius: 10px;
	margin: auto;
	background-color: #141628;
	max-width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));
	min-height: calc(100vh - env(safe-area-inset-bottom) -1px);
	padding: 1px;
    display: flex;
    flex-direction: column;
}
/* Toggle theme */
body.theme-light .theme-toggle-button {
    color: #222222;
}
body.theme-light #theme-toggle-icon-light i {
    color: #222222;
}
body.theme-light #theme-toggle-icon-dark i {
    color: #eee;
}
body.theme-light #theme-toggle-button-light {
    display: unset!important;
}
body.theme-light #theme-toggle-button-dark {
    display: none!important;
}
body.theme-dark .theme-toggle-button {
    color: #eee;
}
body.theme-dark #theme-toggle-icon-light i {
    color: #222222;
}
body.theme-dark #theme-toggle-icon-dark i {
    color: #eee;
}
body.theme-dark #theme-toggle-button-light {
    display: none!important;
}
body.theme-dark #theme-toggle-button-dark {
    display: unset!important;
}
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.content-bottom {
    flex: 1;
}
.error {
    color: rgb(184, 36, 36);
    font-size: 1.1rem;
    margin: 10px 0 0;
}
.error-container {
    display: flex;
    width: calc(100vw - 100px);
    height: calc(100vh - 100px);
    justify-content: center;
    align-items: center;
}
.error-container > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-self: start;
}
.error-container > div > h1 {
    font-size: 2rem;
}
.error-container > div > p {
    font-size: 1.3rem;
    padding: 0;
    margin: 0;
}
div:has(> input.with-item) {
    position: relative;
}
div:has(> input.with-item) > a {
    position: absolute;
    right: 8px;
    font-size: 1.3rem;
}
.toggle-password-visibility{
    position: absolute;
    right: 0;
    top: 10px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
}
.form-group {
    margin: 10px 0;
}
.login-top h2, .login-top h3 {
    text-align: center;
    margin: 0;
    padding: 0;
}
.add-button-link {
    background-color: #0076ff;
    color: white !important;
    padding: 10px;
    border-radius: 35px;
    border-width: 0;
    cursor: pointer;
    font-size: 1.5rem;
    margin: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.add-button-link:hover {
    background-color: #0056ff;
    color: white!important;
    text-decoration: none;
}

label.checkbox-label {
    display: flex;
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
label.checkbox-label input {
    display: none;
}
.check {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    border: 1px solid #3331;
}
body.theme-light .check {
    background-color: #eee;
}
body.theme-dark .check {
    background-color: black;
}
.check:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-label input:checked ~ .check:after {
    display: block;
}
body.theme-dark .checkbox-label .check:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
body.theme-light .checkbox-label .check:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.checkbox-label:hover input ~ .check {
    background-color: #ccc;
} 
body.theme-dark .checkbox-label:hover input ~ .check {
    background-color: #2196F3;
} 
.checkbox-label input:checked ~ .check {
    background-color: #2196F3;
}
.check:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-label-text {
    margin-left: 35px;
}
.task-image-thumbnail {
    max-width: 120px;
    max-height: 100px;
    object-fit: cover;
    margin: 0 20px;
}
.task-image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.task-submission-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 20px;
}
.task-submission-preview p {
    margin: 4px 0;
    padding: 0;
}
.task-submission-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.task-submission-modal > .modal-content {
    max-height: unset!important;
}
.task-submission-modal > .modal-content > .modal-body {
    padding: 20px;
}
.task-submission-modal > .modal-content {
    max-width: 640px;
}

.task-submission-modal img {
    max-width: 420px;
}
.task-submission-actions a {
    margin-left: 20px;
    text-decoration: none;
}
.task-submission-actions a:hover {
    text-decoration: none;
}
.task-submission-actions {
    font-size: 1.3rem;
}
.delete-task-submission-link {
    color: #f44336!important;
}
.delete-task-submission-modal > .modal-content {
    max-width: 720px;
}
.task-submission-delete-modal-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}
.task-submission-delete-modal-actions input {
    padding: 10px;
    margin: 0 10px;
}
