/* TODO */
/* Remove postgress locally */
/* Add your custom styles here */
body {
    /* font-family: "Nunito Sans", sans-serif !important; */
    /* Increased opacity from 0.1 to 0.3 */
    /* background: url("https://res.cloudinary.com/dub9ykyuq/image/upload/v1745792884/zekrq1iimtb9l2vrixkq.svg"); */
    background: linear-gradient(to right, white 30%, transparent 100%),
        url("https://res.cloudinary.com/dub9ykyuq/image/upload/v1752788660/Background_Pattern_lvxequ.svg");
    background-size: cover;
    /* background-repeat: repeat-y; */

    --primary-blue: #0bb5dd;
    --dark-blue: #005c9b;
    --dark-text: #001738;
    --light-background: #f8f8f8;
}

* {
    --webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: "proxima-nova", sans-serif;
}

i {
    font-family: auto;
    /* font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr; */
}

a {
    text-decoration: none;
    color: inherit;
}

body,
.page-container,
#slide-out,
html {
    max-height: 100vh;
    box-sizing: border-box;
    /* overflow: hidden; */
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    padding-top: 100px;
    padding-bottom: 100px;
    margin-left: 225px;
    /* margin-right: 2%; */
    /* background: url("https://res.cloudinary.com/dub9ykyuq/image/upload/v1745792884/zekrq1iimtb9l2vrixkq.svg"); */

    /* background-color: rgba(0, 0, 0, 0.3); */
}

/* Ensure content fits within iPad mode */
.ipad-mode main {
    margin-left: 240px;
    margin-right: 0;
    padding: 84px 20px 20px;
    width: calc(100% - 240px);
}

.ipad-mode .performance-container {
    width: 100%;
    max-width: 764px; /* 1024px - 240px (sidenav) - 20px (padding) */
    margin: 0;
    padding: 10px;
}

.ipad-mode .metrics-grid {
    gap: 15px;
}

/* Navbar */
.mdc-top-app-bar__action-item {
    color: white;
}

.mdc-top-app-bar__action-item:hover {
    opacity: 0.8;
}

.mdc-top-app-bar {
    background-color: var(--primary-blue);
    text-transform: uppercase;
    color: white;
    color: black;
    /* font-weight: bold !important; */
    z-index: 1000;
}

.mdc-top-app-bar__title:visited {
    color: white;
}

.mdc-top-app-bar__title {
    /* font-size: 1.5rem; */
    /* font-weight: normal; */
    font-weight: bold;
}

.header {
    background-color: #0077c8;
    color: white;
    padding: 1rem;
    text-align: center;
}

#dashboard-systems .grid-item:nth-child(1) {
    margin-right: 32px;
}
#dashboard-systems .grid-item {
    cursor: pointer;
}
#dashboard-systems {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
}

.card {
    border-radius: 8px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    /* padding: 28px 20px; */
    padding: 24px 20px;
    padding: 24px;
    background-color: #fff;
    margin-bottom: 24px;
    /* padding: 20px 16px; */
    /* padding: 16px; */
}

#dashboard-systems .card {
    padding: 28px 20px;
}

.card-title .material-icons {
    color: var(--primary-blue);
    font-size: 48px;
    /* margin-bottom: 0; */
}
.card-title {
    text-align: center;
    font-weight: bold;
    color: #333;
    margin-bottom: 0;
    color: var(--primary-blue);
    text-transform: uppercase;
    display: flex;
    line-height: 1.2;
    font-size: 20px;
}

#dashboard-systems .card-title {
    letter-spacing: 1px;
    font-size: 24px;
}

@media (min-width: 1900px) {
    .card-title {
        font-size: 23px;
    }
}

.card-title + p {
    margin: 0;
}

.card img {
    max-width: 40%;
    margin: 0 auto;
    margin-bottom: 4px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0px;
}

.status-indicator span {
    font-weight: bold;
    font-size: 24px;
    display: flex;
}

/* .status-indicator, */
.dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #4caf50;
    /* background-color: #f44336; */
    /* Green for "On" */
}

.status-indicator.past-due,
.dot.off,
.dot.critical {
    background-color: #f44336;
    /* Red for critical/off */
}

.dot.good {
    background-color: #4caf50;
    /* Green for good status (70%+) */
}

.dot.warning {
    background-color: #ff9800;
    /* Orange/Yellow for warning status (40-69%) */
}

.dot.unknown {
    background-color: #9e9e9e;
    /* Gray for unknown status */
}

.weather-high {
    font-size: 16px;
}

.weather-info p,
.client-info p {
    margin: 0.25rem 0;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    z-index: 1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

#basin-widget {
    position: relative;
}

#basin-widget .dropdown {
    position: absolute;
    bottom: 0;
    right: 0;
    color: white;
    z-index: 1;
    background-color: red;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.grid-item {
    display: flex;
    flex-direction: column;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.section {
    display: flex;
}

#dashboard-left-column {
    width: 60%;
    width: 65%;
    /* overflow: hidden; */
}

#dashboard-right-column {
    width: 31%;
    /* overflow: hidden; */
    /* width: auto; */
    margin-left: 4%;
}

/* Basin Widget */
#basin-widget {
}
#basin-widget img {
    max-width: 680px;
    max-height: 370px;
    max-height: 330px;
    object-fit: cover;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.location-selector {
    margin: 0;
    margin-top: -8px;
}

.section-title .location-label {
    font-size: 44px;
    font-weight: bold;
    /* background-color: #0077c8; */
    color: white;
    margin-bottom: 1rem;
    margin: 0;
    /* margin-top: -6px; */
    /* padding: 20px 12px; */
    /* border-radius: 0 0 8px 8px; */
    text-align: center;
    text-transform: uppercase;
}

/* Grid Layout and Container */
.performance-container {
    max-width: 1250px;
    width: 70%;
    /* max-width: 80%; */
    margin: 0 auto;
    /* padding: 20px; */
    /* font-family: "Arial", sans-serif; */
    font-family: "Nunito Sans", sans-serif;

    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M50 36.6L68.7 48v22.7L50 82.4 31.3 70.7V48L50 36.6z" stroke="%23eaeaea" fill="none" stroke-width="0.5"/></svg>');
    background-size: 80px 80px;
    background-repeat: repeat;
}

/* Header Styling */
.performance-header {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-top: 24px;
    margin-bottom: 32px; */
    margin-top: 32px;
    margin-bottom: 40px;
}

.performance-header h2 {
    font-size: 48px;
    font-weight: normal;
    font-weight: 300;
    color: #333;
    margin: 0;
}

/* Location Selector */
.header-location-selector,
.location-selector {
    background-color: #00569d;
    color: white;
    /* padding: 8px 16px; */
    /* border-radius: 4px; */
    /* display: flex; */
    /* align-items: center; */
    /* margin-left: 20px; */
}

.header-location-label,
.location-label {
    font-weight: bold;
    font-size: 14px;
    width: 85%;
    display: inline-block;
}

.dropdown-arrow {
    margin-left: 10px;
    font-size: 24px;
    border-left: solid 2px rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.25);
    width: 15%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Grid Layout */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* gap: 16px; */
    gap: 20px;
    margin-bottom: 40px;
}

/* Cards */
.metric-card {
    background-color: white;
    border: 1px solid #eaeaea;
    /* padding: 24px 0 30px; */
    padding: 20px 0;
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    cursor: pointer;
}

/* Card Title */
.metric-title {
    color: #00aeef;
    font-size: 24px;
    /* font-weight: 500; */
    font-weight: bolder;
    /* margin-bottom: 24px; */
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-arrow {
    color: var(--primary-blue);
}

.arrow {
    font-size: 16px;
    color: black !important;
    margin-left: 3px;
}

/* Card Values */
.metric-value {
    font-size: 48px;
    font-weight: 100;
    color: #333;
    margin-bottom: 0;
}

.metric-unit {
    color: #666;
    color: #000;
    font-weight: bold;
    font-size: 24px;
    margin-top: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* weatherIcons */
#weather-row {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-bottom: 20px; */
}
.sunny {
    /* background-image: url("https://res.cloudinary.com/dub9ykyuq/image/upload/v1745792884/sunny_1_xj0q5v.svg"); */
}

#weather-info {
    text-align: center;
    font-size: 16px;
}

@media screen and (min-width: 1908px) {
    #weather-info {
        font-size: 20px;
    }
}

.weather-info .card-title {
    text-align: left;
    display: flex;
    align-items: center;
}

.weather-current {
    font-size: 52px;
    font-weight: 100;
}

@media screen and (min-width: 1900px) {
    .weather-current {
        font-size: 60px;
    }
}

#slide-out,
main {
    box-sizing: border-box;
}

#slide-out {
    padding-top: 60px;
    /* position: relative; */
    position: fixed;
    overflow-y: visible !important;
    z-index: 100;
}

.header-location-selector .dropdown-arrow {
    font-size: 12px;
    height: 100%;
    /* padding: 10px; */
    padding: 20px;
    padding: 14px 16px;
}

.header-location-selector {
    position: relative;
    cursor: pointer;
    /* padding: 0 0px; */
    /* padding-left: 8px; */
    padding-left: 20px;
    /* border: 1px solid #e2e8f0; */
    border-radius: 4px;
    /* border-radius: 2px; */
    /* background-color: var(--dark-blue); */
    display: flex;
    align-items: center;
    margin-left: 24px;
}

.header-location-label {
    font-size: 20px;
    font-size: 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-location-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    /* background-color: var(--dark-blue);
    color: white; */
    background-color: white;
    color: black;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
    min-width: 250px;
    max-height: 500px;
    overflow-y: auto;
}

/* .database-section {
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                padding: 0.5rem 0;
            }

            .database-section:last-child {
                border-bottom: none;
            }

            .database-header {
                padding: 0.5rem 1rem;
                font-weight: bold;
                color: #fff;
                background-color: rgba(255, 255, 255, 0.1);
            } */

.database-header {
    padding: 8px 12px;
    font-weight: bold;
}

.header-header-location-option {
    display: block;
    padding: 0.5rem 1rem;
    color: #4a5568;
    color: #fff;
    text-decoration: none;
}

.header-header-location-option:hover {
    background-color: #f7fafc;
}

.container-fluid {
    max-width: 1200px;
    width: 100%;

    margin: 0 auto;
    padding: 20px;
    /* display: flex; */
    /* flex-direction: row; */
}

@media screen and (max-width: 1280px) {
    .container-fluid {
        max-width: 900px;
    }
}

.container {
    display: flex;
    max-width: 92%;
    margin: 0 auto;
}

.container-medium {
    width: 85%;
    display: flex;

    margin: 0 auto;
}

.container-wide {
    display: flex;
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
}

@media screen and (min-width: 1281px) {
    .container {
        /* max-width: 70%; */
        width: 100%;
        align-items: center;
        justify-content: center;
    }
}

.faults-log {
    width: 100%;
}

/* Faults Log Filters */
.filters-section {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #333;
}

.filter-select,
.filter-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filter-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    height: fit-content;
}

.filter-btn:hover {
    background: #0056b3;
}

.clear-btn {
    background: #6c757d;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    height: fit-content;
    display: inline-block;
}

.clear-btn:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}

.results-summary {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.875rem;
}

.filter-indicator {
    margin-left: 1rem;
    color: #007bff;
}

/* Modules */

.modules {
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
    /* gap: 1rem; */
}

.module {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.module-header {
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
}

.module-header h3 {
    color: var(--primary-blue);
}

.module:has(.module-header[aria-expanded="true"]) {
    margin-top: 20px;
    margin-bottom: 20px;
}

.module-header[aria-expanded="false"] .expand-icon {
    transform: rotate(-90deg);
}

/* Tables */
th {
    text-transform: uppercase;
    font-weight: bold;
}
.procedure-column,
th,
.status-table th {
    color: var(--primary-blue);
}

th,
td,
.status-table th,
.status-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-weight: bold;
}

.btn-faults-log,
.btn-support,
.dark-btn {
    background-color: #2563a5;
    color: white;
    padding: 4px 32px;
    border: none;
    font-size: 20px;
    font-weight: 600;
    /* float: right; */
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: background-color 0.2s;
    align-self: flex-end;
}

.btn-support {
    font-size: 16px;
}

/* SlideOut  */

#slide-out.open + main {
    margin-left: 300px;
}

/* Material text field */
.material-textfield {
    position: relative;
    font-family: "Roboto", sans-serif;
    display: inline-block;
    width: 100%;
}

.material-textfield input {
    font-size: 1rem;
    outline: none;
    border: 1px solid gray;
    border-radius: 5px;
    padding: 1rem 0.7rem;
    color: gray;
    transition: 0.1s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.material-textfield label {
    position: absolute;
    font-size: 1rem;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: gray;
    padding: 0 0.3rem;
    margin: 0 0.5rem;
    transition: 0.1s ease-out;
    transform-origin: left top;
    pointer-events: none;
}

.material-textfield input:focus {
    border-color: var(--primary-blue);
}

.material-textfield input:focus + label,
.material-textfield input:not(:placeholder-shown) + label {
    color: var(--primary-blue);
    top: 0;
    transform: translateY(-50%) scale(0.9);
}

#start-date,
#end-date,
[type="hidden"] {
    /* visibility: hidden; */
    /* z-index: 0; */
    /* position: absolute; */
}

.timeframe-selector #start-date,
.timeframe-selector #end-date,
.timeframe-selector [type="hidden"] {
    position: relative;
    visibility: visible;
    /* z-index: 1 !important; */
}

.breadcrumb-nav > div {
    padding-left: 50px;
}

ol.breadcrumb {
    margin: 0;
}

.mdc-top-app-bar__title {
    padding-left: 10px;
}

.faults-log-container {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    /* margin-top: 32px; */
}

.status-table tr th:last-child,
.status-table tr td:last-child {
    max-width: 100px;
}
.status-table tr td:last-child {
    text-align: center;
}

.status-legend {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    max-width: 275px;
    margin-left: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #757575;
    font-size: 16px;
}

.statistics-btn {
    margin-top: 32px;
    margin-right: 2.5%;
    text-transform: uppercase;
}

.m-icon {
    width: 20px;
    display: flex;
    margin-right: 4px;
}

.icon-container {
    width: 28px;
    display: flex;
    margin-right: 4px;
    align-items: center;
}

.breadcrumb .active,
.breadcrumb a {
    color: black;
    font-weight: normal;
    text-transform: capitalize;
}

#flowchart {
    max-height: 100px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 18px;
    margin-top: 15px;
    font-weight: bold;
}

/* Apply Date Range Button */
.apply-date-range-button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 8px;
}

.apply-date-range-button:hover:not(:disabled) {
    background-color: var(--dark-blue);
}

.apply-date-range-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Disabled state for category buttons and time filter options during loading */
.category-button.disabled,
.time-filter-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* .flatpickr-input[readonly] {
    cursor: pointer;
    visibility: hidden;
    position: absolute;
} */
.date-range-picker .flatpickr-input[readonly] {
    cursor: pointer;
    visibility: hidden;
    position: absolute;
}
