/* ========== KALKULATOR NITROX ========== */

.nitrox-calculator-wrapper * {
    box-sizing: border-box;
}

.nitrox-calculator-wrapper {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nitrox-container {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(255,255,255,0.1);
    margin: 0 auto;
}

.nitrox-debug-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nitrox-debug-btn {
    padding: 8px 16px;
    border: 2px solid #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.nitrox-debug-btn:hover {
    opacity: 1;
}

.nitrox-debug-btn.active {
    opacity: 1;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.nitrox-main-title {
    text-align: center;
    color: #ffffff;
    margin: 0 0 10px 0;
    font-size: 32px;
}

.nitrox-version {
    font-size: 0.5em;
    opacity: 0.7;
    font-weight: normal;
    vertical-align: super;
}

.nitrox-subtitle {
    text-align: center;
    color: #a0aec0;
    margin: 0 0 40px 0;
    font-size: 16px;
}

/* Grid: butle po lewej, kontrolki po prawej */
.nitrox-tanks-controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: start;
    position: relative;
}

/* Stoper - niewidoczny element zapewniający poprawne wyrównanie */
.nitrox-tanks-controls-grid::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 5px;
    height: 5px;
    background: transparent;
    z-index: 1000;
}

.nitrox-tanks-visualization {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.nitrox-tanks-visualization.show-debug-left {
    position: relative;
}

.nitrox-tanks-visualization.show-debug-left::before {
    content: '[DEBUG-LEWA] Lewa kolumna (butle)';
    position: absolute;
    top: -25px;
    left: 0;
    background: blue;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1000;
}

.nitrox-cylinder-svg {
    width: 100%;
    height: 400px;
    display: block;
    margin: 0;
    padding: 0;
    vertical-align: top;
}

.nitrox-cylinder-svg.show-debug-svg {
    position: relative;
}

.nitrox-cylinder-svg.show-debug-svg::before {
    content: '[DEBUG-SVG] SVG butli | góra SVG: 0px | butla y=50';
    position: absolute;
    top: -25px;
    left: 0;
    background: green;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1000;
    white-space: nowrap;
}

.nitrox-info-buttons {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 20px;
    padding-top: 50px;
    margin-top: 0;
}

.nitrox-info-buttons.show-debug-right {
    position: relative;
}

.nitrox-info-buttons.show-debug-right::before {
    content: '[DEBUG-PRAWA] Prawa kolumna | padding-top: 50px';
    position: absolute;
    top: -25px;
    left: 0;
    background: yellow;
    color: black;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1000;
    white-space: nowrap;
}

.nitrox-gas-info {
    padding: 20px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    text-align: center;
}

.nitrox-o2-display {
    font-size: 28px;
    font-weight: bold;
    color: #e2e8f0;
    margin-bottom: 10px;
}

.nitrox-pressure-display {
    font-size: 20px;
    color: #cbd5e0;
}

.nitrox-pressure-display span {
    font-weight: bold;
    color: #a78bfa;
}

.nitrox-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nitrox-btn-cylinder {
    padding: 18px;
    border: 3px solid #4a5568;
    background: #2d3748;
    color: #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nitrox-btn-cylinder.nitrox-btn-active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.nitrox-btn-cylinder:hover {
    opacity: 0.9;
}

/* Slidery */
.nitrox-control-group {
    margin: 25px 0;
}

.nitrox-control-group label {
    display: block;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 10px;
    font-size: 16px;
}

.nitrox-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nitrox-control-group input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: #2d3748;
    outline: none;
    -webkit-appearance: none;
}

.nitrox-control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nitrox-control-group input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nitrox-value-display {
    min-width: 80px;
    text-align: right;
    font-weight: bold;
    color: #a78bfa;
    font-size: 18px;
}

/* Panel wyników */
.nitrox-results-panel {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 25px;
    margin-top: 30px;
    color: white;
}

.nitrox-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.nitrox-result-row:last-child {
    border-bottom: none;
}

.nitrox-result-label {
    font-size: 16px;
    opacity: 0.9;
}

.nitrox-result-value {
    font-size: 20px;
    font-weight: bold;
}

.nitrox-ndl-highlight {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    text-align: center;
}

.nitrox-ndl-value {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.nitrox-warning {
    background: #fed7d7;
    color: #c53030;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

/* Responsywność */
@media (max-width: 768px) {
    .nitrox-tanks-controls-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nitrox-container {
        padding: 20px;
    }
    
    .nitrox-main-title {
        font-size: 24px;
    }
    
    .nitrox-cylinder-svg {
        height: 300px;
    }
    
    .nitrox-ndl-value {
        font-size: 28px;
    }
}
