/* ==========================================================================
   Global & Layout
   ========================================================================== */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: black;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
}

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

#bodyContent {
    max-height: calc(100% - 55px);
    flex: 1;
    display: flex;
}

h1 {
    font-family: 'Times New Roman', Times, serif;
    font-size: 40px;
    margin-block-start: 0px;
    margin-block-end: 0px;
}

/* ==========================================================================
   Top Banner
   ========================================================================== */
#banner {
    height: 55px;
    flex-shrink: 0;
    background: black;
    border-bottom: 2px solid black;
    border-image: linear-gradient(to right, orange, red) 1;
    display: flex;
    align-items: center;
    color: white;
    font-size: 30px;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

#MenuDiv {
    display: none;
}

#MenuDiv img {
    width: 40px;
    height: 40px;
    display: block;
}

.RibbonButton {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    transition: 0.3s color ease, 0.3s color ease, 0.3s border ease;
}
.RibbonButton:hover {
    color: orange;
    border: linear;
}

#center {
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
}

#bannerContent {
    display: flex;
    justify-content: center;
}

#MenuDiv {
    display: flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    cursor: pointer;
    transition: 0.3s background ease;
}
#MenuDiv:hover {
    background-color: orange;
}

#MenuButton {
    height: auto;
    max-height: 100%;
    width: auto;
    display: block;
}

#menuToggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   Side Panel
   ========================================================================== */
#mapOptions {
    overflow-y: scroll;
    width: 0;
    height:auto;
    padding: 0;
    background-color: black;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: orange #111;
}
#mapOptions.open {
    width: auto;
    padding: 20px;
    border-right: 2px solid orange;
}

.OptionTitle {
    color: white;
    margin: 12px 0 8px;
    font-size: 1.1em;
}

.option {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mapOption {
    background: black;
    color: white;
    border: none;
    border-bottom: 2px solid black;
    border-image: linear-gradient(to right, orange, red) 1;
    flex: 1;
    font-size: 30px;
}

.OptionsSeperator {
    border: none;
    border-top: 2px solid black;
    margin: 12px 0;
}

/* Speed buttons */
.Aligner {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 8px;
}

.SpeedButtons {
    position: relative;
    flex: 1;
    height: 36px;
    background: linear-gradient(to right, orange, red);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    z-index: 0;
}
.SpeedButtons::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: black;
    z-index: -1;
}
.SpeedButtons.active {
    background: linear-gradient(to right, orange, red);
    color: black;
}
.SpeedButtons.active::after {
    background: linear-gradient(to right, orange, red);
    color: black;
}

#OptionsBox {
    width: 300px;
    position: relative;
    background: linear-gradient(to right, orange,red);
    padding: 10px;
    border: none;
    z-index: 0;
}
#OptionsBox::after {
    content: "";
    position: absolute;
    inset: 2px;
    background-color: black;
    z-index: -1;
}

#timeBox {
    font-size: 40px;
}

/* ==========================================================================
   Map
   ========================================================================== */
#map {
    position: relative;
    flex: 1;
    overflow: hidden;
    cursor: pointer;
    height: auto;
}

#mapMarker {
    transform: translateY(-13px);
}

/* ==========================================================================
   Bottom Floating Interface (Undo / Distance / Redo)
   ========================================================================== */
#mapInterface {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    z-index: 10;

    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 16px;
    background: linear-gradient(to right, orange, red);
    border-radius: 50px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}
#mapInterface::after {
    position: absolute;
    inset: 2px;
    border-radius: 50px;
    background-color: black;
    content: "";
    z-index:-1;
    border-radius: 50px;
}

.mapButton {
    position: relative;
    background: linear-gradient(to right, orange,red);
    color: white;
    padding: 12px 30px; /* adjust as needed */
    border-radius: 30px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    border: none;
    z-index: 0; /* important for the pseudo-element stacking */
}
/* This creates the thick colorful border */
.mapButton::after {
    content: "";
    position: absolute;
    inset: 2px; /* controls border thickness - increase for thicker */
    background-color: black;
    border-radius: 34px; /* slightly more than the button itself */
    z-index: -1;
}
/* Optional: nice hover effect (lift + slight scale) */
.mapButton:hover {
    transform: translateY(-3px);
    transition: transform 0.2s ease;
}
.mapButton:active {
    transform: translateY(0px);
    transition: transform 0s;
}

#distanceBoxContainer {
    flex: 1;
    width: 100px;
}

.mapDisplay {
    color: white;
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 48px;
    line-height: 1;
    white-space: nowrap;
}

/* Special ID for distance (so JS can update it cleanly) */
#distanceBox {
    font-size: 50px;
    margin: 0 8px;
}

#shareButton {
    width: auto;
    height: auto;
    background: linear-gradient(to right, orange, red);
    border-radius: 20px;
    position: absolute;
    z-index: 10;
    padding: 10px;
    left: 20px;
    bottom: 20px;
    transition: border-radius 0.2s ease-out;
}
#shareButton img {
    transform: translateY(-3px);
}
#shareButton::after {
    position: absolute;
    z-index: -1;
    inset: 2px;
    background-color: black;
    content: "";
    border-radius: 20px;
    transition: border-radius 0.2s ease-out;
}
#shareButton:hover {
    border-radius: 50px;
}
#shareButton:hover::after {
    border-radius: 50px;
}
#shareButton:active::after {
    inset: 4px;
}

#shareBox {
    max-width: 400px;
    visibility: hidden;
    color: white;
    background: linear-gradient(to right, orange, red);
    border-radius: 20px;
    position: absolute;
    z-index: 10;
    padding: 10px;
    left: 20px;
    bottom: 110px;
    transition: border-radius 0.2s ease-out;
}
#shareBox::after {
    font-size: 30px;
    position: absolute;
    z-index: -1;
    inset: 2px;
    background-color: black;
    content: "";
    border-radius: 20px;
    transition: border-radius 0.2s ease-out;
}

#settingsButton {
    width: auto;
    height: auto;
    background: linear-gradient(to right, orange, red);
    border-radius: 20px;
    position: absolute;
    z-index: 10;
    padding: 10px;
    left: 20px;
    top: 20px;
    transition: border-radius 0.2s ease-out;
}
#settingsButton::after {
    position: absolute;
    z-index: -1;
    inset: 2px;
    background-color: black;
    content: "";
    border-radius: 20px;
    transition: border-radius 0.2s ease-out;
}
#settingsButton img {
    height: auto;
}
#settingsButton img:hover {
    transition: rotate 0.3s ease-out;
    rotate: 90deg;
}
#settingsButton:hover {
    border-radius: 50px;
}
#settingsButton:hover::after {
    border-radius: 50px;
}
#settingsButton:active::after {
    inset: 4px;
}

.closeButton {
    position: absolute;
    top: 5px;
    right: 5px;
    justify-self: center;
    color: white;
    font-size: 15px;
    background: none;
    border: none;
}
.closeButton:hover {
    color: orange;
}

#shareLink {
    background: black;
    color: white;

}

#URLShare {
    background: black;
    color: white;
    border: none;
    border-bottom: 2px solid black;
    border-image: linear-gradient(to right, orange, red) 1;
    font-size: 15px;
    width: 300px;
}

#searchBox {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to right, orange, red);
    border-radius: 10px;
    padding: 10px;
    z-index: 11;
}
#searchBox::after {
    position: absolute;
    inset: 2px;
    background-color: black;
    content: "";
    z-index: -1;
    border-radius: 10px;
}

#searchInput {
    width: 500px;
}

/*     About page exclusive      */

.Articles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 20px;
    overflow-y: scroll;
}
.SuggestionsInputBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 20px;
}

article {
    width: 100%;
    max-width: 800px;
    min-width: unset;
    position: relative;
    background: black;
    color: white;
    border: 2px solid transparent;
    border-image: linear-gradient(to right, orange, red) 1;
    border-radius: 12px;
    padding: 20px;
    box-sizing: border-box;
}

h3 {
    padding-top: 0px;
    padding-bottom: 0px;
    margin: 0px;
    color: orange;
    font-size: 32px;
    font-family:'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
}

h4 {
    margin: 0px;
    padding-bottom: 10px;
    color: grey;
    font-size: 15px;
}

/*        Suggestions Exclusive         */

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.formContent {
    color: white;
    font-size: large;
    flex: 1;
    background: black;
    border: none;
    border-bottom: 2px black solid;
    border-image: linear-gradient(to right, orange, red) 1;
    width: 50%;
    align-self: left;
}

#confirmation {
    font-size: larger;
    font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    justify-self: center;
}

.formContentTextBox {
    color: white;
    flex: 1;
    background: black;
    border: none;
    border-bottom: 2px black solid;
    border-image: linear-gradient(to right, orange, red) 1;
    min-height: 400px;
    width: 100%;
    resize: vertical;
}

#suggestionSubmit {
    margin-top: 10px;
    align-self: center;
    flex: 0;
    padding: 10px;
    background-image: linear-gradient(to right, orange, red);
    color: white;
    border: none;
    flex: 0;
}
#suggestionSubmit::after {
    background: black;
    border: none;
    inset: 2px;
    z-index: -1;
    content: "";
}

/*   Smaller Screens   */




@media (max-width: 1050px) {

#bannerContent {
    justify-content: center;
    flex-direction: row;
}

#menuToggle {
    top:10px;
    display: block;
    width: 55px;
    height: 55px;
    transition: background 0.3s ease;
}
#menuToggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
#menuToggle:hover {
    background: orange;
}

#banner {
    display: block;
}

#mobileDropdown {
    border-top: 2px solid black;
    border-image: linear-gradient(to right, orange,red);
    flex: 1;
    display: none;
    background: black;
    border-bottom: 2px black solid;
    border-image: linear-gradient(to right, orange, red) 1;
    justify-content: center;
    z-index: 13;
}
#mobileDropdown.open {
    display: flex;
    flex-direction: column;
}

nav {
    display:flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.RibbonButton {
    padding: 5px;
}

#mapOptions {
    overflow-y: hidden;
    overflow-x: scroll;
    display: none;
    flex-direction: row;
}
#mapOptions.open {
    border-right: none;
    border-bottom: 2px black solid;
    border-image: linear-gradient(to right, orange, red) 1;
    display: flex;
}

#bodyContent {
    flex-direction: column;
}

#shareButton {
    bottom: unset;
    top: 20px;
    left: 100px;
}

#shareBox {
    left: 50%;
    transform: translateX(-50%);
}
}

@media (max-width: 860px) {
    #center {
        right: 10px;
        transform: none;
        left: auto;
    }

#searchBox {
    left: 0px;
    transform: none;
    right: 50px;
}
#searchInput {
    width: 100%;
}

#settingsButton {
    top: 70px;
    padding: 6px;
    left: 5px;
}
#settingsButton img {
    width: 30px;
}

#shareButton {
    top: 70px;
    left: 60px;
    padding: 6px;
}
#shareButton img {
    width: 30px;
}

#distanceBox {
    font-size: 30px;
}

.mapButton {
    padding: 6px 15px;
}

}