/* /kalkulatory/css/calc_style.css */

:root {
  --primary-white: #fff;
  --primary-1: #fbfbfb;
  --primary-10: #f1f0f9;
  --primary-20: #dedbf1;
  --primary-25: #d5d1ee;
  --primary-30: #bcb4e8;
  --primary-40: #948bd6;
  --primary-50: #665da2;
  --primary-60: #514a82;
  --primary-70: #3b3662;
  --primary-80: #262341;
  --primary-90x80: rgba(18, 16, 48, 0.7);
  --primary-90: #121030;
  --primary-100: #000000;
  
  --radius: 25px;
}

/* --- GŁÓWNY KONTENER --- */
.calc-wrapper {
    width: 100%;
    padding: 0;
    font-family: inherit;
}

/* Header sekcji */
.calc-header-section {
    margin-bottom: 40px;
    text-align: left !important;
    width: 100%;
    /* Jeśli rodzic to Flexbox centrujący, to przesuwa ten element na początek (lewo) */
    align-self: flex-start !important; 
    display: block;
}

.calc-header-section h1 {
    color: var(--primary-90);
    margin-bottom: 10px;
    font-weight: 700;
display: block !important; 
    justify-content: flex-start !important; /* Na wszelki wypadek */
    max-width: 100% !important; /* Rozciągnij na całość */
    width: 100% !important;
    margin: 0 0 10px 0 !important; /* Resetuje globalny margin: 0 auto - to jest kluczowe! */
    text-align: left !important;
}

.calc-header-section h1::after {
    content: none;
    display: none;
}

.calc-header-section p {
    color: var(--primary-60);
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 300; /* Odchudzenie tekstu */
    max-width: 800px;
}

/* Instrukcja - Wersja Lekka */
.instruction-light {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--primary-60);
}
.instruction-step {
    display: flex;
    align-items: center;
    gap: 8px;
}
.instruction-step span {
    background: var(--primary-10);
    color: var(--primary-60);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Karta formularza */
.calc-card {
    background: var(--primary-white);
    border: 1px solid var(--primary-20);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: 0 5px 20px rgba(18, 16, 48, 0.05);
    margin-bottom: 40px;
}

/* Pola formularza */
.room, .subtract-area {
    background: var(--primary-1);
    border: 1px solid var(--primary-10);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 25px;
}

.room-header, .subtract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--primary-20);
    padding-bottom: 10px;
}

.room-header h3, .subtract-header h3 {
    color: var(--primary-80);
    margin: 0;
    font-size: 1.1rem;
}

/* Inputy */
.input-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--primary-70);
    font-weight: 500;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px; /* Trochę mniejszy padding dla zgrabności */
    border: 1px solid var(--primary-25);
    border-radius: var(--radius);
    background: var(--primary-white);
    font-size: 1rem;
    color: var(--primary-90);
    transition: 0.2s;
    height: 48px; /* Sztywna wysokość dla równości */
}

.input-group input:focus {
    border-color: var(--primary-50);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-30);
}

/* Styl dla listy rozwijanej (SELECT) */
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--primary-25);
    border-radius: var(--radius);
    background: var(--primary-white);
    font-size: 1rem;
    color: var(--primary-90);
    transition: 0.2s;
    height: 48px;
    cursor: pointer;
    /* Opcjonalnie: usunięcie domyślnego stylu przeglądarki, jeśli chcesz własną strzałkę */
    /* appearance: none; */ 
}

.input-group select:focus {
    border-color: var(--primary-50);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-20);
}

/* Micro-copy (Tekst pomocniczy pod inputem) */
.input-helper {
    display: block;
    font-size: 0.85rem;
    color: #6d6d6d; /* Szary, neutralny */
    margin-top: 5px;
    font-weight: 400;
}

/* Przyciski Akcji (Dodaj/Odejmij) */
.button-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Równe kolumny */
    gap: 20px;
    margin-top: 15px;
}

.btn-add, .btn-subtract {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-white);
    border: 1px solid var(--primary-30); /* Solidniejsza ramka */
    color: var(--primary-60);
    padding: 12px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    height: 50px; /* Identyczna wysokość */
    font-size: 0.95rem;
}

.btn-add:hover, .btn-subtract:hover {
    background: var(--primary-10);
    border-color: var(--primary-50);
    color: var(--primary-80);
}

.btn-remove {
    background: none;
    border: none;
    color: #d63031;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Przycisk Główny */
.btn-main-calc {
    background: var(--primary-50);
    color: var(--primary-white);
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius);
    cursor: pointer;
    transition: 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%; /* Na mobile szeroki */
    max-width: 400px; /* Na desktopie zgrabny */
    display: block;
    margin: 0 auto;
}

.btn-main-calc:hover {
    background: var(--primary-60);
    box-shadow: 0 5px 15px var(--primary-30);
}

/* --- NOWA SEKCJA WYNIKÓW (STANDARD) --- */
#results-container {
    background: var(--primary-white);
    border: 5px solid var(--primary-50);
    border-radius: var(--radius);
    padding: 40px;
    margin-top: 40px;
    color: var(--primary-90);
    animation: fadeIn 0.5s ease-in-out;
    position: relative;
    box-shadow: 0 10px 30px rgba(18, 16, 48, 0.05);
}

/* Nagłówek wyników */
.results-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--primary-20);
    padding-bottom: 15px;
}

.results-header h3 {
    color: var(--primary-80);
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Główny Box z Wynikiem (Highlight) */
.result-highlight-box {
    background: var(--primary-50);
    color: var(--primary-white);
    padding: 30px 20px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(102, 93, 162, 0.3);
    transition: transform 0.2s;
}

.result-highlight-box:hover {
    transform: translateY(-3px);
}

.result-highlight-label {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.result-highlight-value {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
}

/* Grid dla wyników szczegółowych */
.results-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.result-detail-item {
    background: var(--primary-1);
    padding: 15px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--primary-10);
    transition: 0.2s;
}

.result-detail-item:hover {
    border-color: var(--primary-30);
    background: var(--primary-white);
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    color: var(--primary-60);
    margin-bottom: 5px;
}

.detail-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-90);
}

/* Guzik Drukowania */
.btn-print {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    color: var(--primary-50);
    border: 2px solid var(--primary-50);
    padding: 10px 25px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    margin: 0 auto;
    width: auto;
}

.btn-print:hover {
    background: var(--primary-50);
    color: var(--primary-white);
    box-shadow: 0 5px 15px rgba(102, 93, 162, 0.2);
}

.btn-print svg {
    fill: currentColor;
    width: 18px;
    height: 18px;
}

/* Responsywność */
@media (max-width: 600px) {
    #results-container { padding: 25px; border-width: 3px; }
    .result-highlight-value { font-size: 2.8rem; }
    .results-details-grid { grid-template-columns: 1fr 1fr; }
}

/* SEO Content */
.seo-content-style {
    margin-top: 60px;
    color: var(--primary-80);
    line-height: 1.8;
    font-size: 1.05rem;
}
.seo-content-style h2 {
    color: var(--primary-90);
    padding-bottom: 10px;
    font-weight: 600;
    margin-top: 40px;
}

.room-header h3 {
    color: var(--primary-50);
    font-weight: 800;
}

/* KAFELKI (Lista) */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 30px; margin-top: 40px; }
.calc-card-list { background: var(--primary-white); border: 1px solid var(--primary-20); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s; display: flex; flex-direction: column; }
.calc-card-list:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: var(--primary-40); }

.calc-card-list p{
    margin-top: 15px;
}


/* Błędy */
.error { color: #ff6b6b; font-size: 0.8rem; margin-top: 4px; }

/* === MOBILE FIX === */
@media (max-width: 768px) {
    .calc-card {
        padding: 20px; /* Mniejszy padding wewnętrzny */
    }
    .input-container {
        grid-template-columns: 1fr; /* Jedna kolumna inputów */
        gap: 20px;
    }
    .button-container {
        grid-template-columns: 1fr; /* Guziki jeden pod drugim */
    }
    .result-row {
        font-size: 1rem;
    }
    .result-value {
        font-size: 2.5rem;
    }
    .block2 h1 {
        font-size: 1.8rem; /* Mniejszy nagłówek */
    }
}

@media print {
    body * {
        visibility: hidden; 
    }
    #results-container, #results-container * {
        visibility: visible;
    }
    #results-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        border: none;
        box-shadow: none;
    }
    .no-print {
        display: none !important;
    }
}


/* --- MENU KATEGORII --- */
.calc-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.calc-nav-link {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    background: var(--primary-white);
    color: var(--primary-60);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--primary-20);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.calc-nav-link:hover {
    border-color: var(--primary-40);
    color: var(--primary-80);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.calc-nav-link.active {
    background: var(--primary-50);
    color: var(--primary-white);
    border-color: var(--primary-50);
    box-shadow: 0 5px 15px rgba(102, 93, 162, 0.3);
}

/* Dostosowanie na mobile */
@media (max-width: 600px) {
    .calc-nav {
        gap: 10px;
    }
    .calc-nav-link {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}


