/* Vars */
:root {
    --background-color: #061B09;
    --text-color: #bbb;
    --primary-color: #03D47C;
    --secondary-color: #02592f;
    --muted-color: #444;
    --primary-color-hover: #00C271;
    --error-color: #f25730;
    --border-color: #1A3D32;
    --focus-text-color: #fff;
    --alternating-color-odd: #0b2e14;
    --alternating-color-even: #0e3a1c;

    --14px: 0.875rem;
    --15px: 0.9375rem;
    --16px: 1rem;
    --17px: 1.0625rem;
    --18px: 1.125rem;
    --19px: 1.1875rem;
    --20px: 1.25rem;
    --21px: 1.3125rem;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    font-size: var(--14px);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ============================================
 * Typography
 * ============================================ */

h1 {
    font-size: var(--21px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: normal;
}

/* ============================================
 * Page Divisions
 * ============================================ */

header,
footer {
    padding: 20px;
    text-align: center;
    margin: 40px 0;
}

main {
    padding: 20px;
}

.page {
    margin: 20px 0;
    border-radius: 5px;
    transition: width 0.3s ease-in-out;

    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    transition: width 0.5s ease-in-out;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 0 10px 0;
}

.col {
    flex: 1;
    padding: 10px 0;
}

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

/* .align-right {
    float: right;
} */

.align-right button {
    float: right;
}

button.primary {
    background-color: var(--primary-color);
}

button.secondary {
    background-color: transparent;
    border: 1px solid var(--secondary-color);
}

button.secondary:hover {
    background-color: var(--secondary-color);
}

#transactions-list {
    width: 100%;
}

#transactions-list table {
    width: 100%;
}

/* ============================================
 * Navigation
 * ============================================ */

body header#main-header nav {
    display: none;
}

header#main-header {
    padding: 20px;
    color: var(--focus-text-color);
    margin-bottom: 30px;
}

body.logged-in #main-header nav {
    display: block;
}

#main-header nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    /* display: flex;
    flex-direction: column; */
    align-items: center;
}

#main-header nav ul li  {
    margin: 10px 0;
    height: auto;
    padding: 20px 0;
}

#main-header nav a {
    font-size: var(--16px);
    text-transform: uppercase;
    color: var(--text-color);
    /* display: block; */
    padding: 10px 15px;
    text-decoration: none;
}

#main-header nav a:hover {
    color: var(--focus-text-color);
}

/* ============================================
 * Breakpoints
 * ============================================ */

/* Small devices */
/* @media (min-width: 1px) {
    .col-75 {
        flex: 0 0 100%;
        padding: 10px;
    }

    .col-50 {
        flex: 0 0 100%;
        padding: 10px;
    }

    .col-66 {
        flex: 0 0 100%;
        padding: 10px;
    }

    .col-33 {
        flex: 0 0 100%;
        padding: 10px;
    }

    .col-25 {
        flex: 0 0 25%;
        padding: 10px;
    }

    .category,
    .th-category {
        display: none;
    }
} */

.col-75 {
    flex: 0 0 100%;
    padding: 10px;
}

.col-50 {
    flex: 0 0 100%;
    padding: 10px;
}

.col-66 {
    flex: 0 0 100%;
    padding: 10px;
}

.col-33 {
    flex: 0 0 100%;
    padding: 10px;
}

.col-25 {
    flex: 0 0 25%;
    padding: 10px;
}

.category,
.th-category {
    display: none;
}

/* Medium devices */
/* @media (min-width: 768px) {} */

/* Large devices */
@media (min-width: 768px) {
    .col-75 {
        flex: 0 0 75%;
        padding: 10px;
    }

    .col-50 {
        flex: 0 0 50%;
        padding: 10px;
    }

    .col-66 {
        flex: 0 0 66.66%;
        padding: 10px;
    }

    .col-33 {
        flex: 0 0 33.33%;
        padding: 10px;
    }

    .col-25 {
        flex: 0 0 25%;
        padding: 10px;
    }

    .category,
    .th-category {
        display: block;
    }
}

td#total {
    column-span: all;
    text-align: right;
}

/* Extra Large devices */
@media (min-width: 1200px) {}

/* ============================================
 * Tables
 * ============================================ */

table {
    width: 100%;
    table-layout: fixed;
}

th {
    text-align: left;
    padding: 8px;
    background-color: var(--secondary-color);
    color: var(--focus-text-color);
}

tr>th:first-child {
    border-top-left-radius: 8px;
}

tr>th:last-child {
    border-top-right-radius: 8px;
}

tfoot {
    background-color: var(--secondary-color);
    color: var(--focus-text-color);
    font-weight: bold;
}

tfoot td {
    padding: 0 20px;
}

tfoot tr>td:first-child {
    border-bottom-left-radius: 8px;
    background-color: var(--secondary-color);
}

tfoot tr>td:last-child {
    border-bottom-right-radius: 8px;
    background-color: var(--secondary-color);
}

tr td {
    padding-left: 9px;
}

tr:nth-child(odd) {
    background-color: var(--alternating-color-odd);
    border-radius: none;
}

tr:nth-child(even) {
    background-color: var(--alternating-color-even);
    border-radius: none;
}

th.th-created,
th.th-amount {
    width: 15%;
}

th.th-merchant {
    width: 35%;
}

/* ============================================
 * Forms
 * ============================================ */

fieldset {
    width: 100%;
    border-radius: 4px;
    flex: 1 1 0%;
    justify-content: center;
    height: 100%;
    background-color: var(--background-color);
    overflow: hidden;
    border-width: 1px;
    padding: 4px 8px;
    border-radius: 8px;
    border-color: var(--border-color);
    color: var(--text-color);
    border-style: solid;
}

fieldset:has(input:focus) {
    border-color: var(--primary-color);
    border-width: 1px;
}

/* Form Components */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"] {
    width: 100%;
    flex: 1 1 0%;
    justify-content: center;
    background-color: var(--background-color);
    overflow: hidden;
    padding: 6px 8px;
    color: var(--text-color);
    border: none;
    margin: 0
}

fieldset input:focus,
fieldset input:active,
fieldset textarea:focus,
fieldset textarea:active {
    outline: none;
    border-color: var(--primary-color);
    border-width: 1px;
    color: var(--focus-text-color);
}


fieldset.error,
fieldset:has(.error),
fieldset:has(.error) input,
fieldset.error input:focus,
fieldset.error input:active,
fieldset.error textarea:focus,
fieldset.error textarea:active {
    border-color: var(--error-color);
    border-width: 1px;
}

small.error,
label .error {
    color:  var(--error-color);
    /* text-transform: uppercase; */
}

small.error {
    padding-left: 20px;
}

input[type="date"] {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--text-color);
    text-transform: uppercase;
}

button, 
a[href="#filter-transactions"] {
    background: var(--primary-color);
    border-radius: 50px;
    border: none;
    padding: 15px 30px;
    color: var(--focus-text-color);
    cursor: pointer;
    font-size: 1rem;
}

button:hover, 
a[href="#filter-transactions"]:hover {
    background: var(--primary-color-hover);
    color: var(--focus-text-color);
}

a[href="#filter-transactions"] {
    text-transform: uppercase;
    color: var(--focus-text-color);
    text-decoration: none;
    font-size: .8rem;
    padding: 10px 15px;
    margin-left: 4px;
}

/* ============================================
 * Spinner styles
 * ============================================ */

/*
Source - https://stackoverflow.com/a
Posted by iraj jelodari, modified by community. See post 'Timeline' for change history
Retrieved 2025-12-08, License - CC BY-SA 4.0
*/

.lds-ellipsis,
.lds-ellipsis div {
    box-sizing: border-box;
}

.lds-ellipsis {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-ellipsis div {
    position: absolute;
    top: 33.33333px;
    width: 13.33333px;
    height: 13.33333px;
    border-radius: 50%;
    background: currentColor;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) {
    left: 8px;
    animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
    left: 8px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
    left: 32px;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
    left: 56px;
    animation: lds-ellipsis3 0.6s infinite;
}

@keyframes lds-ellipsis1 {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes lds-ellipsis3 {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(0);
    }
}

@keyframes lds-ellipsis2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(24px, 0);
    }
}
