.results-wrap {
    display: flex;
    padding: 35px;
    max-height: 100vh;
}

.results-left {
    padding: 24px;
    min-width: 500px;
    display: flex;
    flex-direction: column;
}

#ad-container {
    width: 100%;
    margin-top: 1vh;
}

.results-right {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 60vw;
    max-height: 79vh;
}

.photoContainer {
    height: 81.4vh;
    align-self: stretch;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    overflow: hidden;
}

.photoContainer .results-blur-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.6;
    filter: blur(50px);
    transform: scale(1.2); 
}

.photoContainer .results-img-top {
    padding: 10px;
    position: relative;
    max-height: 75vh;
    max-width: 50vw;
    z-index: 2;
}

.yearContainer {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

#licenseText {
    font-size: 15px;
}

#description {
    font-size: 28px;
    color: var(--accent);
    line-height: 100%;
}

#textYear {
    background-color: var(--accent);
    color: white;
    line-height: 100%;
    padding-left: 12px;
    padding: 10px 10px;
    font-weight: 600;
    font-size: 35px;
}

#description2 {
    font-size: 28px;
    margin-left: 10px;
}

.googleMapDefault {
    margin: 15px 0px;
    height: calc(100% - 80px);
    width: 100%;
}

#mapResults {
    flex: 1;

}

.results-bottom {
    display: flex;
    align-items: center;
    padding: 0px 15px;
}

#scores {
    display: flex;
    align-items: center;
    margin-top: 30px;
}

#locationScore,
#yearScore,
#total {
    display: flex;
    flex-direction: column;

}


.distanceFromText {
    font-size: 31px;
    line-height: 100%;
}
.distanceFromText span {
    color: var(--accent);
}

.score-container {
    display: flex;
    align-items: flex-end;
    margin-right: 30px;
}

.scoretext {
    background-color: var(--accent);
    color: white;
    line-height: 100%;
    padding-left: 12px;
    padding: 10px 10px;
    font-weight: 600;
    font-size: 35px;
    min-width: 100px;
    text-align: center;
}

#nextRound {
    margin-top: auto;
    margin-left: auto;
    padding: 12px 16px;
    min-width: 130px;
    text-align: center;
    border: 2px solid var(--accent);
    background-color: var(--body);
    box-shadow: 0px 0px 10px var(--accent);
}

#bottomText {
    font-weight: 600;
    font-size: 30px;
    line-height: 35px;
}

#bottomPadding {
    position: fixed;
    bottom: 0;
    left: 0;
}

#topPadding {
    width: 100vw;
    height: 100px;
    background-color: #d7d5c9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #77766f;
}

@media (max-width: 20em),
screen and (orientation: portrait) {
    body {
        overflow: auto;
    }
    .results-wrap {
        flex-direction: column;
    }
    .results-left, .results-right {
        width: 100%;
    }
    .photoContainer .results-img-top {
        max-height: 50vh;
        max-width: 80vw;
    }
    .results-left {
        padding-top: 10px;
    }
    .results-right {
        max-height: 41vh;
    }
    .googleMapDefault {
        height: 500px;
    }
    .photoContainer {
        height: 60vh;
    }
    .results-right {
        max-width: 100vw;
    }
    .results-bottom {
        flex-direction: column;
        align-items: center;
        justify-items: center;
    }
    #bottomText {
        font-weight: 600;
    font-size: 25px;
    line-height: 32px;
    }
    
    #nextRound {
        margin-top: 20px;
        margin-left: 0px;
        font-size: 35px;
        margin-bottom: 50px;
    }
}

/* Street View toggle */
/* Base: hide both buttons and the iframe area by default */
.sv-btn {
    position: absolute;
    z-index: 4;
    top: 12px;
    right: 12px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    background: rgba(0, 0, 0, 0.6);   /* transparent black */
    color: #fff;                      /* white text */
    cursor: pointer;
    display: none;
    opacity: 0.95;
}

.sv-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 40%, white), 0 0 10px var(--accent);
}

.sv-open { right: 12px; }
.sv-close { right: 12px; }

/* The Street View container is DISPLAY:NONE by default */
.sv-frame-wrap {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    opacity: 0;
    transition: opacity 180ms ease-in-out;
}
.sv-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* When SV is shown, hide the photo and show the iframe smoothly */
.photoContainer.show-sv .results-img-top,
.photoContainer.show-sv .results-blur-bg {
    display: none;
}
.photoContainer.show-sv .sv-frame-wrap {
    display: flex;
    opacity: 1;
}

/* Button logic driven by classes (no hidden attr needed) */
.photoContainer.sv-enabled .sv-open {
    display: inline-flex;
}
.photoContainer.show-sv .sv-open {
    display: none;
}
.photoContainer.show-sv .sv-close {
    display: inline-flex;
}

@media (pointer: coarse), (max-width: 768px) {
  .photoContainer .sv-open,
  .photoContainer .sv-close,
  .photoContainer .sv-frame-wrap {
    display: none !important;
  }
  /* Make sure the photo shows normally */
  .photoContainer.show-sv .results-img-top,
  .photoContainer.show-sv .results-blur-bg {
    display: block !important;
  }
}