@import url(/style.css);

body {
    background-color: var(--container-color);
    padding: 0;
    margin: 0;
    height: max-content;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
}

#map {
    position: relative;
    width: 100%;
    height: 100vh;
}

.support-Link a {
    font-size: 1.45rem;
    text-decoration: none;
}


/*  map buttons */
.leaflet-bar {
    border: none !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-custom {
    background-color: var(--map-containers) !important;
    color: var(--btn-color) !important;
    font-size: 28px !important;
    font-weight: bold !important;
    width: 45px !important; height: 45px !important;
    line-height: 45px !important;
    border-radius: 15px !important;
    box-shadow: var(--light-shadow) !important;
    cursor: pointer !important;
    transition: transform .3s ease;
}

.leaflet-control-custom {
    background-image: url("/media/svgs/home.svg") !important;
    background-size: 24px 24px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    margin-right: 80px !important;
}

.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover,
.leaflet-control-custom:hover {
    transform: scale(1.15) !important;
}


.leaflet-top, .leaflet-left {
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    top: auto !important;
}
 
.leaflet-left .leaflet-control {
    margin-left: 0 !important;
    margin-right: 25px;
    
}
.leaflet-top .leaflet-control {
    margin-top: 0 !important;
    margin-bottom: 30px;
}
.leaflet-top, .leaflet-left, .leaflet-right {
    z-index: 500 !important;
}
/* End Map CSS */



.reportIcon{
    width: 55px !important; height: 90px !important;
    background-size: contain;
    background-repeat: no-repeat;
}

.reportIcon.fresh, .item {
    /* background-image: url(/media/svgs/red.svg); */
    background-image: url(/media/svgs/newRed.svg);
}
.reportIcon.semiFresh {
    background-image: url(/media/svgs/newViolet.svg);
}
.reportIcon.stale {
    background-image: url(/media/svgs/newPurple.svg);
}
.reportIcon.oldest {
    background-image: url(/media/svgs/newPurple.svg);
    opacity: .4;
}

/* legends */
.detail-box {
    position: absolute;
    top: 5.5em;
    right: 0;
    width: 60px; 
    height: 60px;
    padding: 0;
    background:var(--map-containers);
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 14px 0 0 14px; 
    box-shadow: var(--light-shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: width .3s ease, height .3s ease;
    -webkit-backdrop-filter: blur(10px);
    z-index: 500;
}

.legend-toggle {
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border: none;
    background: transparent;
    color: #222;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 700;
    text-align: left;
}


.legend-title {
    display: flex;
    align-items: center;
    gap: 9px;
}

.legend-chevron {
    font-size: 1.5rem;
    line-height: 1;
    color: #777;
    transition: transform .25s ease;
}


/* inner legend content  */
.legend-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 15px;
    transition: max-height .3s ease, opacity .3s ease, padding .3s ease;
}
/* Open state */
.detail-box.legend-open {
    width: 250px;
    height: fit-content;
}
.detail-box.legend-open .legend-content {
    max-height: 250px;
    opacity: 1;
    padding:0 15px 14px;
}


.detail-box.legend-open .legend-chevron {
    transform:rotate(180deg);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 5px 0;
    border-top: 1px solid rgba(0, 0, 0, .06);
    color: #4d4a50;
    font-size: 1rem;
    line-height: 1.3;
}



/* Legend marker */
span.item {
    flex-shrink: 0;
    width: 30px !important;
    height: 30px !important;
    display: block;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Existing icons */
.item.one {
    background-image: url(/media/svgs/newRed.svg);
}

.item.two {
    background-image: url(/media/svgs/newViolet.svg);
}

.item.three {
    background-image: url(/media/svgs/newPurple.svg);
}

.item.four {
    background-image: url(/media/svgs/newPurple.svg);
    opacity: .5;
}
/* End Legend */




/* ---side panel --- toggle styling */
.side-bar-toggle {
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 60px; height: 60px;
    background-color: #ffffff;
    border: #784bb4 3px solid;
    border-radius: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-image: url(/media/svgs/burg.svg);  
    cursor: pointer;
    transition: border ease 300ms;
    z-index: 999;
}

.side-bar-toggle.closing {
    border: none;
    box-shadow: var(--light-shadow);
}

/* side panel */
.item-Container {
    position: relative;
}
.card-container{
    min-width: 100%;
    width: 100%;
    max-width: 100%;
    position: absolute;
    z-index: 998;
    left: 0;
    background-color: var(--container-color);
    transition: left ease 250ms;
    box-shadow: var(--light-shadow);
}

.card-container.closing {
    left: -100vw
}

card-list {
    position: relative;
    margin-top: 65px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    overflow-y: auto;
    height: 94.6vh;
    max-height: 100vh;
    z-index: 800;
    scrollbar-width: thin;
    scrollbar-color:
        rgba(120, 75, 180, .35)
        transparent;
}

.support-row-functionality {
    position: sticky;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-around;
    top: 0;
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    background: color-mix(
            in srgb,
            var(--background) 94%,
            transparent
        );
    box-shadow: var(--light-shadow);
}
.hard-f5-refresh {
    background-image: url("/media/svgs/hard-reload.svg");
    background-size: 35px 40px ;
    background-repeat: no-repeat;
    background-position: center;
    width: 40px !important; height: 40px !important;
    background-color: #ffffff;
    border: 1px solid
        color-mix(
            in srgb,
            var(--text-color) 10%,
        );
    border-radius: 20px;
    cursor: pointer;
    transition: transform 350ms ease, background-color 350ms ease;
}
.hard-f5-refresh:hover {
    transform: rotate(60deg); 
    background-color: #cecfd1;
}
.supportive-track {
    background-color: var(--btn-color);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 700;
    padding: 0 7px;
    width: 70%;
    border: none;
    border-radius: 18px;
    transition: background-color 350ms ease;
    cursor: pointer;
}
.supportive-track:hover {
    background-color: #412466;
}

/* --- side panel --- Mobile individual Side-bar single card styling */

.report-card-box {
    height: 120px;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    padding: 5px 9px;
}


.address-head-sidebar {
    font-weight: 700;
    font-size: 16px;
}

.report-card-box section > img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
}

.report-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* highlight state */
.report-card.active {
    border-color: #784bb4;
    box-shadow: 0 2px 10px rgba(36, 6, 49, 0.35);
    background: #d1cbd4;
}


/* Reports Card popups */
.leaflet-container a.leaflet-popup-close-button {
    top: 5px !important;
    right: 7px !important;
    font-size: 30px !important;
}

.leaflet-popup-content-wrapper .leaflet-popup-content {
    width: 300px !important;
    padding: 24px 0;
    margin: 10px;
}

.leaflet-popup-tip-container {
    left: 58% !important;
}



/* This is for the popups, i suck at naming things */
.report-card {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0;
  margin: 0;
}

.card-details{
    margin: 7px;
}
.time-row {
    background-color: #eeeeee;
    padding: 3px 6px;
    border-radius: 10px;
}

.reported-address {
    max-width: 80%;
    font-size: 15px;
}

.report-time {
  margin: 0 !important;
  font-size: 1.1rem;
  line-height: 1.2;
  word-break: break-word;
}

.image-wrapper {
  position: relative;
  width: 100%;
  height: 25rem;
  overflow: hidden;
  border-radius: 10px;
  background: #f2f2f2;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-title {
  margin: 0.5rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
}

.description-box {
  max-height: 150px;
  padding: 0.75rem;
  margin: 8px 0 !important;
  overflow-y: auto;
  font-size: 1.05rem;
  line-height: 1.45;
  background: #eeeeee;
  border-radius: 8px;
  word-break: break-word;
}


@media (min-width: 1024px) {

    .map-Container {
        max-width: 100%;
        width: 100%;
        height: 100vh;
    }

    .map-Text-Row{
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }

    #map {
        position: relative;
        top: 0;
        width: 100%;
        height: 100vh;
    }



    /* map buttons */
    .leaflet-control-zoom-in,
    .leaflet-control-zoom-out,
    .leaflet-control-custom {
        width: 55px !important;
        height: 55px !important;
        line-height: 55px !important;
    }
    .leaflet-control-custom {
        margin-right: 88px !important;
    }

/* Side Bar */
    /* toggle */

    .side-bar-toggle {
        left: 420px;
        transition: left ease 250ms;
    }
    .side-bar-toggle.closing {
        left: 30px;
    }

    .item-Container {
        position: relative;
    }

    .card-container{
        min-width: 400px;
        width: 4em;
        max-width: 450px;
        position: absolute;
        z-index: 998;
        left: 0;
        background-color: var(--container-color);
        transition: left ease 250ms;
        box-shadow: var(--light-shadow);
    }

    .card-container.closing {
        left: -400px;
    }


    card-list {
        position: relative;
        margin-top: 65px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        overflow-y: auto;
        height: 94.6vh;
        max-height: 100vh;
    } 

    /* Single report card */
    .report-card {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 8px;
        background: #fff;
        border: 2px solid transparent;
        cursor: pointer;
        transition: border-color 0.2s, box-shadow 0.2s;
        box-shadow: 0 1px 3px rgba(0,0,0,.12);
    }

    .report-card:hover {
        border-color: #784bb4;
        box-shadow: 0 2px 8px rgba(59,130,246,.25);
    }


    /* Thumbnail */
    .report-card .card-thumb {
        width: 72px;
        height: 72px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

    /* Text column */
    .report-card .card-info {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;        
    }
    .report-card .card-time {
        font-size: 0.75rem;
        color: #6b7280;
        white-space: nowrap;
    }

    .report-card .card-desc {
        font-size: 0.875rem;
        color: #374151;
        /* clamp to 2 lines */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }


}
