/* Dashboard Aktualny - style dla widoku aktualnego stanu pompy */

.aktualny-container {
    padding: 20px;
    background-color: #222222;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.aktualny-title {
    text-align: center;
    margin-bottom: 5px;
    color: #ffffff;
    font-weight: 500;
}

.last-update {
    text-align: center;
    color: #aaaaaa;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

/* Status card */
.status-card {
    display: flex;
    align-items: center;
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #4CAF50;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 20px;
}

.status-icon.status-off {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.status-info {
    flex: 1;
}

.status-title {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    font-weight: 500;
    color: #ffffff;
}

.status-value {
    font-size: 1.2rem;
    margin: 0;
    color: #4CAF50;
}

/* Główne karty parametrów */
.main-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.param-card {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
    border-left: 4px solid transparent;
}

.param-card:nth-child(1) {
    border-left-color: #3498db;
}

.param-card:nth-child(2) {
    border-left-color: #e74c3c;
}

.param-card:nth-child(3) {
    border-left-color: #9b59b6;
}

.param-card:nth-child(4) {
    border-left-color: #f39c12;
}

.param-card:nth-child(5) {
    border-left-color: #f39c12;
}

.param-card:nth-child(6) {
    border-left-color: #2ecc71;
}

.param-card:hover {
    transform: translateY(-5px);
}

.param-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
}

.param-info {
    flex: 1;
}

.param-title {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 500;
    color: #aaaaaa;
}

.param-value {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 600;
    color: #ffffff;
}

/* Ikony parametrów */
.temp-outside {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.energy-consumption {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.heat-production {
    background-color: rgba(230, 126, 34, 0.2);
    color: #e67e22;
}

.cop-live {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.energy-tariff {
    background-color: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.heat-cost {
    background-color: rgba(243, 156, 18, 0.2);
    color: #f39c12;
}

/* Stylizacja sekcji pięter - SCHEMAT BUDYNKU */
.section-title {
    color: #ffffff;
    font-weight: 400;
    text-align: center;
    margin: 30px 0 20px;
    font-size: 1.3rem;
}

.building-schematic-container {
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.building-image-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
    border: 1px solid #333;
}

.building-image {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.9); /* Lekkie przyciemnienie tła dla lepszej czytelności */
    transition: filter 0.3s ease;
}

.building-image-wrapper:hover .building-image {
    filter: brightness(0.8);
}

/* Overlays */
.schematic-overlay {
    position: absolute;
    z-index: 10;
    width: 280px;
    transition: transform 0.3s ease;
}

.schematic-overlay:hover {
    z-index: 20;
    transform: scale(1.05);
}

/* Pozycjonowanie overlayów */
.overlay-upper {
    top: 5%;
    left: 3%;
}

.overlay-lower-left {
    bottom: 5%;
    left: 3%;
}

.overlay-right {
    bottom: 5%;
    right: 3%;
}

/* Circuit Card in Schematic context */
.circuit-card {
    background: #2a2a2a; /* Fallback */
    border-radius: 16px;
    padding: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.circuit-card.glass-effect {
    background: rgba(30, 30, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Circuit specific accents */
.circuit-card.radiators {
    border-top: 4px solid #e74c3c;
}

.circuit-card.underfloor {
    border-top: 4px solid #3498db;
}

.circuit-header {
    display: flex;
    align-items: center;
    padding: 15px 15px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.05);
}

.circuit-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.radiators .circuit-icon-wrapper {
    background: rgba(231, 76, 60, 0.2);
    color: #ff6b6b;
}

.underfloor .circuit-icon-wrapper {
    background: rgba(52, 152, 219, 0.2);
    color: #5dade2;
}

.circuit-title-box h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.circuit-subtitle {
    font-size: 0.75rem;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.circuit-body {
    padding: 15px;
}

.temp-group {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 5px;
}

.temp-group.target {
    margin-bottom: 12px;
}

.temp-group.current {
    margin-top: 12px;
}

.temp-label {
    font-size: 0.85rem;
    color: #cccccc;
}

.temp-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.temp-number small {
    font-size: 0.9rem;
    font-weight: 400;
    color: #aaa;
    margin-left: 2px;
}

.temp-number.secondary {
    font-size: 1.2rem;
    color: #eeeeee;
}

/* Visual Bar */
.temp-visual-bar {
    height: 10px;
    background: rgba(0,0,0,0.4);
    border-radius: 6px;
    padding: 2px;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.bar-track {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.radiators .bar-fill {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.underfloor .bar-fill {
    background: linear-gradient(90deg, #2980b9, #3498db);
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

/* CWU Card Styles */
.circuit-card.cwu-card {
    border-top: 4px solid #f39c12;
}

.cwu-card .circuit-icon-wrapper {
    background: rgba(243, 156, 18, 0.2);
    color: #f5b041;
}

.cwu-card .bar-fill {
    background: linear-gradient(90deg, #2980b9, #f39c12, #e74c3c);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.cwu-bar {
    position: relative;
    margin-bottom: 15px;
}

.bar-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 0.7rem;
    color: #888;
}

.temp-number.cwu-temp {
    color: #f5b041;
}


/* Dodatkowe parametry */
.params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.param-item {
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-left: 4px solid transparent;
    transition: transform 0.2s ease;
}

.param-item:hover {
    transform: translateY(-3px);
}

.param-item:nth-child(1) {
    border-left-color: #3498db;
}

.param-item:nth-child(2) {
    border-left-color: #e74c3c;
}

.param-item:nth-child(3) {
    border-left-color: #e67e22;
}

.param-item:nth-child(4) {
    border-left-color: #2ecc71;
}

.param-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.param-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ikony dodatkowych parametrów */
.water-flow {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.temp-supply {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.temp-return {
    background-color: rgba(230, 126, 34, 0.2);
    color: #e67e22;
}

.cop-calculated {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.param-label {
    font-size: 0.9rem;
    color: #aaaaaa;
    margin-bottom: 5px;
}

.param-item .param-value {
    font-size: 1.2rem;
}

/* Przycisk odświeżania */
.refresh-section {
    text-align: center;
    margin: 30px 0 10px;
}

.refresh-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.refresh-info {
    color: #aaaaaa;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Responsywność */
@media (max-width: 768px) {
    .schematic-overlay {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        margin-top: 10px;
        transform: none !important;
    }
    
    .overlay-upper,
    .overlay-lower-left,
    .overlay-right {
        padding: 10px;
        width: 100%;
    }
    
    .building-image-wrapper {
        display: flex;
        flex-direction: column;
        background: #2a2a2a; /* Tło dla container w mobile */
    }
    
    .building-image {
        /* Na mobile obrazek na górze */
        border-bottom: 1px solid #333;
    }

    .circuit-card {
        width: 100%;
        box-shadow: none;
    }

    /* Reset glass effect on mobile for better readability if needed, or keep it */
    /* Keep glass effect but ensure background is dark enough */
    
    .status-card, 
    .param-card {
        flex-direction: column;
        text-align: center;
    }
    
    .status-icon, 
    .param-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .param-item {
        flex-direction: column;
        text-align: center;
    }
    
    .param-item-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .main-cards {
        grid-template-columns: 1fr;
    }
}

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

/* Loading i Error stany */
.loading, .error {
    text-align: center;
    padding: 40px;
    color: #aaaaaa;
    font-size: 1.1rem;
}

.loading i {
    animation: spin 2s linear infinite;
    margin-right: 10px;
    color: #4CAF50;
}

.error {
    color: #e74c3c;
}

.error i {
    margin-right: 10px;
}

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