:root {
    --placeholder: "\200b";
    --disabled-color: hsla(0, 0%, 50%, 0.9);
}

@font-face {
    font-family: "big-text";
    src: url("../fonts/RobotoCondensed-Regular.ttf");
}

@font-face {
    font-family: "regular-text";
    src: url("../fonts/TitilliumWeb-Light.ttf");
}

@font-face {
    font-family: "Icons";
    src: url("../fonts/PermanentMarker-Regular.ttf");
}

a {
    color: hsl(29, 82%, 40%);
    cursor: pointer;
}

a:hover {
    color: hsl(29, 82%, 60%);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    background: url("../img/login-background.jpg") no-repeat fixed center;
    background-size: cover;
    color: hsl(0, 0%, 5%);
    font-family: regular-text, sans-serif;
    overflow-wrap: anywhere;
}

/* Remove numeric input arrows for Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/*  Remove numeric input arrows for Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

input {
    font-family: regular-text, sans-serif;
    border: 2px solid hsla(360, 0%, 0%, 0.2);
    border-radius: 0.25rem;
    height: 2.5rem;
}

input:focus {
    outline: 2px solid hsla(50, 100%, 58%, 0.75);
}

input[type='radio'] {
    filter: grayscale(1);
    cursor: pointer;
    outline: none;
}

input[type='checkbox'] {
    filter: grayscale(1);
    cursor: pointer;
    outline: none;
}

input[type="file"] {
    border: none;
    text-align: center;
    margin: auto;
    height: 3rem;
}

input::file-selector-button {
    width: 7rem;
    height: 2rem;
    border-radius: 0.5rem;
    box-shadow: rgba(99, 99, 99, 0.2) 0 2px 8px 0;
    background-color: white;
    margin: 0.5rem;
    padding: 0.5rem;
    border: none;
    transition: all 0.2s ease 0s;
    cursor: pointer;
    font-family: big-text, serif;
    text-transform: uppercase;
}

input::file-selector-button:hover{
    background-color: hsl(49, 100%, 90%);
    transform: translateY(-1px);
}

footer {
    margin-top: auto;
    padding: 1rem;
    text-align: center;
    line-height: 1.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
    color: hsl(0, 0%, 10%);
}

.fade-in-delayed {
    opacity: 0;
    animation-fill-mode: forwards;
    animation-name: appear;
    animation-delay: 125ms;
}

@keyframes appear {
    from {
        opacity: 0
    }
    to {
        opacity: 100%;
    }
}

.dead-center {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.full-background {
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    margin-top: -50vh;
    margin-left: -50vw;
    position: fixed;
    overflow:scroll;
}

.modal-background {
    background-color: hsla(0, 0%, 100%, 0.5)
}

.load-background {
    background-color: hsla(0, 0%, 100%, 0.85);
}

.modal {
    margin: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    padding: 0.5rem;
    border-radius: 0.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.75);
    animation-name: grow-in;
    animation-duration: 0.2s;
    animation-fill-mode: forwards;
}

.modal:focus {
    outline: none;
}

.modal-wide {
    width: 90%;
}

.modal-standard {
    width: 60rem;
}

.modal-small {
    width: 27.5rem;
}

@keyframes grow-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-container {
    width: 100%;
    box-sizing: border-box;
    padding: 0 1.5rem 1.5rem;
}

.modal-header-standard {
    font-family: big-text, serif;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.modal-intro-standard {
    text-align: justify;
}

.modal-centered-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-centered-button-container {
    margin-top: 1.5rem;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.close-icon-container {
    display: flex;
    width: 100%;
    height: 3rem;
    justify-content: flex-end;
}

.close-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -0.75rem;
    padding-right: 0.5rem;
    cursor: pointer;
    font-size: 2rem;
    font-family: Icons, serif;
    transition: 0.2s;
    user-select: none;
}

.close-icon:hover {
    transform: rotate(-5deg);
}

.close-icon:active {
    transform: rotate(-5deg) scale(0.95);
}

.button {
    margin: 0.5rem;
    padding: 0.5rem;
    height: 2.75rem;
    border: none;
    transition: all 0.2s ease 0s;
    cursor: pointer;
    font-family: big-text, serif;
    text-transform: uppercase;
}

.button:hover {
    background-color: hsl(49, 100%, 90%);
    transform: translateY(-1px);
}

.button-small {
    min-width: 7rem;
    height: 2rem;
    border-radius: 0.5rem;
    box-shadow: rgba(99, 99, 99, 0.2) 0 2px 8px 0;
    background-color: white;
}

.button-small:active {
    box-shadow: rgba(0, 0, 0, 0.16) 0 1px 4px 0;
}

.button-clear {
    border: none;
    box-shadow: none;
    background-color: transparent;
}

.button-clear:active {
    box-shadow: none
}

.button-clear:hover {
    background-color: transparent;
    transform: none;
}

.button-big {
    min-width: 10rem;
    border-radius: 1rem;
    background-color: hsl(49, 100%, 98%);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.5);
}

.button-big:active {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.75);
}

.button-big-long {
    min-width: 15rem;
    border-radius: 1rem;
    background-color: hsl(49, 100%, 98%);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.button-big-long:active {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
}

.button-good {
    background-color: hsl(93, 65%, 90%);
}

.button-good:hover {
    background-color: hsl(93, 65%, 80%);
}

.button-bad {
    background-color: hsl(6, 100%, 92%);
}

.button-bad:hover {
    background-color: hsl(6, 100%, 85%);
}

.color-bad {
    color: hsla(0, 77%, 30%, 0.87);
}

.color-good {
    color: hsla(93, 77%, 30%, 0.87);
}

.color-between {
    color: hsla(40, 75%, 30%, 0.85);
}

.important {
    font-weight: bold;
    font-family: big-text, serif;
    font-size: 1.1rem;
    letter-spacing: 0.1rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.font-regular {
    font-family: regular-text, sans-serif;
}

.placeholder:empty:before {
    content: var(--placeholder);
}

.input-name {
    font-size: 1rem;
    width: 12rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.input-number {
    width: 6rem;
    font-size: 1.2rem;
    text-align: center;
    font-family: big-text, serif;
    color: hsla(0, 0%, 5%, 0.7);
}

.input-money-container {
    display: flex;
    align-items: center;
}

.input-money-icon-wrapper {
    margin-left: 0.1rem;
}

.input-money-icon {
    font-family: big-text, serif;
    font-size: 1.5rem;
}

.input-boolean-container {
    display: flex;
    flex-direction: column;
}

.input-boolean-choice-container {
    display: flex;
    align-items: center;
}

.input-boolean-choice {
    height: 2rem;
}

.input-boolean-choice-label {
    padding-top: 0.2rem;
    padding-left: 0.2rem;
}

.input-checkbox-wrapper {
    display: flex;
    align-items: center;
}

.input-checkbox-label {
    padding-left: 0.3rem;
}

.input-select-wrapper {
    padding: 0.2rem;    
}

.input-select {
    background-color: hsla(93, 65%, 90%, 0.2);
    font-family: regular-text, sans-serif;
    width: 12rem;
    padding: 0.2rem;
    cursor: pointer;
    text-align: center;
    border-radius: 0.3rem;
}

.disabled {
    color: var(--disabled-color);
    pointer-events: none;
}

.disabled-appearance {
    color: var(--disabled-color)
}

.disabled-appearance:hover {
    color: var(--disabled-color);
    background-color: initial;
    transform: none;
    cursor: initial;
}

.form-container {
    padding: 0.5rem;
}

.form-upper-container {
    display: flex;
    justify-content: center;
}

.form-middle-container {
    padding-top: 1rem;
    display: flex;
    justify-content: space-around;
}

.form-lower-container {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.form-validation-error-wrapper {
    text-align: center;
    padding-bottom: 1rem;
}

.table-container {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    margin: 2rem;
    background-color: hsla(30, 100%, 93%, 0.2);
    box-shadow: rgba(50, 50, 93, 0.25) 0 2px 5px -1px, rgba(0, 0, 0, 0.3) 0 1px 3px -1px;
}

.table-header {
    text-align: center;
    font-size: 1rem;
    font-family: big-text, serif;
    text-transform: uppercase;
}

.table-add-button-wrapper {
    display: block;
    text-align: center;
    padding: 1rem;
}

.table-row-and-icon {
    display: grid;
    grid-template-columns: auto 0;
}

.table-row-container {
    display: grid;
    grid-template-columns: 50% 50%;
    column-gap: 1rem;
    padding: 1rem 0 1rem 0.75rem;
    color: hsla(0, 0%, 5%, 0.7);
    border-bottom: 1px solid hsl(0, 0%, 93%);
    transition: 0.2s;
}

.table-row-archived {
    grid-template-columns: auto;
    padding: 1rem;
}

.table-row-container:not(.table-summary) {
    cursor: pointer;
}

.table-row-container:not(.table-summary):hover {
    background-color: hsla(0, 100%, 0%, 0.05);
    color: hsl(0, 0%, 5%);
}

.table-item-empty-row {
    display: block;
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.table-item-name-wrapper {
    display: flex;
    padding-left: 1rem;
}

.table-item-sum-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 2rem;
}

.table-item-sum-pre {
    font-size: 0.8rem;
    padding-right: 0.5rem;
    padding-bottom: 0.1rem;
}

.table-item-sum-wrapper {
    font-family: big-text, serif;
    text-align: center;
}

.table-summary {
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon {
    width: 1.25rem;
    transition: 0.3s;
    cursor: pointer;
}

.icon:hover {
    transform: rotate(-5deg);
}

.icon:active {
    transform: scale(0.95);
}



/* ---- Medium screens (still wide, but too narrow for full modal) ---- */
@media only screen and (max-width: 65rem) {
    
    .modal-container {
        padding-left: 0;
        padding-right: 0;
        width: 95%;
    }

    .modal-standard {
        min-width: 375px;
        width: 90%;
        margin: 0 !important;
    }

}


/* ---- Small screens ---- */
@media only screen and (max-width: 800px) {

    .modal-small {
        min-width: 375px;
        width: 90%;
        margin: 0 !important;
    }
    
    .input-name {
        width: auto;
    }

    .form-container {
        padding-left: 0;
        padding-right: 0;
    }
    
    .button-big-long {
        min-width: 12rem;
    }

    .table-container {
        margin-left: 0;
        margin-right: 0;
    }
    
    .table-row-container {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        font-family: big-text, serif;
    }

    .table-item-name-wrapper {
        padding-left: 0;
    }
    
    .table-item-sum-container {
        padding-right: 0;
        padding-top: 0.5rem;
        font-weight: initial;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    
    .table-item-sum-pre {
        padding-bottom: 0;
        padding-right: 0;
        align-self: center;
    }
    
    .table-item-sum-wrapper {
        font-family: regular-text, sans-serif;
    }
}