/* SHARED CALCULATOR STYLES - Clean version */

/* Layout - podstawa dla sticky */
.kalk-container {
    max-width: 100%;
    margin: 0;
    font-family: inherit;
}

.kalk-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 25px;
    align-items: start;
}

.kalk-main {
    min-width: 0;
}

.kalk-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    align-self: start;
}

/* Sections */
.kalk-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.kalk-section h3 {
    margin: 0 0 15px 0;
    color: #2c5530;
    border-bottom: 2px solid #2c5530;
    padding-bottom: 8px;
    font-size: 16px;
}

.kalk-section h3 span {
    font-size: 12px;
    color: #666;
    font-weight: 400;
}

/* Form rows */
/* Wiersz z suwakiem - pełna szerokość */
.kalk-row-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}
.kalk-row-full:last-child {
    border-bottom: none;
}
.kalk-row-full label {
    font-weight: 500;
    font-size: 14px;
}
.kalk-row-full label small {
    display: block;
    color: #666;
    font-weight: 400;
    font-size: 11px;
    margin-top: 2px;
}
.kalk-row-full .slider-wrapper {
    padding: 0 25px 0 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.kalk-row-full input[type=range] {
    max-width: calc(100% - 60px);
    flex: 1;
    min-width: 0;
}
.kalk-row-full .temp-value {
    min-width: 50px;
    font-weight: 600;
    text-align: right;
}

.kalk-row {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 15px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.kalk-row label {
    font-weight: 500;
    font-size: 14px;
}

.kalk-row label small {
    display: block;
    color: #666;
    font-weight: 400;
    font-size: 11px;
    margin-top: 2px;
}

.kalk-row input[type=number],
.kalk-row select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.kalk-row input:focus,
.kalk-row select:focus {
    border-color: #2c5530;
    outline: none;
}

/* Checkbox rows */
.kalk-check-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.kalk-check-row:last-child {
    border-bottom: none;
}

.kalk-check-row input[type=checkbox] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.kalk-check-row label {
    font-size: 14px;
    cursor: pointer;
}

.kalk-check-row label small {
    display: block;
    color: #666;
    font-size: 11px;
}

/* Summary panel (green) */
.kalk-summary {
    background: linear-gradient(135deg, #2c5530 0%, #1a3a1f 100%);
    color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}

.kalk-summary h3 {
    color: #fff;
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}

.kalk-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    overflow: visible;
}

.kalk-stat:last-child {
    border-bottom: none;
}

.kalk-stat-label {
    font-size: 13px;
    opacity: 0.9;
}

.kalk-stat-value {
    font-size: 24px;
    font-weight: 700;
}

.kalk-stat-unit {
    font-size: 16px;
    font-weight: 600;
    opacity: 1;
    margin-left: 4px;
}

.kalk-stat > span:last-child {
    overflow: visible;
    flex-shrink: 0;
    min-width: fit-content;
    white-space: nowrap;
}

/* Result panel (white) */
.kalk-result {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.kalk-result h4 {
    color: #2c5530;
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
}

.kalk-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.kalk-result-item:last-child {
    border-bottom: none;
}

.kalk-result-item span:first-child {
    font-size: 13px;
    color: #666;
}

.kalk-result-item span:last-child {
    font-size: 16px;
    font-weight: 700;
    color: #2c5530;
}

/* Tips panel */
.kalk-tips {
    background: #e8f5e9;
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid #2c5530;
    margin-bottom: 15px;
}

.kalk-tips h4 {
    margin: 0 0 10px 0;
    color: #2c5530;
    font-size: 13px;
}

.kalk-tips ul {
    margin: 0;
    padding-left: 18px;
    color: #2c5530;
    font-size: 12px;
}

.kalk-tips li {
    margin-bottom: 6px;
}

/* Warning panel */
.kalk-warning {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: none;
}

.kalk-warning.show {
    display: block;
}

.kalk-warning h4 {
    color: #856404;
    margin: 0 0 8px 0;
    font-size: 13px;
}

.kalk-warning p {
    color: #856404;
    margin: 0;
    font-size: 12px;
}

/* Buttons */
.kalk-btn {
    background: #2c5530;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    width: 100%;
    margin-top: 15px;
}

.kalk-btn:hover {
    background: #1a3a1f;
}

/* Progress bar */
.kalk-progress {
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin: 10px 0;
}

.kalk-progress-bar {
    background: linear-gradient(90deg, #2c5530, #4a8f50);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* KALKULATOR GAZU */
.kg-device {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.kg-device:has(input:checked) {
    border-color: #2c5530;
}

.kg-device-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.kg-device-header small {
    color: #888;
    font-size: 11px;
}

.kg-device-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.kg-device-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #2c5530;
}

.kg-device-settings {
    padding: 12px 15px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
}

.kg-device-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.kg-device-row:last-of-type {
    margin-bottom: 0;
}

.kg-device-row label {
    font-size: 12px;
    color: #666;
}

.kg-device-row select {
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

.kg-device-row select:focus {
    border-color: #2c5530;
    outline: none;
}

.kg-device-consumption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
    font-size: 13px;
}

.kg-device-consumption span {
    color: #666;
}

.kg-device-consumption strong {
    color: #2c5530;
    font-size: 14px;
}

.kg-section-note {
    font-size: 12px;
    color: #666;
    margin: 0 0 15px 0;
    padding: 0;
}

/* HIDE SOCIAL SHARE (Twitter, Pinterest, LinkedIn) */
.post-share a[href*="twitter"],
.post-share a[href*="pinterest"],
.post-share a[href*="linkedin"],
.meta_bottom .post-share a[href*="twitter"],
.meta_bottom .post-share a[href*="pinterest"],
.meta_bottom .post-share a[href*="linkedin"] {
    display: none;
}

.meta_bottom .text_share,
.text_share.header-text {
    display: none;
}

.post-share a[href*="facebook"] {
    background: #1877f2;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
}

/* DEFAULT VALUES INFO BOX */
.kalk-defaults-info {
    background: #e7f3ff;
    border-left: 4px solid #2c5530;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 30px;
    font-size: 13px;
    color: #333;
}

/* TABLET */
@media (max-width: 1024px) {
    .kalk-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .kalk-sidebar {
        position: relative;
        top: 0;
        order: -1;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .kalk-section {
        padding: 15px;
    }

    .kalk-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .kalk-row input,
    .kalk-row select {
        text-align: left;
    }

    .kalk-summary {
        padding: 15px;
    }

    .kalk-stat-value {
        font-size: 20px;
    }

    .kalk-defaults-info {
        margin-bottom: 25px;
    }

    .kg-device-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .kg-device-toggle {
        font-size: 13px;
    }

    .kg-device-row {
        grid-template-columns: 70px 1fr;
        gap: 8px;
    }

    .kg-device-row label {
        font-size: 11px;
    }

    .kg-device-row select {
        padding: 6px 8px;
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .kalk-stat-value {
        font-size: 16px;
    }

    .kalk-stat-label {
        font-size: 11px;
    }
}

/* Kalkulator DMC - dodatkowe style */
.dmc-status-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
}

.dmc-status {
    font-weight: 700;
    font-size: 16px;
    padding: 5px 12px;
    border-radius: 6px;
}

.dmc-status.safe { background: #e8f5e9; color: #2c5530; }
.dmc-status.warning { background: #fff3e0; color: #e65100; }
.dmc-status.limit { background: #fff8e1; color: #ff8f00; }
.dmc-status.danger { background: #ffebee; color: #c62828; }

.dmc-license {
    font-size: 12px;
    color: #666;
    background: #e0e0e0;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: help;
}

.dmc-progress {
    margin-bottom: 15px;
}

.dmc-progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 24px;
    overflow: hidden;
}

.dmc-progress-fill {
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    transition: width 0.3s ease, background 0.3s ease;
}

.dmc-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.dmc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
}

.dmc-item label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.dmc-item label span {
    font-weight: 500;
}

.dmc-item label small {
    font-size: 10px;
    color: #888;
}

.dmc-item input[type="number"] {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: right;
    font-size: 13px;
}

.dmc-item select {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

.dmc-item-unit {
    font-size: 11px;
    color: #666;
    margin-left: 4px;
}

.dmc-item-weight {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.dmc-checkbox {
    cursor: pointer;
}

.dmc-checkbox label {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.dmc-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dmc-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kalk-stat.highlight {
    background: #e8f5e9;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.kalk-stat.highlight .kalk-stat-value {
    color: #2c5530;
    font-size: 28px;
}

.kalk-stat.small {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.kalk-stat.small:last-child {
    border-bottom: none;
}

.kalk-info-box {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.kalk-info-box h4 {
    margin: 0 0 10px 0;
    color: #1565c0;
    font-size: 14px;
}

.kalk-info-box ul {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
    color: #333;
}

.kalk-info-box li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .dmc-items-grid {
        grid-template-columns: 1fr;
    }

    .dmc-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .dmc-item input[type="number"] {
        width: 70px;
    }
}

/* ===== KALKULATOR ZBIORNIKÓW ===== */

.zb-section-note {
    font-size: 12px;
    color: #666;
    margin: 0 0 15px 0;
    font-style: italic;
}

.zb-activity {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
}

.zb-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.zb-activity-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.zb-activity-header small {
    color: #888;
    font-size: 11px;
}

.zb-per-person {
    font-size: 10px;
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 500;
    margin-left: 5px;
}

.zb-activity-inputs {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.zb-input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.zb-input-group select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    min-width: 70px;
}

.zb-input-label {
    font-size: 11px;
    color: #666;
}

.zb-activity-result {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: #2c5530;
    background: #e8f5e9;
    padding: 5px 10px;
    border-radius: 6px;
}

.zb-tank-box {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
}

.zb-tank-box.gray {
    border-color: #90a4ae;
}

.zb-tank-box.black {
    border-color: #546e7a;
}

.zb-tank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.zb-tank-title {
    font-weight: 700;
    font-size: 14px;
}

.zb-tank-box.gray .zb-tank-title {
    color: #546e7a;
}

.zb-tank-box.black .zb-tank-title {
    color: #37474f;
}

.zb-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.zb-status.safe {
    background: #e8f5e9;
    color: #2e7d32;
}

.zb-status.warning {
    background: #fff3e0;
    color: #e65100;
}

.zb-status.danger {
    background: #ffebee;
    color: #c62828;
}

.zb-tank-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.zb-tank-stat {
    text-align: center;
}

.zb-tank-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.zb-tank-stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
}

.zb-progress-container {
    margin: 10px 0 5px;
}

.zb-progress-bar {
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.zb-progress-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: width 0.3s ease;
    min-width: 35px;
}

.zb-max-days-box {
    background: linear-gradient(135deg, #2c5530, #1a3a1f);
    color: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
}

.zb-max-days-value {
    font-size: 48px;
    font-weight: 700;
}

.zb-max-days-label {
    font-size: 14px;
    opacity: 0.9;
}

.zb-recommendation-box {
    background: #e8f5e9;
    border-radius: 10px;
    padding: 15px;
    font-size: 13px;
    line-height: 1.5;
}

.zb-dynamic-tips {
    background: #fff3e0;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.zb-dynamic-tips h4 {
    margin: 0 0 10px 0;
    color: #e65100;
    font-size: 14px;
}

.zb-dynamic-tips ul {
    margin: 0;
    padding-left: 20px;
    font-size: 12px;
}

.zb-dynamic-tips li {
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .zb-activity-inputs {
        flex-direction: column;
        align-items: flex-start;
    }

    .zb-activity-result {
        margin-left: 0;
        margin-top: 5px;
    }

    .zb-tank-stats {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .zb-tank-stat {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }
}


/* ===== STICKY SIDEBAR FIX ===== */

/* Reset overflow na wszystkich parentach - wymagane dla sticky */
.refined-magazine-content-container,
.refined-magazine-content-area,
.entry-content,
.kalk-container,
.kalk-layout {
    overflow: visible !important;
}

/* Sticky sidebar */
.kalk-sidebar {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 100px !important;
    align-self: start !important;
}

/* Na tablecie i mobile - wyłącz sticky */
@media (max-width: 1024px) {
    .kalk-sidebar {
        position: relative !important;
        top: 0 !important;
    }
}
