/* Compressor monitoring interface styles */
:root {
    --header-bg: #bc5b45;
    --header-text: #ffffff;
    --body-bg: #f8f9fa;
    --primary-color: #bc5b45;
    --secondary-color: #dddddd;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196F3;
    --gauge-bg: #f0f0f0;
    --gauge-active-green: #4CAF50;
    --gauge-active-gray: #9e9e9e;
    --gauge-text: #333333;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* App container */
.app-container {
    width: 100%;
    max-width: 480px; /* Base width */
    min-height: 900px; /* Compact height */
    max-height: 900px; /* Compact height */
    background-color: var(--body-bg);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow-y: auto;
    border-radius: 10px;
    margin: 20px 0;
    
    /* Hide scrollbar but keep scrolling functionality */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.app-container::-webkit-scrollbar {
    display: none;
}

/* Top status bar */
.header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 10px;
}

.status-bar {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.status-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.battery {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* App title area */
.app-header {
    margin-bottom: 10px;
}

.app-title h1 {
    font-size: 1.5rem;
    margin: 0;
}

.app-title p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
}

.btn-menu {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Device info area */
.device-info {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 10px;
}

.device-stats {
    display: none;
}

.company-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.company-logo img {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    background-color: white;
}

/* Main content area */
.main-content {
    padding: 15px;
}

/* Connection area */
.connection-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-action {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
}

/* Connected and disconnected state button text */
.btn-action::after {
    content: "Connect";
}

.connected .btn-action::after {
    content: "Disconnect";
}

.disconnected .btn-action::after {
    content: "Connect";
}

/* Gauge container */
.gauges-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.gauge {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-wrap {
    width: 100%;
    max-width: 150px;
    height: 150px;
    position: relative;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* gauge.js styles */
.gauge-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.gauge-value {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: bold;
    z-index: 10;
    border-radius: 10px;
    padding: 3px 8px;
    min-width: 60px;
}

.gauge-value span:first-child {
    font-size: 1.2rem;
    display: block;
    line-height: 1.2;
}

.gauge-value .unit {
    font-size: 0.8rem;
    opacity: 0.7;
}

.gauge-range {
    display: flex;
    justify-content: space-between;
    width: 85%;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.gauge-target {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Info table */
.info-table {
    background-color: var(--gauge-bg);
    border-radius: 5px;
    overflow: hidden;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: bold;
    color: #666;
}

.info-value {
    font-weight: 500;
}

/* Floating button */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 100;
}

/* Device list */
.device-list {
    max-height: 60vh;
    overflow-y: auto;
    
    /* Hide scrollbar but keep scrolling functionality */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.device-list::-webkit-scrollbar {
    display: none;
}

.device-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.device-item:hover {
    background-color: #f5f5f5;
}

.device-item.selected {
    background-color: rgba(188, 91, 69, 0.1);
    border-left: 3px solid var(--primary-color);
}

.device-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.device-name {
    font-weight: bold;
}

.device-status {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
    background-color: #eee;
}

.status-online {
    background-color: var(--success-color);
    color: white;
}

.status-offline {
    background-color: var(--danger-color);
    color: white;
}

.status-standby {
    background-color: var(--warning-color);
    color: white;
}

.device-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
}

.device-info-row div {
    flex: 1;
}

.device-info-row div:last-child {
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    body {
        background-color: var(--body-bg);
    }
    
    .app-container {
        max-width: 100%;
        height: 100vh;
        max-height: none;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .gauge-wrap {
        max-width: 130px;
        height: 130px;
    }
    
    .gauge-value {
        padding: 2px 6px;
        min-width: 50px;
    }
    
    .gauge-value span:first-child {
        font-size: 1rem;
    }
    
    .gauge-value .unit {
        font-size: 0.7rem;
    }
    
    .gauge-range {
        font-size: 0.8rem;
        width: 90%;
    }
    
    .gauge-target {
        font-size: 0.9rem;
    }
}

/* Location display in device list */
.location-info {
    display: flex;
    align-items: center;
    gap: 5px;
}

.location-info i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Local network device icon style */
.location-info i.bi-hdd-network {
    color: #0088cc;
}

.location-info span {
    cursor: pointer;
    position: relative;
}

.location-info span:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

.location-info span::after {
    content: "ⓘ";
    font-size: 0.8rem;
    margin-left: 3px;
    color: var(--primary-color);
    opacity: 0.7;
}

.location-loading {
    font-style: italic;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

.location-loading .spinner-border {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

/* Custom tooltip styles */
.tooltip {
    font-size: 0.85rem;
}

.tooltip-inner {
    max-width: 250px;
    padding: 8px 12px;
    background-color: rgba(40, 40, 40, 0.95);
    border-radius: 4px;
    text-align: left;
}

/* Custom modal dialog */
.custom-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.custom-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 350px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.custom-modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

.custom-modal-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
}

.custom-modal-body {
    padding: 15px;
    max-height: 60vh;
    overflow-y: auto;
    
    /* Hide scrollbar but keep scrolling functionality */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.custom-modal-body::-webkit-scrollbar {
    display: none;
}

.custom-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 15px;
    border-top: 1px solid #eee;
    gap: 10px;
}

.custom-modal-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #333;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.custom-modal.show,
.custom-modal-backdrop.show {
    display: block;
} 