/** ========================================================================= */
/** Stylesheet for both index.html and resources.html                         */
/** Created by Jia Hao Choo, Runyi Li & Saning Zhang                          */
/** for GGR472 TDSB Active Travel Sandbox Project (Winter 2024)               */
/** ========================================================================= */

/* General styling for body */
body {
  /** make the body take up the entire viewport */
  height: 100vh;
  width: 100vw;

  /** styling for the instruction note in the welcome modal */
  #welcomeModal {
    #note {
      font-style: italic;
      font-size: small;
    }
  }

  /** styling for emphasis elements */
  em {
    font-style: italic;
    font-weight: bold;
  }

  /* styling for the navbar */
  .navbar {
    width: 100%;
    min-height: 7%; /* min height is 7% of the viewport height, the rest is for the main body */
    height: fit-content; /* allow for the navbar to scale to fit content */

    #modal-button {
      margin-right: 15px;
      font-size: x-large;
      cursor: pointer;
    }
  }

  /* styling for the main content section (below navbar) in index.html page*/
  #main {
    height: 93%; /* 93% of the viewport height - the rest for the navbar */
    width: 100%;
    position: relative;
    margin: 0;

    /* styling for the sidebar */
    #sidebar {
      padding-right: 10px;
      padding-left: 10px;
      padding-top: 10px;

      /* styling for the close sidebar button container */
      #close-sidebar-button {
        width: 100%;
        padding-right: 5px;
        text-align: right;
        margin-bottom: 10px;
        font-size: x-large;
        cursor: pointer;
      }

      /* styling for sidebar items */
      .sidebar-item {
        background-color: lightblue;
        margin-bottom: 12px;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        border-radius: 5px;
        /* make sure that sidebar always has the same minimum height, but can scale to fit content */
        min-height: 50px;
        height: fit-content;

        /** styling for individual components inside the sidebar item */
        div {
          display: flex;
          align-items: center; /* make sure that they are all vertically centered */
          font-size: 100%;
        }

        /** styling for icons in sidebar */
        i {
          cursor: pointer; /* indicate that the icon is clickable */
        }
      }

      /* styling for the walking bus indicator in sidebar*/
      #walking-bus-indicator {
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
        font-weight: bold;

        /** styling for the star icon */
        i {
          color: gold;
        }
      }

      /** styling for sidebar items with hidden class attribute */
      .hidden {
        /* make sure that they are hidden, overriding any default display mode*/
        display: none !important;
      }
    }

    /** styling for the map content section */
    #map-content {
      padding-left: 0;
      padding-right: 0;
      /* Use relative positioning to allow absolute positioning of legend 
      relative to where the map content is*/
      position: relative;

      /* styling for the map container */
      .map-container {
        width: 100%;
        height: 100%;
      }

      /* styling for open sidebar button */
      #open-sidebar-button {
        position: absolute;
        top: 10px;
        left: 20px;
        z-index: 3; /* make sure that the button is on top of everything */
        cursor: pointer;
        width: fit-content;
        font-size: x-large;
        display: none; /* by default, hide the open sidebar button */
      }

      /* styling for the focus indicator containr */
      #school-focus-indicator-container {
        display: none;
        position: absolute;
        top: 10px;
        width: 100%;
        z-index: 2;

        /* styling for the indicator content that should be
        centred in the #school-focus-indicator-container section*/
        #indicator-content {
          position: relative;
          margin: auto;
          width: fit-content;
          max-width: 90%;
          padding: 2px 5px;
          border-radius: 5px;
          color: white;
          background-color: rgba(0, 0, 0, 0.75);
          text-align: center;
        }

        /* styling for the close button */
        #focus-close-button {
          margin-left: 5px;
          cursor: pointer;
        }
      }

      /* Styling for legend container*/
      .legend-container {
        /** background color for legend */
        background-color: #ffffff;
        /** overlap legend on top of map */
        z-index: 2;
        /* absolute positioning relative to main content */
        position: absolute;
        bottom: 50px;
        left: 20px;
        /** padding inside legend container */
        padding: 10px;
        /** border for legend container */
        border: 1px solid #000000;
        border-radius: 5px;
        /** by default, hide the legend */
        display: none;
      }
    }
  }

  /* styling for the resource content section (below navbar) in resources.html page*/
  #resource {
    position: relative;
    margin: 0;
    height: 93%; /* 93% of the viewport height - the rest for the navbar */
    padding-top: 20px;
    color: dimgray;
    padding-left: 40px;
    padding-right: 40px;

    .italicized {
      font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
      /* font-weight: bold; */
      font-style: italic;
      color: dimgray;
      padding-bottom: 10px;
      font-size: large;
    }

    .paragraph {
      color: black;
      font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS',
        sans-serif;
      font-size: large;
    }
  }

  /* styling for the instructions modal content */
  .modal-body {
    padding-left: 30px;
    padding-right: 30px;
    font-family: Arial, Helvetica, sans-serif;
  }

  /* styling for the buffer controls container */
  #school-buffer-controls {
    display: none;
    position: absolute;
    top: 39px;
    width: 100%;
    z-index: 2;

    /* styling for the buffer controls container */
    #controls-container {
      position: relative;
      margin: auto;
      width: fit-content;
      padding: 2px 5px;
      border-radius: 5px;
      color: white;
      background-color: rgba(0, 0, 0, 0.75);
      text-align: center;
      display: flex;
      flex-direction: row;

      /* styling for the buffer controls elements */
      .controls {
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        margin: 0 10px;

        /* styling for the buffer distance sliders */
        .sliders {
          width: 100%;
        }

        /* styling for buffer toggles */
        .toggles {
          display: inline-block; /* make sure that the toggles are in line with the labels */
          margin: 0 10px;

          /* styling for the buffer toggle labels */
          p {
            display: inline;
          }

          /* styling for the buffer toggle switches */
          #cycle-buffer-icon {
            color: #a4e2ec;
            opacity: 0.75;
          }
          #walk-buffer-icon {
            color: #ff8e9a;
            opacity: 0.75;
          }
        }
      }
    }
  }
}
