/* Yleiset tyylit */

body {
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
  padding: 2rem;
  line-height: 1.6;
  background-color: #f0f2f5; /* Vaaleampi tausta lomakkeelle */
  color: #333;
}


/* Kontti elementeille (lomake ja tulostussivu) */
.container {
    max-width: 800px;
    margin: 2rem auto;
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card.instructions-section {
    text-align: center; /* Keskittää kaiken tekstin ja inline-sisällön tämän divin sisällä */
    /* Muut olemassa olevat tyylit, esim. padding, background-color jne. */
}
/* Readonly-kentät tavallisella taustalla */
.form-inputMika {
  background-color: white;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 16px;
  border-radius: 4px;
  color: #666;
  cursor: default;
}
/* Syöttökentät, joihin voi kirjoittaa, ovat keltaisia */
.form-inputMika:not([readonly]) {
  background-color: yellow;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 16px;
 border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); /* Kevyt punainen varjo */
}


/* Otsikot */
h1 {
    text-align: center;
    color: #004a80;
    margin-bottom: 2.5rem;
}

h2 {
    color: #005fa3;
    margin-top: 2rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

/* Lomakekenttien ryhmittely */
.form-group {
    margin-bottom: 1.5rem;
}

/* Otsikot lomakekentille */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #005fa3;
}

/* Ohjeteksti lomakekentän alla */
.instruction-text {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 0.75rem;
    display: block; /* Varmista, että tulee omalle rivilleen */
}

/* Tekstikentät */
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Sisältää paddingin leveyteen */
    min-height: 100px; /* Vähimmäiskorkeus tekstikentille */
    resize: vertical; /* Sallii käyttäjän muuttaa korkeutta */
}

/* Painikkeiden kontti */
.button-container {
    text-align: center;
    margin-top: 3rem;
}

/* Yleiset painikkeet (lomakkeen lähetys, tulosta, takaisin) */
/* Yleiset painikkeet (lomakkeen lähetys, tulosta, takaisin) */
button {
  padding: 12px 25px;
  font-size: 17px;
  background-color: #027737; /* Yleinen vihreä  tausta */
  color: white;
  border: none; /* Ei oletuskehystä */
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease; /* transitioneihin voit palata myöhemmin */
  margin: 0 10px; /* Lisää hieman tilaa painikkeiden väliin */
}

button:hover {
  background-color: #005fa3; /* Yleinen tummempi sininen hoverissa */
}

//* Tyyli napit järjestykseen divissa */
.mikanbuttonboxi {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.mikan_button_boxi button {
    display: inline-block;
    width: auto;
}
/* Nappi useampi nappi samaan diviin */
/* Yleinen nappityyli */
.mikanSakkyNappi {
    background-color: #2d72bd; /* sininen */
    color: #fff; 
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    width: auto;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease,
                box-shadow 0.2s ease, transform 0.2s ease;
}

/* Yleinen hover: Keltainen tausta, sininen teksti */
.mikanSakkyNappi:hover {
    background-color: #f7d31b; /* keltainen hover */
    color: #2d72bd;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.mikanSakkyNappi:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

/* --- Sulje-napin erikoiskäsittely --- */

/* Annetaan Sulje-napille harmaa perusväri, mutta käytetään mikanSakkyNappi-tyyliä pohjana */
.suljeNappi {
    color: #fff;
}

/* Kohdennus: Sulje-nappi, kun hiiri on päällä (HOVER): PUNAISEN VÄRITYKSEN KORJAUS */
.suljeNappi:hover {
    background-color: #dc3545; /* Punainen hover-tilassa */
    color: #fff; /* Valkoinen teksti */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

/* Jotta active-tila perii muun, paitsi punaisen taustan */
.suljeNappi:active {
     background-color: #b02a37; /* Hieman tummempi punainen painettaessa (antaa 'painetun' fiiliksen) */
}
/* Nappi venyy 100 % diviin - yksi nappi riville */
.mikanSakkyNappi2 {
    background-color: #2d72bd; /* sininen */
    color: #fff;              /* valkoinen teksti */
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;

    /* Siistimpi hover- ja click-efekti */
    transition: background-color 0.3s ease, color 0.3s ease,
                box-shadow 0.2s ease, transform 0.2s ease;
}
.mikanSakkyNappi2:hover {
    background-color: #f7d31b;
    color: #2d72bd;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.mikanSakkyNappi2:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}


/* MikaKalpaFaniNappi -painikkeiden tyyli (musta-keltainen) */
.MikaKalpaFaniNappi {
  /* Nämä ominaisuudet ylikirjoittavat yllä olevat 'button'-säännön, jos luokkaa käytetään */
  background-color: black; /* KalPa-musta tausta */
  color: yellow; /* KalPa-keltainen teksti */
  border: 2px solid yellow; /* Keltainen kehys, 2px paksu */
  /* padding, font-size, border-radius, cursor ja margin voivat periä yllä olevasta button-säännöstä, 
     jos ne ovat samat, tai voit määrittää ne uudelleen tähän, jos ne ovat erilaisia.
     Tässä esimerkissä ne säilyvät samoina kuin yleisessä button-säännössä, mutta voit lisätä ne. */
  
  /* Varmista, että siirtymät ovat tässä mukana, jos ne ovat erilaiset kuin yleiset */
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.MikaKalpaFaniNappi:hover {
  background-color: #333; /* Hieman vaaleampi musta hoverissa */
  color: white; /* Valkoinen teksti hoverissa */
  border-color: #eee; /* Vaaleampi keltainen/harmaa kehys hoverissa */

}

/* MikaMujuLogo - KalPa-henkinen tyyli otsikolle tai tekstille */
.MikaMujunenLogo {
  display: inline-block;
  padding: 2px 5px;
  background-color: transparent;
  color: black;
  border: 1px solid yellow; /* Alkuperäinen keltainen kehys */
  border-radius: 3px;
   font-family: 'Montserrat', sans-serif; /* Käytetään samaa fonttia kuin muualla */
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: lowercase;/*pikku fontilla kivempi ja lempeäämpi */ 
  letter-spacing: 0.2px;
  box-shadow: 0 0 15px yellow,
              0 0 10px rgba(255, 255, 0, 0.3);
  text-decoration: none;
  transition: all 0.3s ease;
}

.MikaMujunenLogo:hover {
  background-color: rgba(255, 255, 0, 0.1);
  color: #333;
  border-color: #FFFF00; /* **Puhdas, kirkas keltainen reuna** */
  box-shadow:
    0 0 40px #FFFF00, /* **Voimakas, kirkas perushehku** */
    0 0 40px rgba(255, 255, 0, 0.9), /* **Intensiivisempi ja laajempi hehku** */
    0 0 60px rgba(255, 255, 0, 0.7), /* **Lisää "häikäisyä" laajemmalle alueelle** */
    0 0 200px rgba(255, 255, 0, 0.5); /* **Laaja, valoisa halo, joka muistuttaa auringon heijastusta** */
  transform: translateY(-1px);
}

/* Lisäohjeita-painikkeet */
.help-button {
    background-color: #6c757d; /* Harmaa väri */
    font-size: 0.9rem;
    padding: 8px 15px;
    margin-top: 0.5rem; /* Hieman tilaa tekstikentän ja napin väliin */
    margin-bottom: 1rem; /* Hieman tilaa seuraavaan kenttään */
    display: inline-block; /* Jotta ei vie koko leveyttä */
}

.help-button:hover {
    background-color: #5a6268;
}

/* Video-painike */
.video-button {
    background-color: #dc3545; /* Punainen väri */
    margin-top: 1.5rem; /* Hieman tilaa lähetysnapista */
    display: inline-block; /* Tehdään napista inline-lohko */
    padding: 15px;
    font-size: 1rem; /* Pienennetty fonttikoko */
    margin: 0 auto; /* Keskittää napin, jos se on yksinään */
}

.video-button:hover {
    background-color: #c82333;
}

/* Alatunniste */
footer {
    margin-top: 4rem;
    font-size: 0.9rem;
    text-align: center;
    color: #666;
}

footer a {
    color: #007acc;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Erityistyylit tulostussivun tekstikappaleille */
p {
    margin-bottom: 1rem;
    white-space: pre-wrap; /* Säilyttää rivinvaihdot */
}

/* Selitysteksti kenttien alla (tulostussivulla, jos sitä käytettäisiin) */
.field-description {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Taustaväri tulostussivulle (hieman erilainen kuin lomakkeella) */
body.result-page {
    background-color: #f8f8f8;
}

/* Modaali-ikkunan tyylit (vain tekstimodaliin liittyvät) */
.modal {
    display: none; /* Piilotettu oletuksena */
    position: fixed; /* Pysyy paikallaan skrollatessa */
    z-index: 1000; /* Päälle kaiken muun */
    left: 0;
    top: 0;
    width: 100%; /* Koko leveys */
    height: 100%; /* Koko korkeus */
    overflow: auto; /* Mahdollistaa skrollauksen, jos sisältö on liian suuri */
    background-color: rgba(0,0,0,0.4); /* Tumma, läpinäkyvä tausta */
    align-items: center; /* Keskittää pystysuunnassa */
    justify-content: center; /* Keskittää vaakasuunnassa */
}

/* Uusi luokka modaalin näyttämiseen */
.modal.is-active {
    display: flex; /* Näytä flexboxina, kun aktiivinen */
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Keskittää modaalin */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Leveys */
    max-width: 500px; /* Maksimileveys */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative; /* Tarvitaan sulkemispainikkeen sijoitteluun */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    z-index: 1001; /* Varmista, että sulkemisnappi on sisällön päällä */
    background-color: rgba(255, 255, 255, 0.7); /* Tausta, jotta näkyy selkeästi */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    color: #005fa3;
    margin-top: 0;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 0;
}

.disclaimer-text { /* Tyyli disclaimer-tekstille */
    font-size: 0.8em;
    color: #888;
    text-align: center;
    margin-top: 2rem;
    font-style: italic;
}
.visitor-count-text {
    text-align: center;
    margin-top: 2rem;
    font-size: 1rem;
    color: #666;
    font-style: italic;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.hurraa {
    font-weight: bold;
    background-color: #003580; /* Suomen sininen tausta */
    color: white; /* Valkoinen teksti */
    padding: 2px 6px;
    border-radius: 4px;
    animation: pulse 1.5s infinite;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.finland-flag {
  font-size: 1.2em;
  animation: pulse 1.5s infinite;
}

/* Sama pulse-animaatio kuin MikaMujunenLogossa */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}