/*
// =========================================================================
// plik: /transparentmedicine.eu/public_html/Fenton2025_short/css/style.css


// autor: Marcin Kalisiak
// data: 17.11.2025
// =========================================================================
*/

/* =========================================================
   1. Layout globalny + tło
   ========================================================= */
/*
   html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: sans-serif;
    background: url('../images/tlo.webp') no-repeat center center fixed;
    background-size: cover;
}

body {
    display: grid;
    grid-template-rows: auto 1fr;
}
*/

body {
    /*background-image: url('<?php echo $css_base_path; ?>tlo.webp');*/
    background: url('../images/tlo.webp') no-repeat center center fixed;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* =========================================================
   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 (jeśli używany) */
.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
   ========================================================= */
/* Kontener na wyniki – zewnętrzny box */

.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; /*720px*/
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(4px);
}

/* Ramka opisu / info pod przełącznikiem wykresu */
.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);
}

/* Opis źródła siatki (atrybucja) */
.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;
}

/* Wcięte linie metryk (Fenton / Meta) */
.indented-metric {
    padding-left: 35px;
    margin: 0;
}

/* Kontener na wykres o proporcjach A4 */
#chart-container-for-pdf {
    position: relative;
    aspect-ratio: 1 / 1.414; /* proporcje zbliżone do A4 */
    width: 100%;
    height: auto;
}

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

/* =========================================================
   7. Przycisk pobierania PDF (jeśli używany)
   ========================================================= */
.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
   ========================================================= */
.stopka {
    font-size: 0.9em;
    color: whitesmoke;
    text-shadow: 1px 1px 3px #000;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

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

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


}

.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; }
.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; }
#pomiar-table { table-layout: fixed; width: 100%; border-collapse: collapse; text-align: center; }
#pomiar-table th, #pomiar-table td { border: 1px solid #ddd; padding: 8px; font-size: 0.9em; }
#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; }
.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-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; }
.attribution-text p { font-size: 0.85em; margin: 3px 0; }
#pomiar-table th:nth-child(1), 
#pomiar-table td:nth-child(1) { width: 120px; }
#pomiar-table tbody tr:nth-child(n+2) td[data-type="dob"],
#pomiar-table tbody tr:nth-child(n+2) td[data-type="pca"],
#pomiar-table tbody tr:nth-child(n+2) td[data-metrics] { font-weight: normal !important; font-size: 1.0em !important; }
#pomiar-table input.input-date { height: 30px; padding: 3px 5px; border-radius: 8px; text-align: center; font-weight: normal !important; font-size: 1.0em !important; box-sizing: border-box; border: 1px solid #ccc; width: 100px; }
#pomiar-table input.input-value { width: 70px; height: 30px; padding: 3px 5px; border-radius: 8px; text-align: center; font-weight: normal !important; font-size: 1.0em !important; box-sizing: border-box; border: 1px solid #ccc; }
#pomiar-table input[type="date"] { padding: 3px; border-radius: 6px; box-sizing: border-box; }
#pomiar-table input[type=number]::-webkit-inner-spin-button, 
#pomiar-table input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#pomiar-table input[type=number] { -moz-appearance: textfield; }

.description-block {
    padding: 10px 15px;
    font-size: 1.0em;
    line-height: 1.4;
    text-align: left;
}
