/* Globálne nastavenia a fonty (rovnaké) */
body {
    font-family: 'Source Sans 3', sans-serif; 
    color: #333;
    line-height: 1.6;
    padding: 10px; 
    margin: 0;
    background-color: #f4f7f9;
}

/* Hlavný kontajner (rovnaké) */
.calculator-container {
    max-width: 850px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Nadpisy (rovnaké) */
h1 {
    /* Použil som h1 namiesto h3, ako je v tvojom kóde */
    font-family: 'Exo 2', sans-serif;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 700;
}

h2 {
    color: #333;
    font-family: 'Exo 2', sans-serif; 
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    font-weight: 700;
}

.intro-text {
    margin-bottom: 25px;
    color: #666;
    font-size: 1.1em;
}

/* --- Rozloženie vstupných polí --- */
.input-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.input-block {
    display: flex;
    flex-direction: column;
    /* Všetky bloky sú približne 50% šírky */
    flex: 1 1 calc(50% - 10px); 
}

.input-block label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1em;
}

.input-row-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Vstupné polia a selecty (rovnaké) */
input[type="number"], 
select {
    padding: 10px 12px;
    border: 1px solid #c9d0d6;
    border-radius: 0;
    font-size: 1em;
    height: 40px; 
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="number"]:focus,
select:focus {
    border-color: #EC6C1E;
    outline: none;
    box-shadow: 0 0 0 1px #EC6C1E;
}

/* Nová trieda pre plnú šírku v input-row-group */
.input-full {
    flex: 1 1 100%;
}
.input-half {
    flex: 1 1 60%; /* Ponecháme to na polovicu pre bitrate, aby sa zmestil label */
}

.unit-label {
    white-space: nowrap;
    color: #666;
    font-size: 0.95em;
    padding: 0; 
    margin: 0 5px 0 0;
    flex-shrink: 0;
}
.hidden {
    display: none !important; /* Pre skrývanie/zobrazovanie Bitrate/Rozlíšenia */
}

/* --- Odhadované náklady (Sumárna sekcia - rovnaké) --- */
hr {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin: 30px 0;
}

.summary-results {
    background-color: #fef8f4;
    border: 1px solid #f6d1bc; 
    padding: 20px;
    border-radius: 0;
    display: flex;
    flex-direction: column; /* Zmena na column pre lepšiu čitateľnosť summary textu */
    gap: 10px;
    margin-bottom: 25px;
}
.summary-results p {
    margin: 0;
    font-size: 1.15em;
    color: #333; 
}
.summary-results strong {
    font-weight: 700;
    color: #EC6C1E;
}

/* --- Tabuľka výsledkov (rovnaké) --- */
#resultsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#resultsTable th, 
#resultsTable td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

#resultsTable th:first-child, #resultsTable td:first-child {
    text-align: left;
}

#resultsTable th {
    background-color: #f8f9fa;
    color: #555;
    text-align: center;
    font-weight: 600;
}
#resultsTable td:first-child {
    text-align: left;
}
#resultsTable tbody tr:hover {
    background-color: #f9f9f9;
}

.period-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; 
}

.period-cell .period-input {
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 0;
    width: 50px !important; 
    text-align: center;
    height: 30px;
    font-size: 0.9em;
}

/* *************************************************************** */
/* MEDIA QUERIES (Prispôsobenie pre responzivitu - zjednodušené) */
/* *************************************************************** */

@media (max-width: 768px) {
    .calculator-container {
        padding: 20px;
    }
    .input-block {
        flex: 1 1 100%;
    }
    .input-row-group {
        flex-wrap: wrap;
    }
    .input-full, .input-half {
        flex: 1 1 100%; /* Všetky inputy na plnú šírku na mobile */
    }
    .unit-label {
        flex: 1 1 100%; /* Label pod input na mobile */
        text-align: left;
    }
}