
#nav {
	margin-left:1vw;
	height: 1em;
}

#sorry {
}

#works{
    position: relative; 
	margin-left:1vw;
}

#mapid {
    width: 500px; 
    height: 500px; 
    position: relative; 
}

#topInfo {
	background: white;
	position: fixed;
	top: 1em;
	left: 6vw;
	display: block;
	font-size:1em;
	line-height:.2em;
	z-index:10001;
}
#sel {
	background: white;
	position: fixed;
	top: 3.5em;
	left: 6vw;
	display: block;
	font-size:1em;
	z-index:10000;
}

#loading {
	position: fixed;
	top: 10%;
	left: 10vw;
	display: block;
	font-size:3em;
	z-index:10000;
}

/* must be made responsive ! */
#chart {
	position: fixed!important;
    background:white;
	top: 30%;
	left: 1vw;
    width:20%;  
	display: block;
	font-size:1em;
	z-index:10000;
    display:none;
}

.c3-grid line {
  stroke: none;
}


.c3-axis-x > path.domain, .tick > line[x2="-6"] {
  visibility: hidden;
}



/* popup info */
.info {
		/* this is inside the popup-content-wrapper **
		** so styling is limited */
}
/* district info
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup

inside:
.leaflet-popup-content-wrapper, .leaflet-popup-tip

difficult to move due to transform3d statement required to have it placed next to the item ...
if unset, we can put windows at fixed  position
*/

.fading {
	opacity: 1;
	-webkit-animation: fadeinout; /* 2s linear infinite; */
	animation: fadeinout 2s linear infinite;
}

@-webkit-keyframes fadeinout {
  0%,100% { opacity: 0; }
  50% { opacity: 1; }
}

@keyframes fadeinout {
	0%,100% { opacity: 0 }
	50% { opacity: 1 }
}


@media (max-width:600px) {
    #chart {
	    top: unset;
        bottom:0;
	    left: 1vw;
        width:50%;  
    	font-size:.6em;
    }
    #chart > c3-title {
        font-size: .7em;
    }
    #topInfo {
	    top: 2em;
        left:20%;
    }
    #sel {
	    top: 4.5em;
        left:20%;
    }
    #works{
	    margin-left:2vw;
    }
}


.sensor-popup__value {
    font-weight: 700;
}

.sensor-popup__value--dry {
    color: #dc2626;
}

.sensor-popup__value--low {
    color: #d97706;
}

.sensor-popup__value--ok {
    color: #15803d;
}

.sensor-popup__value--wet {
    color: #0369a1;
}

.sensor-popup__value--unknown {
    color: #6b7280;
}

.sensor-history {
    margin: .35rem 0 .45rem;
}

.sensor-history__label {
    color: #4b5563;
    font-size: .75rem;
    line-height: 1.1;
    margin-bottom: .15rem;
}

.sensor-history__chart {
    width: 180px;
}

.sensor-history__chart svg {
    display: block;
    height: 48px;
    overflow: visible;
    width: 180px;
}

.sensor-history__grid {
    stroke: #e5e7eb;
    stroke-width: 1;
}

.sensor-history__line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
}

.sensor-history__dot {
    fill: currentColor;
    stroke: #ffffff;
    stroke-width: 1.3;
}

.sensor-history__dot--live {
    stroke-width: 1.6;
}

.sensor-history__meta,
.sensor-history__empty {
    color: #6b7280;
    font-size: .72rem;
    line-height: 1.15;
}


.sensor-marker {
    background: transparent;
    border: 0;
}

.sensor-marker__drop {
    align-items: center;
    display: flex;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.18));
    height: 38px;
    justify-content: center;
    width: 30px;
}

.sensor-marker__drop svg {
    display: block;
    fill: currentColor;
    height: 34px;
    stroke: #ffffff;
    stroke-linejoin: round;
    stroke-width: 1.5px;
    width: 28px;
}

.sensor-sidebar {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(148, 163, 184, .45);
    border-radius: 8px;
    bottom: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
    box-sizing: border-box;
    color: #111827;
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 520px;
    overflow: hidden;
    position: fixed;
    right: 1rem;
    top: 1rem;
    width: 38vw;
    z-index: 9000;
}

.sensor-sidebar__header {
    align-items: flex-start;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    padding: .85rem 1rem .7rem;
}

.sensor-sidebar__header h2 {
    font-size: 1.05rem;
    line-height: 1.2;
    margin: 0;
}

.sensor-sidebar__header p {
    color: #6b7280;
    font-size: .82rem;
    line-height: 1.2;
    margin: .2rem 0 0;
}

.sensor-sidebar__list {
    overflow: auto;
    padding: .35rem;
}

.sensor-sidebar__empty {
    color: #6b7280;
    font-size: .9rem;
    padding: 1rem;
}

.sensor-sidebar__item {
    border-bottom: 1px solid #eef2f7;
}

.sensor-sidebar__item:last-child {
    border-bottom: 0;
}

.sensor-sidebar__row {
    align-items: center;
    background: transparent;
    border: 0;
    box-sizing: border-box;
    color: inherit;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: .55rem;
    grid-template-columns: 3.2rem minmax(0, 1fr) 3.2rem 4.4rem;
    padding: .65rem;
    text-align: left;
    width: 100%;
}

.sensor-sidebar__row:hover,
.sensor-sidebar__row[aria-expanded="true"] {
    background: #f8fafc;
}

.sensor-sidebar__distance {
    color: #4b5563;
    font-size: .84rem;
    font-variant-numeric: tabular-nums;
}

.sensor-sidebar__name {
    min-width: 0;
}

.sensor-sidebar__name strong,
.sensor-sidebar__name small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sensor-sidebar__name strong {
    font-size: .9rem;
    line-height: 1.2;
}

.sensor-sidebar__name small {
    color: #6b7280;
    font-size: .75rem;
    line-height: 1.25;
    margin-top: .08rem;
}

.sensor-sidebar__value {
    font-size: .95rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: right;
}

.sensor-sidebar__state {
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    padding: .32rem .42rem;
    text-align: center;
}

.sensor-sidebar__state--dry {
    color: #dc2626;
}

.sensor-sidebar__state.sensor-sidebar__state--dry {
    background: #fee2e2;
}

.sensor-sidebar__state--low {
    color: #d97706;
}

.sensor-sidebar__state.sensor-sidebar__state--low {
    background: #ffedd5;
}

.sensor-sidebar__state--ok {
    color: #15803d;
}

.sensor-sidebar__state.sensor-sidebar__state--ok {
    background: #dcfce7;
}

.sensor-sidebar__state--wet {
    color: #0369a1;
}

.sensor-sidebar__state.sensor-sidebar__state--wet {
    background: #e0f2fe;
}

.sensor-sidebar__state--unknown {
    color: #6b7280;
}

.sensor-sidebar__state.sensor-sidebar__state--unknown {
    background: #f3f4f6;
}

.sensor-sidebar__expanded {
    background: #ffffff;
    padding: 0 .65rem .8rem 4.4rem;
}

.sensor-sidebar__detail-line {
    color: #374151;
    font-size: .82rem;
    margin-bottom: .5rem;
}

.sensor-sidebar__detail-grid {
    display: grid;
    font-size: .78rem;
    gap: .25rem .7rem;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    margin-bottom: .65rem;
}

.sensor-sidebar__detail-grid span {
    color: #6b7280;
}

.sensor-sidebar__detail-grid strong {
    font-weight: 650;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sensor-sidebar__chart {
    color: currentColor;
}

.sensor-sidebar__chart svg {
    display: block;
    height: 150px;
    max-width: 100%;
    overflow: visible;
    width: 100%;
}

.sensor-sidebar__chart-grid {
    stroke: #e5e7eb;
    stroke-width: 1;
}

.sensor-sidebar__chart-tick line {
    stroke: #eef2f7;
    stroke-width: 1;
}

.sensor-sidebar__chart-tick text {
    fill: #6b7280;
    font-size: 11px;
    text-anchor: middle;
}

.sensor-sidebar__chart-line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.sensor-sidebar__chart-dot {
    fill: currentColor;
    stroke: #ffffff;
    stroke-width: 1.6;
}

.sensor-sidebar__chart-meta,
.sensor-sidebar__history-empty {
    color: #6b7280;
    font-size: .75rem;
    line-height: 1.2;
    margin-top: .25rem;
}

.sensor-sidebar-highlight {
    background: transparent;
    border: 0;
    pointer-events: none;
}

.sensor-sidebar-highlight__ring {
    border: 4px solid var(--sensor-highlight-color, #2563eb);
    border-radius: 999px;
    box-shadow: 0 0 0 7px rgba(37, 99, 235, .14), 0 2px 5px rgba(15, 23, 42, .25);
    box-sizing: border-box;
    display: block;
    height: 58px;
    opacity: .95;
    width: 58px;
    animation: sensor-sidebar-highlight-pulse 1.6s ease-in-out infinite;
}

@keyframes sensor-sidebar-highlight-pulse {
    0%, 100% {
        opacity: .72;
        transform: scale(.92);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 900px) {
    .sensor-sidebar {
        border-radius: 8px 8px 0 0;
        bottom: 0;
        left: 0;
        max-height: 45vh;
        max-width: none;
        right: 0;
        top: auto;
        width: auto;
    }

    .sensor-sidebar__header {
        padding: .65rem .85rem .55rem;
    }

    .sensor-sidebar__row {
        grid-template-columns: 3rem minmax(0, 1fr) 3rem 4rem;
        padding: .55rem;
    }

    .sensor-sidebar__expanded {
        padding-left: .55rem;
    }
}


.demo-location-popup {
    min-width: 8rem;
}

.demo-location-marker {
    background: transparent;
    border: 0;
}

.demo-location-marker__pin {
    display: block;
    filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.22));
    height: 42px;
    width: 32px;
}

.demo-location-marker__pin svg {
    display: block;
    height: 42px;
    width: 32px;
}

.demo-location-marker__pin path {
    fill: #2563eb;
    stroke: #ffffff;
    stroke-linejoin: round;
    stroke-width: 1.4px;
}

.demo-location-marker__pin circle {
    fill: #ffffff;
}
