/* =========================================================
   Plik: public_html/app_charts/assets/style.css
   Poprawiony: Stopka i przycisk
   ========================================================= */

   body{
    margin:0;
    padding:0;
    font-family: Arial, sans-serif;
    color: var(--ink);
  
    background-color: #eaf2f9;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
  
    display:flex;
    flex-direction:column;
    min-height:100vh;
  }

/* =========================================================
   2. Nawigacja między wersjami (lewy górny róg)
   ========================================================= */
#navigation-switcher {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-btn-fenton,
.nav-btn-who {
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.85em;
    text-decoration: none;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.2s;
    text-align: center;
    line-height: 1.2;
    width: 250px;
    background-color: #3498DB;
    color: white;
    border: 1px solid #2980B9;
}

.nav-btn-fenton:hover,
.nav-btn-who:hover {
    background-color: #2980B9;
}

/* =========================================================
   3. Przełącznik języka (prawy górny róg)
   ========================================================= */
#language-switcher {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

#language-switcher img {
    width: 30px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    object-fit: cover;
}

#language-switcher img.active {
    opacity: 1.0;
    border: 2px solid #3498db;
    transform: scale(1.05);
}

#language-switcher img:hover {
    opacity: 0.9;
}

/* =========================================================
   4. Główne pudełko z formularzem
   ========================================================= */
.box {
    background-color: rgba(255,255,255,0.75);
    padding: 30px;
    border-radius: 10px;
    width: 500px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    margin: 120px auto 20px auto;
}

h2 {
    text-align: center;
    margin-top: 0;
}

/* Formularz wejściowy */
.data-input-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-group-full {
    grid-column: 1 / -1;
    text-align: center;
}

.form-group-full button {
    padding: 10px 20px;
    font-size: 1.1em;
    cursor: pointer;
}

/* =========================================================
   5. Przycisk główny / przyciski ogólne
   ========================================================= */
button {
    background-color: #28a745;
    color: black;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Komunikat sukcesu */
.komunikat-sukces {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #e0ffe0;
    color: #2d662d;
    border: 2px solid #2d662d;
    padding: 14px 24px;
    border-radius: 10px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    font-size: 1.1em;
    font-weight: 700;
}

/* =========================================================
   6. Blok wyników + wykres
   ========================================================= */
.box_drugi {
    background-color: rgba(255, 255, 255, 0.70);
    padding: 32px 42px;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 720px;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

.info-box {
    background-color: #eef2f7;
    border-left: 5px solid #3498db;
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 1000px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.attribution-box-v2 {
    width: fit-content;
    max-width: 90%;
    margin: 40px auto;
    padding: 20px;
    background-color: white;
    border: 1px solid #ccc;
    border-left: 5px solid black;
    border-radius: 8px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

.attribution-text p {
    font-size: 0.85em;
    margin: 3px 0;
}

.indented-metric {
    padding-left: 35px;
    margin: 0;
}

#chart-container-for-pdf {
    position: relative;
    aspect-ratio: 1 / 1.414;
    width: 100%;
    height: auto;
}

#wykresCentyle {
    display: block;
    width: 100%;
    height: 100%;
}

/* =========================================================
   7. Przycisk pobierania PDF
   ========================================================= */
.download-container {
    text-align: center;
    padding: 20px 0;
}

#downloadBtn {
    display: inline-block;
    width: 40%;
    max-width: 300px;
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    background-color: #28a745;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#downloadBtn:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

#downloadBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* =========================================================
   8. Stopka
   ========================================================= */
.footer {
    font-size: 0.9em;
    color: whitesmoke;
    text-shadow: 1px 1px 3px #000;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.footer .about-btn {
    margin-top: 12px;
    width: auto;
    min-width: 220px;
    display: inline-block;
    background-color: #6e7f90 !important; 
    color: white !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.footer .about-btn:hover {
    background-color: #5a6978 !important;
}

/* =========================================================
   9. Responsywność
   ========================================================= */
@media (max-width: 600px) {
    .box {
        width: 90%;
        margin-top: 100px;
        padding: 20px;
    }

    .nav-btn-fenton,
    .nav-btn-who {
        width: 220px;
        font-size: 0.8em;
    }
}

/* =========================================================
   10. Pozostałe style tabel i layoutu (TUTAJ SĄ ZMIANY)
   ========================================================= */

.box_drugi_2 { 
    max-width: 1200px; 
    width: 95%; 
    background-color: rgba(255, 255, 255, 0.80); 
    padding: 10px; 
    border-radius: 10px; 
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2); 
    margin: 40px auto; 
}

#pomiar-table { 
    table-layout: fixed; 
    width: 100%; 
    border-collapse: collapse; 
    text-align: center; 
}

#pomiar-table th, 
#pomiar-table td { 
    border: 1px solid #ddd; 
    padding: 6px; /* Zmniejszony padding dla ciaśniejszego wyglądu */
    font-size: 0.9em; 
    vertical-align: middle;
}

#pomiar-table thead th { 
    background-color: #f8f9fa; 
}

#pomiar-table tbody tr:nth-child(even) { 
    background-color: #f2f2f2; 
}

#pomiar-table tbody tr:hover { 
    background-color: #e2eefd; 
}

.sub-header th { 
    font-size: 0.8em !important; 
    font-weight: normal !important; 
}

/* --- STYLIZACJA INPUTÓW W TABELI (ABY BYŁY ŁADNE) --- */
#pomiar-table input:not([type="checkbox"]) {
    width: 90%;             /* Nie dotyka krawędzi komórki */
    box-sizing: border-box; /* Padding nie psuje szerokości */
    padding: 6px 8px;       /* Wewnętrzny odstęp */
    border: 1px solid #ccc; /* Delikatna ramka */
    border-radius: 4px;     /* Zaokrąglone rogi - efekt "tabletki" */
    text-align: center;     /* Tekst na środku */
    font-size: 1em;
    font-family: inherit;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#pomiar-table input:not([type="checkbox"]):focus {
    border-color: #3498db;
    box-shadow: 0 0 4px rgba(52, 152, 219, 0.4);
}

/* Usuwanie strzałek (spinnerów) z pól number w Chrome/Safari/Edge */
#pomiar-table input[type=number]::-webkit-inner-spin-button, 
#pomiar-table input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

/* Usuwanie strzałek w Firefox */
#pomiar-table input[type=number] {
  -moz-appearance: textfield;
}

/* Styl dla checkboxa (środek) */
#pomiar-table input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

/* ... reszta styli stopki i atrybucji ... */
.attribution-box-v3 { width: fit-content; max-width: 90%; margin: 40px auto; padding: 20px; background-color: white; border: 1px solid #ccc; border-left: 5px solid #cc0000; border-radius: 8px; box-shadow: 2px 2px 8px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 10px; }
.attribution-text {flex: 1; text-align: center; }

/* Panel O programie */
.program-modal-overlay{ display:none; position:fixed; z-index:9999; left:0; top:0; width:100%; height:100%; overflow:auto; background: rgba(0,0,0,0.55); backdrop-filter: blur(3px); }
.program-modal{ background: #ffffff; margin: 3vh auto; padding: 26px; width: 92%; max-width: 920px; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,0.30); border: 1px solid rgba(0,0,0,0.12); max-height: 92vh; overflow-y: auto; color: var(--ink); line-height: 1.6; }
.program-modal__close{ position: sticky; top: 0; float: right; margin-top: -6px; margin-right: -2px; width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(0,0,0,0.10); background: rgba(255,255,255,0.85); cursor: pointer; display:flex; align-items:center; justify-content:center; font-size: 26px; line-height: 1; color: rgba(31,45,58,0.65); transition: transform .08s ease-out, color .12s ease-out, background .12s ease-out; }
.program-modal__close:hover{ color: rgba(31,45,58,0.95); transform: scale(1.02); background: #fff; }
.program-modal h2{ margin: 0 0 12px 0; padding-bottom: 10px; border-bottom: 1px solid rgba(0,0,0,0.10); color: var(--primary); }
.program-modal h3{ margin: 22px 0 10px 0; color: var(--primary); }
.program-modal h4{ margin: 0 0 10px 0; color: var(--ink-soft); }
.program-section{ background: rgba(47,111,166,0.06); border: 1px solid rgba(47,111,166,0.12); padding: 14px 14px; border-radius: 12px; margin: 12px 0 16px 0; }
.program-section--preterm h4{ color: #2b5f8a; }
.program-section--term h4{ color: #2b7a66; }
.program-modal ul{ padding-left: 22px; margin: 10px 0 16px 0; }
.program-modal .muted{ color: rgba(31,45,58,0.75); }
.program-modal .contact a{ color: var(--primary); text-decoration: none; font-weight: 700; }
.program-modal .contact a:hover{ text-decoration: underline; }