@import '../src/styles/colors.css';

:root {

    --transition-speed: 0.3s;


}

.SiteSelection {
    width: 1000px;
    height: 24px;
    color: var(--slate-900);
    font-size: 10.5px;
    font-weight: 400;
    border: 1px solid var(--box-border-color);
    background-color: var(--white);
    border-radius: 4px;
    outline-color: var(--azure-500);
    cursor: pointer;
}


.dashboard-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    color: var(--slate-900);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 52.5px;
    border-radius: 10px;
    font-size: 14px;
    background-color: var(--white);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    top: 13px;
    left: 0;
}

.show-btn {
    background-color: var(--showbuttonbg) !important;
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 70px !important;
    height: 28px;
    font-size: 10.5px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* from 4 to 3 columns */
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.metric-card {
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--azure-50);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.icon-wrapper-blue {
    background-color: var(--azure-500);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.icon-wrapper-red {
    background-color: var(--ruby-300);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.icon-wrapper-green {
    background-color: var(--emerald-400);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.icon-wrapper-yellow {
    background-color: var(--slate-600);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.icon-stroke {
    stroke: var(--azure-500);
}


.metric-value {
    font-size: 16.8px;
    font-weight: 600;
}

.metric-label {
    font-size: 9.8px;
    opacity: 0.8;
}

.chart-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    height: 188px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--box-border-color);
}


.chart-card canvas {
    width: 100% !important;
    height: 136px !important;
    margin-top: -12px;

    /* or whatever value you want */
}


.charts-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem; */
    margin-bottom: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    /* tighter column width */
    gap: 0.75rem;
}

.chart-card,
.monthly-chart {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}


.monthly-chart {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1rem;
    height: 468px !important;
    margin-top: 25px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--box-border-color);
}

.water-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.water-metric {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--slate-gray-50);
}


@media (max-width: 768px) {
    .side-nav {
        width: var(--sidebar-collapsed-width);
    }

    .nav-text,
    .logo {
        opacity: 0;
    }

    .main-content {
        width: calc(100% - var(--sidebar-collapsed-width));
        margin-left: var(--sidebar-collapsed-width);
    }

    .metrics-grid,
    .charts-grid,
    .water-metrics {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}





.app-container2 {
    display: flex !important;
    min-height: 100vh !important;
    position: relative;
    width: 100%;
    overflow-y: auto;
}


.main-content {
    flex: 1;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) ease-in-out;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
}

.app-container.nav-collapsed .main-content {
    width: calc(100% - var(--sidebar-collapsed-width));
    margin-left: var(--sidebar-collapsed-width);
}


.dashboard {
    position: relative;
    top: 70px;
    margin-left: 20px !important;
}

.contract {
    position: relative;
    top: 100px;
    margin-left: 20px !important;
}



.top-section {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 38px;
}

.metrics-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 45%;
}

.single-metric-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    height: 485px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex: 1 1 40%;
    min-width: 160px;
}

.metric-icon {
    font-size: 14px;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    position: relative;
    top: 26px;
    margin: 0;
}

.metric-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-900);
    position: relative;
    top: -53px;
}


.Value-badge.blue {
    background-color: var(--azure-50);
    color: var(--azure-400);
}


.Value-badge.red {
    background-color: var(--ruby-50);
    color: var(--ruby-400);
}

.Value-badge.green {
    background-color: var(--emerald-50);
    color: var(--emerald-400);
}

.Value-badge.purple {
    background-color: var(--purple-50);
    color: var(--purple-400);
}

.Value-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
}


.controls-container {
    gap: 1rem;
    position: absolute;
    top: -14px;
    right: 5px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.control-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--box-border-color);
    border-radius: 0.5rem;
    background-color: var(--white);
    color: var(--sidebar-width);
    cursor: pointer;
}


.charts-side {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    flex: 1;
}



.metrics-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--box-border-color);
    width: 600px;
    height: 400px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 29px;
    ;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.metric-icon {
    padding: 0.75rem;
    border-radius: 50%;
}


.monthly-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.year-select {
    background-color: var(--azure-500);
    /* blue background */
    color: var(--white);
    /* white text */
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    appearance: none;
    /* removes default arrow */
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='12' viewBox='0 0 24 24' width='12' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
    /* space for arrow */
}

.year-select option {
    background-color: var(--white);
    color: var(--slate-900);
}