:root {
    --black: #000;
    --white: #FFF;
    --secondary: #E4E4E4;
    --secondary-light: #fcfcfc;
    --secondary-dark: #c5c5c5;
    --tretairy-dark: #9b9b9b;
    --surface: #FAFAFA;
    --surface: #f1f1f1;

    /* Amount of days in roadmap. 360 equals a year */
    --grid-days: 1080;

    /* Categories and grid rows */
    --label-grid-rows: repeat(3, 343px);
    --timeline-grid-rows: repeat(47, 24px);

    /* 24 months across 2 years, each month is 150px in width */
    --header-grid-columns: 150px repeat(47, 150px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    font-family: Arial, sans-serif;
    font-size: 12px;
    overflow-x: hidden;
}

.content {
    display: flex;
    margin-top: 0;
}

.content-header {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content:space-between;
    background-color: #000;
}

.title {
    display: flex;
    align-self: center;
    margin: auto;
    color: var(--white);
    justify-content: center;
    font-size: 22px;
    background: var(--black);
}

.title picture {
    margin: 10px;
}

.backlog-container {
    width: 25%;
    max-width: 330px;
    float: left;
    padding: 20px;
    border: 1px var(--secondary) solid;
    font-size: 14px;
    transition: 0.3s ease-in-out;
    height: 100vh;
}

.backlog-container h2 {
    width: 100%;
    text-align: center;
    margin: 30px 0;
    font-size: 19px;
}

.backlog-item {
    padding: 10px;
    border-top: 1px var(--secondary) solid;
    -moz-transition: height 0.2s ease;
    -webkit-transition: height 0.2s ease;
    -o-transition: height 0.2s ease;
    transition: height 0.2s ease;
    cursor: pointer;
    text-overflow: ellipsis;
    overflow: hidden;
    text-wrap: nowrap;
    width: 100%;

}

.backlog-header {
    display: flex;
    font-size: 16px;
}

.backlog-header-text {
    overflow: hidden;
    text-wrap: wrap;
    width: 350px;
    padding-right: 10px;
}

.backlog-list {
    overflow: auto;
    margin: auto;
    scrollbar-width: thin;
    max-height: 700px;
    flex-direction: column;
    gap: 10px
}

.backlog-content {
    margin-top: 10px;
    font-size: 16px;
    padding: 0px;
    border-radius: 6px;
    color: var(--tretairy-dark);
    overflow: hidden;
    -moz-transition: height 0.2s ease;
    -webkit-transition: height 0.2s ease;
    -o-transition: height 0.2s ease;
    transition: height 0.2s ease;
    text-wrap: wrap;
}

.backlog-item:hover {
    border: 1px var(--secondary) solid;
}

.backlog-arrow {
    font-size: 18px;
    height: 10px;
    text-align: end;
    align-self: flex-end;
    margin: auto;
    margin-right: 0;
}

.roadmap-title {
    display: flex;
    justify-items: center;
    justify-content: center;
    margin-top: 40px;
    padding-left: 20px;
    font-size: 36px;
}

.roadmap-container {
    display: flex;
    height: 100vh;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.header {
    position: relative;
    background-color: var(--white);
    padding-left: 150px;
    top: 20px;
    z-index: 3;
    display: grid;
    grid-template-columns: var(--header-grid-columns);
    grid-template-rows: repeat(3, 25px);
}

.year-row, .quarter-row, .month-row {
    display: contents;
}

.year,
.quarter,
.month {
    text-align: center;
    font-weight: bold;
    padding: 5px;
    border-left: 1px solid var(--secondary);
    border-right: 1px solid var(--secondary);
    background-color: var(--secondary-light);
    border-bottom: 1px solid #ddd;
}

.year {
    padding: 10px;
    border-bottom: 1px solid var(--secondary);
}

.labels {
    display: grid;
    grid-template-rows: var(--label-grid-rows);
    grid-template-columns: 150px;
    gap: 5px 0;
    position: sticky;
    left: 0;
    background-color: var(--white);
    z-index: 2; 
}

.label {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--secondary-dark);
    background-color: var(--white);
}

.roadmap-content {
    display: flex;
    overflow-x: auto;
    width: 100%;
}

.timeline {
    display: grid;
    min-width: fit-content;
    gap: 5px;
    grid-template-rows: var(--timeline-grid-rows);
}

.horizontal-line-container {
    display: grid;
    gap: 5px 0;
    grid-template-rows: var(--timeline-grid-rows);
    z-index: -1;
}

.timeline-horizontal-line {
    grid-column: 1 / var(--grid-days);
    border-bottom: 1px var(--secondary) dashed;
}

.horizontal-line1 {
    grid-row: 12;
}

.horizontal-line2 {
    grid-row: 24;
}

.line-year {
    /* grid-column: 360; */
    border-right: 2px var(--secondary-dark) solid;
}

.fase-item,
.sprint-item,
.connection-item {
    border: 1px solid #ddd;
    font-size: 13px;
    text-align: center;
    padding: 4px;
    background-color: #f9f9f9;
    margin: 1px 0px;
    border-radius: 6px;
    z-index: 1;
    cursor: pointer;
    transition: 1;
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden; 
    height: 25px;
}

.connection-item {
    background: #80008060;
}

.fase-container, .sprint-container, .connection-container {
    display: grid;
    gap: 5px 0;
}

.fase-container {
    grid-row: 2
}

.sprint-container {
    grid-row: 13
}

.connection-container {
    grid-row: 25
}

.line-container {
    display: grid;
    gap: 5px 0;
    grid-template-rows: var(--timeline-grid-rows);
    z-index: -1;
}

.vertical-line {
    border-right: 1px solid var(--secondary);
    grid-row: 2 / 37;
}

.popup-container {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 9999;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
}

.popup-shadow {
    position: fixed;
    width: 100%;
    height: 100%;
    background: hsla(0, 0%, 0%, 0.50);
    top: 0;
    z-index: 2;
    left: 0;
    animation: fadeInAnimation 0.3s;
}

.popup {
    background: var(--white);
    animation: fadeInAnimationPopup 0.3s;
    width: 800px;
    height: 600px;
    margin: auto;
    border-radius: 8px;
    z-index: 4;
    box-shadow: 4px 4px 6px #00000040;
}

.popup-header {
    background: var(--black);
    padding: 20px;
    color: var(--white);
    font-weight: bold;
    font-size: 20px;
    border-radius: 8px 8px 0 0;
    width: 100%;
    display: flex;
}

.popup-date {
    align-self: flex-end;
    margin-left: auto;
    font-size: 16px;
    padding: 5px;
    border-radius: 6px;
    font-weight: normal;
}

.popup-close {
    margin: 0 0 0 20px;
    font-size: 25px;
    font-weight: normal;
    cursor: pointer;
    text-align: end;
}

.popup-content {
    margin-top: 40px;
    padding: 20px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 68%;
}

.popup-content-text {
    justify-content: center;
    padding-right: 20px;
}

.popup-sprint-container {
    width: 50%;
    margin: 0 auto;
} 

.popup-sprint-list {
    overflow-y: auto;
    margin: auto;
    height: 90%;
}

.popup-sprint-container-text {
    margin-bottom: 10px;
    font-weight: bold;
}

.popup-sprint {
    display: flex;
    padding: 5px;
    margin: 5px;
    border: 1px var(--secondary) solid;
    border-radius: 6px;
    color: #474747;
    cursor: pointer;
    transition: 0.2s;
    text-overflow: ellipsis;
    overflow: hidden;
    text-wrap: nowrap;
}

.popup-sprint-text {
    width: 318px;
    text-overflow: ellipsis;
    overflow: hidden;
}

.popup-sprint:hover {
    transform: scale(1.02);
}

.popup-sprint-date {
    font-size: 12px;
    color: #a5a5a5;
}

.popup-sprint-description {
    overflow: hidden;
    text-wrap: wrap;
    margin: 5px;
    font-size: 14px;
    margin-top: 5px;
    width: 310px;
    height: 0;
    transition: height 0.2s ease;
}

.popup-sprint-arrow {
    font-size: 20px;
    height: 10px;
    margin-top: 17px;
}

.popup-sprint-content {
    text-wrap: nowrap;
}

.progress-bar-container {
    margin: 25px;
    padding: 2px;
    border: 1px var(--secondary) solid;
    border-radius: 6px;
    background-color: var(--surface);
    display: flex;
}

button{
    color:white;
  }
  .backlog-menu-button {
      position: relative;
      margin-right: -.625rem;
      border-width: 0px;
      background-color: transparent;
      padding: 0;
  }
  .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0,0,0,0);
      white-space: nowrap;
      border-width: 0;
  }
  .backlog-menu-button .ham {
      -webkit-tap-highlight-color: transparent;
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
  }
  .backlog-menu-button .ham {
      height: 60px;
      width: 60px;
      cursor: pointer;
      transition-duration: .3s;
  }
  .backlog-menu-button .ham .top {
      stroke-dasharray: 40 160;
  }
  .backlog-menu-button .ham .middle {
      transform-origin: 50%;
      stroke-dasharray: 40 142;
  }
  .backlog-menu-button .ham .bottom {
      transform-origin: 50%;
      stroke-dasharray: 40 85;
  }
  .backlog-menu-button .line {
      fill: none;
      stroke: white;
      stroke-width: 5;
      transition-duration: .3s;
      stroke-linecap: round;
  }
  .backlog-menu-button.active svg {
      --tw-rotate: 45deg;
      transform: rotate(var(--tw-rotate));
  }
  .backlog-menu-button.active svg .top {
      stroke-dashoffset: -64px;
  }
  .backlog-menu-button.active svg .middle {
      --tw-rotate: 90deg;
      transform: rotate(var(--tw-rotate));
  }
  .backlog-menu-button.active svg .bottom {
      stroke-dashoffset: -64px;
  }

.progress-bar {
    vertical-align: middle;
    height: 25px;
    background: #04AA6D;
    border-radius: 6px;
    color: #fff;
    text-align: center;
    padding-top: 5px;
    text-shadow: 1px 1px 1px #00000080;
    text-wrap: nowrap;
}

@keyframes fadeInAnimation {
    from { background: #00000000; }
    to { background: #00000080; }
}

@keyframes fadeInAnimationPopup {
    from { opacity: 0; }
    to { opacity: 1; } 
}

/* Custom Scrollbar Styling */
.roadmap-content::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.roadmap-content::-webkit-scrollbar-track,
.popup-sprint-list::-webkit-scrollbar-track {
    background-color: var(--secondary-light);
    border-radius: 10px;
}

.roadmap-content::-webkit-scrollbar-thumb,
.popup-sprint-list::-webkit-scrollbar-thumb {
    background-color: var(--secondary-dark);
    border-radius: 10px;
    border: 2px solid var(--secondary-light);
}

.roadmap-content::-webkit-scrollbar-thumb:hover,
.popup-sprint-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary);
}

.roadmap-content::-webkit-scrollbar-corner,
.popup-sprint-list::-webkit-scrollbar-corner {
    background-color: var(--secondary);
}

/* Firefox scrollbar styling */
.roadmap-content, 
.popup-sprint-list {
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-dark) var(--secondary-light);
}
.backlog-menu-bar {
    display: none;
}

@media (max-width: 1080px) { 
    .backlog-container {
        width: 0%;
        padding: 0;
    }

    .backlog-menu-bar button {
        color: white;
        width: 50px;
        height: 50px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

    .backlog-item {
        width: 320px;
    }

    .backlog-menu-bar {
        display: flex;
        justify-content: flex-start;
        padding: 10px;
        z-index: 1000;
    }

    /* Display backlog content when button clicked */
    .backlog-container.active {
        width: 100%;
        background-color: #f8f8f8;
    }

    .popup {
        min-height: 500px;
    }

    .popup-content {
        display: block;
    }

    .popup-sprint {
        text-wrap: unset;

    }

    .sprint-item {
        text-wrap: unset;
    }

    .popup-sprint-content {
        text-wrap: unset;
    }

    .popup-sprint-text {
        width: unset;
        max-height: 300px;
        scrollbar-width: thin;
    }

    .popup-sprint-description {
        width: unset;
    }

    .popup-sprint-container {
        width: 80%;
        overflow: hidden;
        margin-top: 20px;
        height: 200px;
    }
}

/* Media Query for Small Screens */
@media (max-width: 768px) {
    .labels {
        grid-template-columns: auto;
    }
}