/* Using the BEM class naming methodology */


/* GLOBAL */

html {
font-size: 16px;
font-family: "Roboto", sans-serif;
background-color: #ececec;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
}

ol,ul {
	list-style: none;
	}


    /* MALT-LIST */
    /* Ensure list items in columns display correctly */
.column_list {
    padding: 0;
    margin: 0;
}

.column_items {
    padding: 0.5rem 0;
}

/* Container for the columns */
.container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Column layout */
.column {
    width: 48%;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table-container {
    margin: 20px auto;
    width: 80%;
    border-collapse: collapse;
    text-align: left;
}

.styled-table {
    width: 100%;
    border: 1px solid #ddd;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.styled-table th,
.styled-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.quantity-left-row td {
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    background-color: #f9f9f9;
    color: #333;
}

.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 1px 0;
    padding: 1px;
}

/*Borders for Tables (Added by Doug 2024/12/15) */
.table-bordered {
    border-collapse: collapse;
    width: 100%;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid black;
    padding: 8px;
    text-align: left;
}

.table-bordered th {
    background-color: #f2f2f2; /* Optional: Add a light background for headers */
}

.table-bordered td {
    text-align: center;
}



/* Media query for responsiveness */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    .column {
        width: 100%;
    }
}

    
    /* Media queries to handle responsiveness */
    @media (max-width: 768px) {
        .container {
            flex-direction: column;
            align-items: center;
        }
        .column {
            width: 100%;
        }
    }


    /* BUTTONS/ LINKS */

.btn {
    /* align-self: flex-start; */
    align-self: center;
    text-decoration: none;
    background-color: #9fd3c7;
    background-image: linear-gradient(#a8d6d1, #96cfc3);
    border: 1px solid #8cb9b0;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.12) 0 1px 1px;
    text-shadow: .125px .125px .25px rgba(0, 0, 0, 0.5);
    color: #142d4c;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    line-height: 100%;
    margin: 0;
    padding: .5rem;
    outline: 0;
    text-align: center;
    transition: box-shadow .05s ease-in-out,opacity .05s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
  }  

.btn:hover {
    box-shadow: rgba(255, 255, 255, 0.3) 0 0 2px inset, rgba(0, 0, 0, 0.4) 0 1px 2px;
    text-decoration: none;
    transition-duration: .15s, .15s;
  }
  
.btn:active {
    box-shadow: rgba(0, 0, 0, 0.15) 0 2px 4px inset, rgba(0, 0, 0, 0.4) 0 1px 1px;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.btn:disabled:active {
    pointer-events: none;
}

.btn:disabled:hover {
    box-shadow: none;
}

.btn__container--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.btn--submit {
    margin-top: 1rem;
}

.navlinks {
    align-self: center;
    color: white;
    text-decoration: underline;
    font-weight: 500;
}

.navlinks--multiple {
    margin: 1rem 0;
    color: #142d4c;
}


/* CARDS */

.card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    margin: 1rem;
    border-radius: 4px;
    box-shadow: rgba(0, 0, 0, 0.12) 0 1px 1px;
    background-image: linear-gradient(135deg, #385170, #3e4a6b);
    border: 1px solid #2D4560;
    background-color: #385170;
    color: white;
    transition: all 0.2s ease-in-out;
}

.card--empty {
    text-align: center;
}

.card__title {
    margin: 0;
    padding: .5rem 0;
    font-weight: bold;
}

.card__title--small {
    padding: .5rem 2rem;
    margin: 0;
}

.card__form {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}


/* TABLES */

.table {
    margin: 1rem 0 1rem 0;
    border-collapse: collapse;
    border-spacing: 0;
}

.table__title {
    text-align: center;
    margin: 1.5rem 1rem .5rem 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.table__row--alternating {
    text-align: center;
    background-color: #385170;
    border: none;
    height: 5rem; /* Adjust this value to increase/decrease row height */
}

.table__row--alternating:nth-child(odd) {
    text-align: center;
    background-color: #142d4c;
    height: 5rem; /* Adjust this value to increase/decrease row height */
}

.table__row__heading {
    text-align: center;
    font-weight: 600;
    font-size: larger;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.table__row__detail {
    padding: 1rem .5rem;
    padding: 1.5rem 2rem; /* Adjust padding for spacing */
    vertical-align: middle; /* Ensure vertical alignment */
    text-align: center;
    color: white;
}

.table__row__detail--link {
    color: #9fd3c7;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.table__row__detail--link:hover {
    display: inline-block;
    transform: scale(1.1);
}

.table__link {
    display: inline-block;
    padding: 0 .5rem;
    font-weight: 500;
    color: #9fd3c7;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.table__link:hover {
    transform: scale(1.2);

}


/* HEADER */

.header__container {
    width: 100%;
    height: 4.5rem;
    position: fixed;
    display: flex;
    z-index: 100;
    background-color: #142d4c;
    justify-content: space-between;
    align-items: center;
    }

.header__logo {
    display: flex;
    flex: 1.5;
    align-items: center;
    margin: 0 1rem; 
    color: #ececec;
    font-weight: 400;
}

.header__logo__img {
    max-width: 5rem;
    height: auto;
    display: block;
}

.header__logo__title {
    padding-left: 1rem;
}


    /* Nav */

.navbar {
    width: 100%;
    display: flex;
    flex: 3;
    /* justify-content: flex-start; */
    justify-content: space-evenly;
}

.navbar--unauth {
    width: 100%;
    display: flex;
}

.navlist {
    display: flex;
    /*  justify-content: flex-start; */
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0 1rem;
}

.navlist--unauth {
    justify-content: flex-end;
    gap: 2rem;
    
}

.navlist--mobile {
    gap: 2rem;
    width: 100%;
}

.navlist__link {
    text-decoration: none;
    color: #9fd3c7;
    font-weight: bold;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.navlist__link:hover {
    transform: scale(1.1);
}


/* MAIN */


.main {
    padding-top: 4.5rem; /* Match header height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content at the top */
    background-color: #ececec;
    color: #142d4c;
} 


/* HOME_UNAUTHENTICATED */

        /* Title/ description */

.landing {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.landing__left {
    display: flex;
    flex-direction: column;
    flex: 2;
    align-items: center;
    justify-content: flex-start;
    padding: 0 1.5rem;
}

.landing__img {
    max-width: 100%;
    height: auto;
    align-items: flex-start;
    display: block;
}

.left__content {
    display: flex;
    flex-direction: column;
    color: #142d4c;
}

.leftcontent__title {
    margin: .5rem 0;
}

.leftcontent__detail {
    text-align: left;
    margin: 0;
    padding: .25rem 0;
}

        /* Login/ sign-up prompt */

.landing__loginprompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: baseline;
}

.btn--login {
    margin: .5rem;
}

.loginprompt__signupprompt {
    padding: .5rem;
}

.signupprompt__link {
    color: #142d4c;
    text-decoration: underline;
}

        /* Landing-right */

.landing__right {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 1.5rem;
}

.card--landingright {
    background-image: linear-gradient(135deg, #385170, #385170); /* default color for .card--landingright */
    background-color: #385170;
    flex-wrap: wrap;
}

.card--landingright:hover {
    transform: scale(1.05);
    box-shadow: rgba(0, 0, 0, 0.19) 0 12px 24px, rgba(0, 0, 0, 0.23) 0 8px 8px;
    background-image: linear-gradient(135deg, #142d4c, #142d4c); /* hover color for .card--landingright */
    background-color: #142d4c;
}

.card__title--landingright {
    color: #ececec;
    transition: color 0.2s ease;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.card__info--landingright {
    margin: 0;
}

/* FORMS */
 
.form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Center the form-container at the top */
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align content at the top */
    margin: 0 auto;
    padding: 2rem; /* Add padding around the form */
    max-width: 800px; /* Limit the width of the container */
    width: 100%;
}


.card--form {
    align-items: center;
    padding: 1.5rem;
}

.card--form--delete {
    padding: 2rem;
}

.card__title--form {
    margin-bottom: .5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.card__title--delete {
    padding: 1rem 2rem;
}

.card__form {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.card__form--start {
    align-items: flex-start;
}

/* LOGIN */

.btn--login {
    margin-top: 1rem;
}


/* SIGNUP */

/* DROP DOWN */
/* Dropdown Styling */
.dropdown {
    position: relative;
    display: inline-block; /* Ensure dropdown fits within navlist */
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
}


.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    color: #ececec;
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    background-color: #385170;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: #142d4c;
    color: #9fd3c7;
}




/* HOME_AUTHENTICATED */

.home__container {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center horizontally */
    justify-content: flex-start; /* Align at the top */
    width: 100%;
    padding: 0; /* Remove any extra padding */
  }

.flex-container {
    display: flex;
    justify-content: center; /* Centers the flex items horizontally */
    flex-wrap: wrap; /* Allows items to wrap to the next line if they overflow */
  }
  
  /* Optional: Additional styles to make the cards look better */
  .card {
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
  }

.home__image {
    width: 500px;
    height: auto;
    padding: 1rem;
    display: block;
    position: absolute; /* Positioning the element absolutely */
    left: 0; /* Positioning it at the left of the screen */
    top: 50%; /* Positioning it in the middle vertically */
    transform: translateY(-50%) scale(0.5); /* Centering it vertically and scaling it down */
}

.home__cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.card--home {
    align-items: center;
    background-image: linear-gradient(135deg, #385170, #385170); /* default color for .card--home */
    background-color: #385170;
    box-shadow: rgba(0, 0, 0, 0.19) 0 12px 24px, rgba(0, 0, 0, 0.23) 0 8px 8px;
}

.card--home:hover {
    transform: scale(1.05);
    box-shadow: rgba(0, 0, 0, 0.19) 0 12px 24px, rgba(0, 0, 0, 0.23) 0 8px 8px;
    background-image: linear-gradient(135deg, #142d4c, #142d4c); /* hover color for .card--home */
    background-color: #142d4c;
}

.card__title--home {
    color: #ececec;
    transition: color 0.2s ease;
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.card__info--home {
    margin: .5rem .25rem 0 .25rem;
    padding: .5rem;
    font-weight: 300;
}

.card__data--home {
    padding: .25rem;
    margin: 0 .25rem .5rem .25rem;
    font-weight: 600;
    border: 1px solid #0a1a33;
    border-radius: 3px;
    color: #142d4c;
    background-color: #ececec;
}

.btn--home {
    margin-top: 1rem;
}


/* PAGE CONTENT */

.page {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page__title {
    margin: 0;
    margin-top: 1rem;
    padding: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    align-items: center;
}

.content {
    max-width: 75%;
    padding: .5rem;
    margin: 1rem;
}

.content__intro {
    padding: 2rem;
}

.content__title {
    padding: .5rem;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.content__description {
    padding: .5rem;
    margin: 0;
    text-align: left;
    font-weight: 300;
}

.content__item {
    display: flex;
    padding: .5rem
    ;
}

.content__item--column {
    flex-direction: column;
}

.content__bottom {
    display: flex;
    flex-direction: column;
    margin: 0 1rem;
}

.btn--add {
    margin: 1rem;
}


/* MEDIA QUERIES */

@media (max-width: 1140px) {
    .home__container {
        grid-template-columns: 1fr;
    }
    
    .home__image {
        display: none;
    }
}

@media (max-width: 960px) {
    .desktop {
        display: none;
    }

    .header__container {
        justify-content: space-around;
    }
}

@media only screen and (min-width: 960px) {
    .mobile {
        display: none;
    }
}

@media (max-width: 870px) {
    .landing {
        flex-direction: column;
    }

    .landing__img {
        max-width: 35%;
        margin: 0 auto;
    }

    .landing__right {
        grid-template-columns: repeat(2, 1fr);
    }

    .card--landingbottom {
        grid-column: span 2;
        justify-self: center;
    }
}

@media (max-width: 650px) {
    html {
        font-size: 14px;
    }
    
    .navlist__link--logo {
        display: none;
    }

    .home__cards {
        grid-template-columns: 1fr;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination .btn {
    padding: 5px 10px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f4f4f4;
    color: #333;
}

.pagination .btn.active {
    font-weight: bold;
    background-color: #007bff;
    color: #ffffff;
    border-color: #007bff;
}