/* Navbar design */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    font-size: 18pt;
    font-family: Arial, sans-serif;
    overflow: hidden;
    flex-direction: column;
}

.background {
    width: 100%;
    height: 100%;
    position: fixed;
    background-image: url("../assets/images/blueWaveBackground.jpeg");
    background-size: cover;
    filter: blur(10px);
    transform: scale(1.1);
    z-index: -1;
}

.dashboard {
    width: 90%;
    height: 90%;
    margin: 2% 5% 0% 5%;
    flex-wrap: wrap;
    background-color: rgb(12, 26, 54, 0.5);
  }
  
  /* dashboard CSS */
  a {
    text-decoration: none;
    color: inherit;
  }

.dashboard {
    width: 90%;
    height: 11em;
    margin: 2% 5% 0% 5%;
    flex-wrap: wrap;
    background-color: rgb(12, 26, 54, 0.5);
  }

.main-navbar {
    height: 4em;
    width: 100%;
    display: flex;
    font-size: 18pt;
}

.widgets {
    width: 70%;
    height: 100%;
    display: flex;
    color: white;
    align-items: center;
    padding-left: 20px;
    justify-content: space-around;
}

.nav-icon {
    margin-right: 10px;
}

.logo {
    width: 30%;
    display: flex;
    justify-content: end;
    align-items: center;
}

#team-logo > img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
}

#search-bar {
    background-color: #7ab4bd;
    color: black;
    width: 20vw;
    height: 2em;

    text-align: center;
    border-radius: 1em;
}

#search-bar::placeholder {
    color: rgb(33, 32, 32);
    font-style: italic;
}

/* Grid outline */
#journal-app {
    width: 100%;
    max-width: 14in;
    margin: 20px auto;
    padding: 20px;
    background-color:rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-gap: 20px;
    justify-items: center;
    align-items: center;
    overflow-y: auto;
}

/* Add Journal Button */
.add-journal {
    background-color: #7ab4bd;
    padding: 5px 10px;
    height: 150px;
    width: 150px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 1em;
}

/* The journal(s) displayed on the page */
.journal-widget {
    display: grid;
    box-sizing: border-box;
    width: 250px;
    height: 250px;
    border-radius: 1em;
    background: lightblue;
    align-items: center;
    text-align: center;
    user-select: none;
}

.journal-widget-title {
    max-width: 250px;
    word-wrap: break-word;
}

/* A fixed div position that is fixed to the center of page for the journal content below */
#modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 0.5vw;
    border-radius: 1vw;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Add the following CSS for the dropdown menu */
#team-logo {
    position: relative;
    display: inline-block;
  }
  
  .dropdown-content {
    display: none;
    position: absolute;
    background-color: #74CBDF;
    min-width: 100px; /* Adjusted the minimum width */
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    right: 0; /* Ensure the dropdown is contained within the page */
  }
  
  .dropdown-content a {
    color: black;
    padding: 8px 12px; /* Adjusted padding to make it smaller */
    text-decoration: none;
    display: block;
    font-size: 14px; /* Adjusted font size to make it smaller */
  }
  
  .dropdown-content a:hover {
    background-color: #49727B;
  }
  
  #team-logo:hover .dropdown-content {
    display: block;
  }
/* The "popup" of that particular journal */
.journal-entry {
    width: 14in;
    height: 6in;
    
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* The input box to type markdown */
.journal-entry textarea.journal-markdownInput {
    border: 1px solid red;
    background-color: #f0f0f0;
    resize: none; /* Prevents textarea from being resized */
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;

    width: 40%;
    height: 80%;
    margin: 20px;
    padding: 10px 10px 10px 10px;
    overflow-y: auto;
    position: relative;
}

#markdown-title, #preview-title {
    margin-bottom: 20px;
}

/* The live preview of the markdown to formatted html box*/
.journal-entry div.journal-htmlOutput {
    border: 1px solid green;
    background-color: #f0f0f0;
    word-wrap: break-word;

    width: 40%;
    height: 80%;
    margin: 20px;
    padding: 10px 10px 10px 10px;
    overflow-y: auto;
    position: relative;
}

/* Elements within the html box */
.journal-htmlOutput * {
    margin-top: 0%;
    margin-bottom: 2%;
}

/* Makes it so what is not in focus is 'darkened' or 'grayed' out */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Container for edit/delete buttons */
.button-container {
    position: center;
    margin-top: 60px;
    right: 60px;
    display: flex;
    justify-content: center;
    gap: 50px;
}

/* Blend buttons to background */
.button-container button {
    background-color: lightblue;
    outline: none;
    border: none;
}

/* Edit button */
.edit-button {
    font-size: 12px;
    padding: 5px 10px;
    margin-right: 5px;  /* Space between buttons */
}

/* Delete button */
.delete-button {
    font-size: 12px;
    padding: 5px 10px;
}

/* Container for save/cancel buttons */
.save-cancel-container {
    display: flex;
    justify-content: space-around;

    position: relative;
    bottom: 2.5vh
}

/* Save/Cancel Buttons */
.save-button, .cancel-button {
    padding: 5px 10px;
    cursor: pointer;

    background-color: lightblue;
    outline: none;
    border: none;

    border-radius: 10px;

    width: 8em;
    height: 2em;
    font-size: 1em;
    position: relative;
}

.save-button {
    left: 1em;
}

.cancel-button {
    right: 1em;
}

#subtitles {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;

    position: relative;
    top: 6vh;
    font-size: 4vh;
}

#markdown-title {
    position: relative;
    left: 2vw;
}

#preview-title {
    position: relative;
    right: 3vw;
}

#date-display {
    position: relative;
    text-align: end;
}

/* Style for the loading screen */
.loading-screen {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 2em;
    text-align: center;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}