/* region Variables */
:root {
    --primary: #1870bd; /* #245a98; */
    --secondary: #6fb1cc;
    --event: #00ccfb; /* #4da5d2; */

    --success: #80c719;
    --danger: #c51939;
    --warning : #ffae00;
    --disabled: #d3d3d3;
    --paragraph: #1e1e1e;
    --heading: var(--primary);
    --background: #fdfdfd;
    --white: #fdfdfd;
    --whiteOnColor: #fdfdfd;
    --placeholderOpacity: 0.1;

    --temp: var(--white); /* Temporary solutions are always permanent */

    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12),
    0 5px 10px rgba(0, 0, 0, 0.24);
}

/* endregion */

/* region Colors */
.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.bg-success {
    background-color: var(--success) !important;
}

.bg-danger {
    background-color: var(--danger) !important;
}

.bg-warning {
    background-color: var(--warning) !important;
}

.bg-paragraph {
    background-color: var(--paragraph) !important;
}

/* text colors */
.primary {
    color: var(--primary);
}

.secondary {
    color: var(--secondary);
}

.success {
    color: var(--success);
}

.danger {
    color: var(--danger) !important;
}

.warning {
    color: var(--warning) !important;
}

.paragraph {
    color: var(--paragraph) !important;
}

/*#endregion */

/* region Buttons */

.btn-primary {
    background-color: var(--primary);
    color: var(--whiteOnColor);
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
    padding: 10px;
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

.btn-primary-outline {
    background-color: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 5px;
    box-sizing: border-box;
    padding: 10px;
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

.btn-primary:hover, .btn-primary:active {
    background-color: var(--event);
    color: var(--whiteOnColor);
}

.btn-primary-outline:hover, .btn-primary-outline:active {
    border-color: var(--event);
    color: var(--event);
}

    /* endregion */

/* region Bootstrapy */

.w-100 {
    width: 100% !important;
}

.py-1 {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.my-1 {
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
}

.my-2 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

.pl-1 {
    padding-left: 0.25rem !important;
}

.pl-2 {
    padding-left: 0.5rem !important;
}

.m-0 {
    margin: 0 !important;
}

.visible {
    display: block !important;
}

.hidden {
    display: none !important;
}

.no-break {
    white-space: nowrap;
}

.bold {
    font-weight: bold;
}

/* endregion */

/* region General */

body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    margin: 0;
    padding: 0;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%; /* Ensure the body takes full width */
}

header {
    color: var(--heading);
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 20px;
    grid-area: header;
    margin-left:auto;
}

header {
    margin: 0;
    padding: 0;
}

a {
    color: var(--secondary);
}

footer {
    background-color: var(--primary);
    color: var(--whiteOnColor);
    text-align: center;
    width: 100%;
    grid-area: footer;
    bottom: 0;
    /* position: fixed; */
    padding-top: 10px;
    padding-bottom: 10px;
    z-index: 2; /* same as the circular menu */
}

.card {
    position: relative; /* This allows absolute positioning within .card */
    /* ...other styles... */
}

.card-sticker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the icon */
    font-size: 30px; /* Adjust as needed */
    z-index: 1; /* To make sure the icon appears above other elements */
}

footer p {
    margin: 0;
}

.nav-article-container, .header-container {
    /* padding-bottom: 200px;  Footer height */
    flex-grow: 1;
}

footer a {
    color: var(--whiteOnColor);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
}

aside {
    background-color: var(--event);
    color: var(--paragraph);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
    grid-area: aside;
    align-self: start;
}

img {
    max-width: 100%;
    height: auto;
}

nav {
    grid-area: nav;
}

article {
    grid-area: article;
    width: 100%;
}

nav a {
    display: block;
    text-decoration: none;
    margin: 0;
    text-align: center;
    padding: 8px;
    margin-bottom: 10px;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: 5px;
    color: var(--heading);
    background-color: var(--white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
    transition: transform 0.5s;
}

nav a:hover {
    background-color: var(--primary);
    color: var(--white);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--secondary);
    margin-bottom: 10px;
}


/* endregion */

/* region Menu */

.title {
    font-size: 34px;
    color: var(--heading);
    margin: 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.hamburger {
    display: none; /* Hidden by default */
    font-size: 40px;
    margin: 10px;
}

.settings-container {
    display: flex;
    align-items: center;
}

.dark-mode-toggle {
    display: block;
    margin: 10px;
    font-size: 25px;
}


.close-menu-btn{
    display: none;
    color: var(--whiteOnColor);
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: var(--primary);
}
.close-menu-btn:hover {
    background-color: var(--event);
}

.open {
    display: block !important;
}

/* endregion */

/* region Article */

.page-title {
    font-size: 32px;
    color: var(--heading);
    margin:0;
    margin-bottom: 15px;
}

.header-make-model:hover, .header-make-model:active {
    color: var(--event);
    cursor: pointer;
}

.card {
    display: block;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    margin-bottom: 20px;
    padding:10px;
}
.card-container {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 20px;
    row-gap: 0;
    margin-right: 20px;
}

.card-header {
    position: relative; /* This allows absolute positioning within .card-header */
}

.btn-vehicle-add-service-event {
    position: absolute;
    font-size: 30px;
    top: 0;
    right: 0;
    margin-top: -10px;
}

.card-body {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.car-info {
    flex: 0 0 35%;
    margin: 15px 10px 10px;
}

.expense-statistics {
    flex: 0 0 50%;
    margin: 15px 10px 10px;
}

.expense-statistics {
    text-align: right;
}

.car-info span, .expense-statistics span, .car-info h2{
    margin-left: 5px !important;
}

.car-info p:first-child, .expense-statistics p:first-child {
    margin-top: 0;
}

.car-info p , .expense-statistics p {
    margin-top:7px;
    margin-bottom: 7px;
}

/* region Car menu actions */

.btn-open-menu {
    /* style the button as needed */
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    z-index: 2; /* Because of the menu */

    /* Remove outline on focus */
    outline: none;
    /* Remove tap highlight color on mobile devices */
    -webkit-tap-highlight-color: transparent;
}

.circular-menu {
    /* initially hidden */
    display: none;
    position: absolute;
    top: 0;
    right: 0;
}

.circular-menu .circle {
    position: relative;
    width: 120px; /* Adjust as needed */
    height: 120px; /* Adjust as needed */
}

.icon-flex, .icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.icon-wrapper {
    border-radius: 50%;
    background-color: var(--temp);
    overflow: hidden;
    border: 6px solid var(--secondary);
    font-size: 20px;
    width: 48px;
    height: 48px;
    box-shadow: var(--box-shadow);
}

.circular-menu .icon-wrapper:hover, .btn-open-menu:hover, .btn-open-menu:active, .circular-menu .icon-wrapper:active, .icon-wrapper:hover {
    border-color: var(--event);
}

.icon-clean {
    position: absolute;
    top: -5%;
    left: -15%;
}

.icon-fuel {
    position: absolute;
    top: 40%;
    left: 15%;
}

.icon-service {
    position: absolute;
    top: 65%;
    left: 65%;
}

/* region Circular menu animation */

@keyframes spin-in {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-out {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.bi-dash.spin-in {
    animation: spin-in 0.5s linear forwards;
}

.bi-plus.spin-out {
    animation: spin-out 0.5s linear forwards;
}

/* region Circular menu OPEN animation */
@keyframes icon-clean-animation {
    from {
        top: 0;
        left: 55%;
        transform: scale(0);
    }
    to {
        top: -5%;
        left: -15%;
        transform: scale(1) rotate(360deg);
    }
}

@keyframes icon-fuel-animation {
    from {
        top: 0;
        left: 55%;
        transform: scale(0);
    }
    to {
        top: 40%;
        left: 15%;
        transform: scale(1) rotate(360deg);
    }
}

@keyframes icon-service-animation {
    from {
        top: 0;
        left: 55%;
        transform: scale(0);
    }
    to {
        top: 65%;
        left: 65%;
        transform: scale(1) rotate(360deg);
    }
}

.circular-menu.open .icon-clean {
    animation: icon-clean-animation 0.5s ease-out forwards;
}

.circular-menu.open .icon-clean {
    animation: icon-clean-animation 0.5s ease-out forwards;
}

.circular-menu.open .icon-fuel {
    animation: icon-fuel-animation 0.5s ease-out forwards;
}

.circular-menu.open .icon-service {
    animation: icon-service-animation 0.5s ease-out forwards;
}

/* endregion */

/* region Circular menu CLOSE animation */

@keyframes icon-clean-hide-animation {
    from {
        top: -5%;
        left: -15%;
        transform: scale(1);
    }
    to {
        top: 0;
        left: 55%;
        transform: scale(0) rotate(-360deg);
    }
}

@keyframes icon-fuel-hide-animation {
    from {
        top: 40%;
        left: 15%;
        transform: scale(1);
    }
    to {
        top: 0;
        left: 55%;
        transform: scale(0) rotate(-360deg);
    }
}

@keyframes icon-service-hide-animation {
    from {
        top: 65%;
        left: 65%;
        transform: scale(1);
    }
    to {
        top: 0;
        left: 55%;
        transform: scale(0) rotate(-360deg);
    }
}

.circular-menu {
    transition: all 0.5s ease-out;
}

.circular-menu.closing .icon-clean {
    animation: icon-clean-hide-animation 0.5s ease-out forwards;
}

.circular-menu.closing .icon-fuel {
    animation: icon-fuel-hide-animation 0.5s ease-out forwards;
}

.circular-menu.closing .icon-service {
    animation: icon-service-hide-animation 0.5s ease-out forwards;
}


/* endregion */

/* endregion */

/* endregion */

.placeholder {
    display: inline-block; /* To make it align with text */
    height: 1em; /* To match the line height of the text .. em takes the nearest size it finds, rem takes the root font size */
    width: 60%;
    opacity: var(--placeholderOpacity);
    border-radius: 0.4rem;
}

.car-info p:nth-child(2) .placeholder, .expense-statistics p:nth-child(2) .placeholder {
    width: 45%;
}

.car-info p:nth-child(3) .placeholder, .expense-statistics p:nth-child(3) .placeholder {
    width: 35%;
}

.placeholder.bg-danger {
    width: 75%;
}

.add-new-content {
    text-align: center;
    position: absolute; /* Added this line */
    top: 50%; /* Added this line */
    left: 50%; /* Added this line */
    transform: translate(-50%, -50%); /* Added this line */
    width: 66.66%; /* Added this line */
    height: 66.66%; /* Added this line */
}

.add-icon {
    font-size: 150px; /* Adjust as needed */
    position: absolute; /* Added this line */
    top: 50%; /* Added this line */
    left: 50%; /* Added this line */
    color: var(--secondary);
    transform: translate(-50%, -50%); /* Added this line */
}

.card:hover .add-icon, .card:active .add-icon {
    color: var(--event);
}

/* endregion */

/* region Modals */

.modal {
    display: none;
    position: fixed;
    z-index: 3;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;

}

.modal-content {
    background-color: var(--background);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    font-size: 18px;
}

.modal-content {
    border-radius: 15px; /* Rounded edges */
    box-shadow: var(--box-shadow);
}

.modal-content form input, .modal-content form select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-size: 20px;
    background-color: var(--white);
    color: var(--paragraph);
}


.modal-content form input:focus, .modal-content form select:focus, .modal-content form input:hover, .modal-content form select:hover{
    border-color: var(--event);
}

form input:invalid {
    border-color: var(--danger);
    color: var(--danger);
}

.close {
    color: var(--paragraph);
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.modal-content .close {
    border: none;
    background: none;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
}


.modal-header h1 {
    margin: 0 0 0 10px;
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-footer button {
    width: 100%; /* Stretch edge to edge */
}

.close:hover,
.close:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.submit-btn{
    color: var(--whiteOnColor);
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    width: 100%;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 10px;
    background-color: var(--primary);
    text-decoration: none;
}

.vin-input-container {
    display: flex;
    justify-content: stretch;
    align-items: center;
    width: 100%;
}
.vin-input-container input {
    min-width: 60% !important;
    margin-right: 10px;
}

input:disabled, #vin-input:disabled, #vin:disabled {
    background-color: var(--disabled);
    color: var(--paragraph);
}
.check-vin-btn{
    background-color: var(--primary);
    color: var(--whiteOnColor);
    width: 30%;

    box-sizing: border-box;
    border: none;

    border-radius: 6px;
    padding:10px;
    font-size: 16px;
    text-align: center;
    margin-top:-6px;
}

/* endregion */

/* region Details */


.delete-btn{
    color: var(--whiteOnColor);
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 16px;
    border-radius: 5px;
    box-sizing: border-box;
    background-color: var(--danger);
    border: thin solid var(--danger); /* Add this line */
    margin-top: 4px;
    padding: 5px 10px;
    text-decoration: none;
}
.delete-btn:hover {
    border: thin solid var(--event);
}


.statistics-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}


.statistics-container .card {
    max-width: 100%;
}

.all-statistics {
    flex: 0 0 40%;
    margin: 15px 10px 10px;
    text-align: right;
}
.yearly-statistics {
    flex: 0 0 40%;
    margin: 15px 10px 10px;
    text-align: left;
}


.inverted-card {
    background-color: var(--background); /* Change to your preferred color */
    color: var(--paragraph); /* Change to your preferred color */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    margin-bottom: 10px;
}

.th {
    color: var(--secondary);
    font-weight: bold;
}

.th, .tr {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    padding: 10px;
    border-radius: 10px 10px 0 0;

}


.th, .tr {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;

}

.th .td, .tr .td {
    min-width: 100px;
    display: flex;
    margin: 5px;
    flex: 1 0 auto;
    justify-content: center;
    white-space: nowrap;
}


.row-divider {
    border-right: 1px solid var(--paragraph); /* Change the color as needed */
    width: 1px;
    display: none;
}

/* endregion */

/* region Media Queries */

@media screen and (max-width: 800px) {
    .nav-article-container {
        flex-grow: 1;
        width: 100%;
    }

    .card-container {
        grid-template-columns: 1fr;
        margin-left: 20px;
    }

    .hamburger {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
    }

    nav a {
        display: block;
    }
    .close-menu-btn {
        display: block;
    }
}

@media screen and (min-width: 800px) {
    .nav-article-container {
        flex-grow: 1;
        width: 100%;
    }

    .header-container {
    }

    .card-container {
        grid-template-columns: repeat(2, 1fr);
        margin-left: 20px;
        grid-gap: 40px;
    }

    .hamburger {
        display: block;
    }

    nav {
        display: none;
        flex-direction: column;
    }

    nav a {
        display: block;
    }
    .close-menu-btn {
        display: block;
    }
}


@media screen and (min-width: 1500px){
    .nav-article-container {
        display: flex;
        flex-direction: row;
        gap: 20px;
    }
    .card {
        min-width: 300px;
    }
    nav {
        width: 25% ;
    }
    article {
        min-width: 75%;
    }

    .card-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
        row-gap: 0;
    }

}

/* endregion */


/* region Dark Mode */
body.dark-mode {
    --primary: hsl(213, 83%, 60%); /*#2f76c7;*/
    --secondary: #6fb1cc;
    --event: #dcfb00; /* #4da5d2; */

    --success: #80c719;
    --danger: #dc1e40;
    --disabled: #505050;
    --paragraph: #e5e4e4;
    --heading: var(--primary);
    --background: #262626;
    --white: #313131;
    --whiteOnColor: var(--paragraph);
    --placeholderOpacity: 0.3;

    --temp: #353535;



    background-color: var(--background);
    color: var(--paragraph);
}

/* Dark mode prettifying */

/* endregion */
*,
*::before,
*::after {
    box-sizing: border-box;
}

