@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: 4px;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
    background-color: #fff !important;
    color: var(--btn-color) !important;
    font-size: 28px !important;
    font-weight: bold !important;
    width: 60px !important; height: 60px !important;
    line-height: 60px !important;
    border-radius: 25px !important;
    box-shadow: var(--light-shadow);
}

.leaflet-control-custom {
    box-shadow: var(--light-shadow) !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;
}


.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 {
    display: none;
}

/* ---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;

}

.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: var(--background);
    box-shadow: var(--light-shadow);
}
.hard-f5-refresh {
    background-image: url("/media/svgs/hard-reload.svg");
    background-size: 40px 40px ;
    background-repeat: no-repeat;
    background-position: center;
    width: 60px !important; height: 60px !important;
    background-color: #ffffff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: background-color 350ms ease;
}
.hard-f5-refresh:hover {
    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;
}

.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 {
        width: 100%;
        height: 95%; 
    } */
    #map {
        position: relative;
        top: 0;
        width: 100%;
        height: 100vh;
    }


    /* legends */
    .detail-box {
        display: block;
        background-color: var(--legend-container-color);
        position: absolute;
        top: 5.5em;
        right: 40px;
        padding: 8px 12px;
        border-radius: 12px;
        border: 4px white solid;
        z-index: 500;
    }

    span.item {
        font-size: 19px;
    }
    .item::before {
        content: "";
        display: inline-block;
        background-size: contain;
        background-repeat: no-repeat;
        width: 34px !important;
        height: 34px !important;
    }

    .item.one::before {
        background-image: url(/media/svgs/newRed.svg);
    }

    .item.two::before {
        background-image: url(/media/svgs/newViolet.svg);
    }

    .item.three::before {
        background-image: url(/media/svgs/newPurple.svg);
    }

    .item.four::before {
        background-image: url(/media/svgs/newPurple.svg);
        opacity: .5;
    }


/* 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;
    }


}
