/*
w3 responsive templates
Social media: https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_templates_social&stacked=h
Dark portfolio: https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_templates_dark_portfolio&stacked=h
Clothing Store: https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_templates_clothing_store&stacked=h
 */

:root{
    --text:white;
    --text-secondary:#B000FF;
    --warning-text:#FC0000;
    --background-color:#00000;
    --background-color-two:#00F6FF;
    --five:#31FF00;
    --six:#FBFF00;
    font-family:'papyrus', sans-serif;
    --nav-font:'Cinzel';
    --heading-font:'Quattrocento';
    --text-font:'Lora';
}
/*fontt: Cinzel+Quottrocento+Lora https://www.canva.com/learn/the-ultimate-guide-to-font-pairing/*/

:root{
    --color-one:#3D4C77;
    --color-two:#73A2BF;
    --color-three:#E3CECD;
    --color-four:#86CBA7;
    --color-five:#4C898C;
}
/*
:root{
    --bar: var(--color-four);
    --bar-text: var(--color-one);
    --bar-highlight: var(--color-two);
    --body-background: var(--color-three);
    --body_text:var(--color-one);
    --body_secondary:var(--color-four);
    --body_secondary_text:var(--color-five);
    --available-color: lightgreen;
    --unavailable-color:lightgray;
    --accept-color: darkgreen;
    --reject-color: maroon;
    --tile-outline-color:slategray;
}
*/

{
    --parchment:#F5F4E0;
    --manuscript:#DECEAC;
    --antiquity:#D9B183;
    --leather: #B4906C;
    --oakwood: #4B2D23;
    --thesis: #350000;
}

:root {
    --bar-background:#731b07; /*#A8763E*/
    --bar-text:#1B1B1E;
    --bar-text-highlight:#F7F3E3;
    --body-background:#2B2118;
    --body-text-primary: #ECF0F1;
    --tile-background:#F7F3E3;
    --tile-hover-background:lightgray;
    --tile-outline:#595959;
    --tile-text-primary:#1B1B1E;
    --tile-text-highlight:#FAA916;
    --available-color:#ACC196;
    --unavailable-color: lightgray;
    --accept-color:#1D402F;
    --reject-color:#6F1A07;
    --pending-color:#BF4F26;
}


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

.grid-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr ;
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
    'navbar navbar navbar navbar navbar navbar'
    'left main main main main right'
    'footerbar footerbar footerbar footerbar footerbar footerbar';
    gap: 10px;
    background-color: var(--body-background);
}
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr; /* single column */
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas:
      "navbar"
      "left"
      "main"
      "right"
      "footerbar";
      gap: 5px;
  }
}

a:link, a:visited{
    color: var(--body-text-primary)
}

left {
    grid-area: left;
    flex: 1;
}
main {
    grid-area: main;
    color: var(--body-text-primary);
    flex: 1;
}
right {
    grid-area: right;
    flex: 1;
}

footerbar {
    grid-area: footerbar;
}

/* Footer */
.footer {
    background-color: var(--bar-background);
    display: flex;
    font-size: 1rem;
    padding: 1rem 2rem;
    justify-content: center;
    align-items: center;
}

.footer > div:first-child {
    color: var(--bar-text);
    font-size: 1rem;
}

.footer ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.footer ul li a {
    text-decoration: none;
    color: var(--bar-text);
    font-weight: 500;
    transition: color 0.3s;
}

.footer ul li a:hover {
    color: var(--bar-text-highlight); /* change color on hover */
}
/* End Footer */


/* Nav Bar */
nav {
    grid-area: navbar;
    top: 0;
    position: sticky;
    background-color: var(--bar-background);
    font-size: 1.5rem;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    /* for the logo */
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

nav .logo a{
    text-decoration: none;
}

nav .logo a:hover{
    color: var(--bar-text-highlight);
}

/* Nav items container */
nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

/* Nav links */
nav ul li a {
    text-decoration: none;
    color: var(--bar-text);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--bar-text-highlight); /* change color on hover */
}

/*Hamburger menu*/
.hamburger {
    display: none;
    cursor: pointer;
    width: 34px;
}

.hamburger .bar{
    flex-basis: 100%;
    height: 4px;
    background-color: #111;
    margin: 3px;
}

@media (max-width: 768px){
    nav {
        flex-wrap:wrap;
    }

    .hamburger {
        display: flex;
        flex-wrap: wrap;
    }

    .logo {
        height: 80px;
    }

    .nav-links {
        display:none;
        flex-basis: 100%;
        flex-wrap: wrap;
    }

    .nav-links li {
        flex-basis: 100%;
    }

    .nav-links a {
        text-align: left;
        font-size: 28px;
    }

    .nav-links a:hover {
       color: var(--bar-text-highlight);
    }

    .nav-links .nav-cta-button {
        padding: 30px 16px;
        margin-left: 0;
        border: none;
        border-radius: 0;
        margin-bottom: 20px;
    }

    nav-links .nav-cta-button:hover{
        background-color: var(--bar-text-highlight);
    }
}

/* End nav bar */

/* MODALS */
/* Generic modal background */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5); /* semi-transparent black */
}

/* Modal content box */
.modal-content {
    background-color: #fff;
    margin: 10% auto; /* vertically & horizontally centered */
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid #888;
}

/* Close button */
.modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.modal-close:hover {
    color: #000;
}

/* Show class to display modal */
.modal.show {
    display: block;
}

/* Optional: form styling inside modal */
.modal-content form {
    display: flex;
    flex-direction: column;
}

.modal-content form label {
    margin-top: 10px;
}

.modal-content form input {
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

.modal-content form button {
    margin-top: 15px;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-content form button:hover {
    background-color: #0056b3;
}

/* END MODALS*/

/*Search Bar*/
.search-bar{

}
/*END Search Bar*/

/* TABLES */
/* TODO: Update colors */
table {
    width:100%;
    background-color: white;
    border-collapse: collapse;
    font-family: Open;
}

tr {
    border-bottom: 1px solid grey;
    padding-top: 20px;
    padding-bottom: 20px;
}
tr:hover {
    background-color: var(--color-four);
}
tr:nth-child(even) {
    /*background-color: #D6EEEE;*/
}

th {
    text-align: left;
}

.table-button {
    background-color: var(--color-two);
    border: 1px solid grey;
    color: white;
    padding: 3px;
    text-decoration: none;
    border-radius: 5px;
}
/* END TABLE */

.tile {
    margin-bottom: 5px;
    margin-top: 5px;
    border-radius: 10px;
    border: 2px solid var(--tile-outline);
    padding: 10px;
    color: var(--tile-text-primary);
    background-color: var(--tile-background)
}

.tile-header {
    border-bottom: 2px solid var(--tile-outline);
}

.list-tile-item {
    border-bottom: 1px solid var(--tile-outline);
    display: flex;
    align-items: center;
}

.list-tile-item a{
    color: var(--tile-text-primary);
}

.list-tile-item a:hover{
    color: var(--tile-text-highlight);
}

.book-large {
    border-bottom: 1px solid var(--tile-outline);
    display: flex;
    align-items: center;
    padding:5px;
}
.checked-out {
    background-color: var(--unavailable-color);
}
.available {
    background-color: var(--available-color);
}
.book-button-container {
    padding-left:5px;
    margin-left: auto;
}
.book-button {
    background-color: var(--color-two);
    border: 1px solid grey;
    color: white;
    padding: 3px;
    text-decoration: none;
    border-radius: 5px;
}

.profile-banner {
    display: flex;
}

.profile-banner-image {
    flex:1;
}
.profile-banner-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

.profile-banner-details {
    flex:7;
    display:flex;
    flex-direction: column;
}

.profile-card {
    /*display: flex;*/
}

.profile-card-image {
    align-items: center;
    justify-items: center;
}

.profile-card-image img {
    width: auto;
    height: auto;
    max-width: 300px;
    display: block;
    /*align-self: center;*/
}

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

.button-view-profile{
    background-color: #4B2D23;
    color: var(--bar-text-highlight);
    padding-left: 10px;
    padding-right: 10px;
    text-decoration: none;
    border-radius: 5px;
    font-size: medium;
}

.request-buttons-container {
    padding-left:5px;
    margin-left: auto;
}
.button-accept {
    background-color: var(--accept-color);
    color: var(--bar-text-highlight);
    padding-left: 10px;
    padding-right: 10px;
    text-decoration: none;
    border-radius: 5px;
}
.button-reject {
    background-color: var(--reject-color);
    color: var(--bar-text-highlight);
    padding-left: 10px;
    padding-right: 10px;
    text-decoration: none;
    border-radius: 5px;
}

.clickable-div {
    /* Makes the anchor element a block, so it fills its container */
    display: block;
    /* Adds a visual cue that the element is interactive */
    cursor: pointer;
}

/* Optional: Add hover effect for better feedback */
.clickable-div:hover .inner-div{
    background-color: var(--tile-hover-background); /* Change background on hover */
}
