/* Import navbar and footer styles */
@import url("../../styles.css");

/* Základní styly pro kalkulačku */
.calculator-background {
    width: 100%;
    background-color: #104788;
    padding: 60px 0; /* Optional padding for spacing above and below */
}

.calculator-container {
    max-width: 900px;
    margin: auto;
    padding: 20px;
    background: #f9f9f9; /* Keeps the internal box color */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.calculator-box {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.input-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap; /* Přidáno pro zajištění přizpůsobení na menších obrazovkách */
}

.input-group {
    flex: 1;
    margin: 0 15px;
    min-width: 250px; /* Minimální šířka pro lepší přizpůsobení */
}

.input-group label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 1.4em;
}

/* Styl pro číselné vstupy bez rámečku a s modrou barvou */
input[type="text"] {
    background: none;
    border: none;
    color: #104788;
    font-weight: bold;
    font-size: 1.4em;
    text-align: center;
    pointer-events: none;
}

#last-name[type="text"],
#first-name[type="text"] {
    background: white;
    pointer-events: auto;
}

input[type="email"],
input[type="tel"] {
    color: #104788;
    font-weight: bold;
    font-size: 1.4em;
    text-align: center;
}

.form-group textarea {
    font-family: 'Fjalla One', sans-serif; /* Přidáno sans-serif fallback */
    font-size: 1.4em;
}

/* Styl pro posuvníky */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: linear-gradient(to right, #104788, #67c2ef);
    height: 6px;
    margin-top: 10px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #104788;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #104788;
    cursor: pointer;
}

/* Styl pro číselné hodnoty pod posuvníkem fixace */
.fixation-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #104788;
    margin-top: 5px;
}

/* Styl pro chybovou zprávu */
.error-message {
    margin-top: 15px;
    padding: 10px;
    background-color: #f8d7da; /* Světle červené pozadí */
    color: #721c24; /* Tmavě červený text */
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    font-size: 1.2em;
    text-align: center;
}

/* Styl pro LTV Warning */
.ltv-warning {
    color: red;
    font-weight: bold;
    margin-top: 10px;
    display: none; /* Hide initially */
}

/* Styl pro modální okno */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto; /* Umožňuje scrollování, pokud je obsah modalu příliš vysoký */
    z-index: 2000; /* Vyšší z-index než footer a navbar */
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 1300px;
    text-align: left;
    position: relative;
    max-height: 90vh; /* Omezení výšky modalu */
    overflow-y: auto; /* Povolení scrollování v rámci modalu */
}

.modal-left, .modal-right {
    width: 48%; /* Rozdělení prostoru mezi levý a pravý sloupec */
}

.modal-left h2, .modal-right h2 {
    font-size: 1.5em;
    color: #104788;
    margin-bottom: 15px;
}

.modal-left p, .modal-left #modal-result {
    font-size: 1.1em;
    color: #333;
}

.modal-left #modal-result {
    margin-top: 20px;
}

.modal-right form {
    display: flex;
    flex-direction: column;
}

.modal-right .form-row {
    display: flex;
    justify-content: space-between;
}

.modal-right .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.modal-right .form-group.full-width {
    flex: 1;
    margin: 0 10px 20px 10px;
}

.modal-right .form-group label {
    font-weight: bold;
    font-size: 1em;
}

.modal-right .form-group input,
.modal-right .form-group textarea {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

.modal-right .form-group input:focus,
.modal-right .form-group textarea:focus {
    border-color: #104788;
    outline: none;
}

.modal-right .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

button {
    padding: 14px 28px;
    background-color: #104788;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.3em;
    transition: background-color 0.3s;
}

button.calculate:hover {
    background-color: #082e5d;
}

#modal-result {
    background-color: #f9f9f9;
    border: 2px solid #104788;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.4em;
    font-weight: bold;
    color: #104788;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
}

#modal-result span {
    display: block; /* Oddělení textu měsíční splátky od hodnoty */
    font-size: 1.2em;
    color: #333; /* Tmavší text pro menší části */
}

/* Styl pro modální okno */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto; /* Umožňuje scrollování, pokud je obsah modalu příliš vysoký */
    z-index: 2000; /* Vyšší z-index než footer a navbar */
}

.modal.show {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 1300px;
    text-align: left;
    position: relative;
    max-height: 90vh; /* Omezení výšky modalu */
    overflow-y: auto; /* Povolení scrollování v rámci modalu */
}

.modal-left, .modal-right {
    width: 48%; /* Rozdělení prostoru mezi levý a pravý sloupec */
}

.modal-left h2, .modal-right h2 {
    font-size: 1.5em;
    color: #104788;
    margin-bottom: 15px;
}

.modal-left p, .modal-left #modal-result {
    font-size: 1.1em;
    color: #333;
}

.modal-left #modal-result {
    margin-top: 20px;
}

.modal-right form {
    display: flex;
    flex-direction: column;
}

.modal-right .form-row {
    display: flex;
    justify-content: space-between;
}

.modal-right .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin: 0 10px;
}

.modal-right .form-group.full-width {
    flex: 1;
    margin: 0 10px 20px 10px;
}

.modal-right .form-group label {
    font-weight: bold;
    font-size: 1em;
}

.modal-right .form-group input,
.modal-right .form-group textarea {
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

.modal-right .form-group input:focus,
.modal-right .form-group textarea:focus {
    border-color: #104788;
    outline: none;
}

.modal-right .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

button[type="submit"] {
    padding: 16px 32px;
    background-color: #104788;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.3em;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: #082e5d;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

/* Footer styly */
.site-footer {
    width: 100%;
    background-color: #104788;
    color: white;
    text-align: center;

    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;

    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1000; /* Nižší než modal */
}

/* Navigace */
.desktop-nav {
    display: block;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 70px; /* Posunutí níže, aby nepřekrývalo hamburger tlačítko */
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1500; /* Aby bylo nad footerem, ale pod modalem */
    padding-top: 10px; /* Přidáno pro lepší rozestup */
}

.hamburger {
    display: none;
    font-size: 2em;
    background: none;
    border: none;
    cursor: pointer;
    color: black; /* Změněno z white na black */
}

.hamburger:hover {
    color: black; /* Odstraněna modrá barva na hover */
}

/* Media Queries pro mobilní optimalizaci */
@media (max-width: 1200px) {
    .input-group {
        margin: 0 10px;
    }

    .modal-left, .modal-right {
        width: 48%;
    }
}

@media (max-width: 768px) {
    /* Úpravy pro tablety a menší obrazovky */

    /* Skrytí desktop navigace a zobrazení hamburger menu */
    .desktop-nav {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .mobile-nav.active {
        display: block;
        margin-top: 1em;
    }

    /* Přizpůsobení input-row */
    .input-row {
        flex-direction: column;
        align-items: center;
    }

    .input-group {
        margin: 10px 0;
        width: 90%;
        max-width: 400px;
    }

    /* Přizpůsobení kalkulačky */
    .calculator-container {
        padding: 10px;
    }

    .calculator-box {
        padding: 20px;
    }

    /* Přizpůsobení modálního okna */
    .modal-content {
        flex-direction: column;
        width: 95%;
        max-width: none;
    }

    .modal-left, .modal-right {
        width: 100%;
        margin-bottom: 20px;
    }

    .modal-left h2, .modal-right h2 {
        font-size: 1.3em;
    }

    .modal-left p, .modal-left #modal-result,
    .modal-right form {
        font-size: 1em;
    }

    /* Přizpůsobení formuláře v modalu */
    .modal-right .form-row {
        flex-direction: column;
    }

    .modal-right .form-group {
        margin: 10px 0;
    }

    /* Přizpůsobení footeru */
    .site-footer {
        position: relative; /* Změna na relative pro mobilní zobrazení */
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .footer-item {
        margin: 10px 0;
    }

    .social-links {
        flex-direction: row;
        justify-content: center;
        margin-top: 10px;
    }

    .social-links a {
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    /* Úpravy pro mobilní telefony */

    /* Přizpůsobení loga */
    .logo img {
        width: 8em;
    }

    /* Přizpůsobení navigace */
    .nav-links {
        font-size: 0.9em;
    }

    /* Přizpůsobení sociálních ikon */
    .social-links img {
        width: 30px;
    }

    /* Přizpůsobení titulku kalkulačky */
    .contact-container h2,
    .calculator-container h1 {
        font-size: 1.5em;
    }

    /* Přizpůsobení posuvníků */
    input[type="range"] {
        height: 4px;
    }

    input[type="range"]::-webkit-slider-thumb,
    input[type="range"]::-moz-range-thumb {
        height: 16px;
        width: 16px;
    }

    /* Přizpůsobení modálního okna */
    .modal-left h2, .modal-right h2 {
        font-size: 1.2em;
    }

    .modal-left p, .modal-left #modal-result,
    .modal-right form {
        font-size: 0.9em;
    }

    button, button[type="submit"] {
        font-size: 1.1em;
        padding: 12px 24px;
    }

    /* Přizpůsobení footeru */
    .footer-content {
        padding: 10px 0;
    }
}
