/* styles.css */

/* Yleisasettelu */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1040px;
    margin: 20px auto;
    margin-left: 160px; /* Säilytetään marginaali vasemmalla */
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block; /* Pakotetaan elementti blokkitasolle */
    width: calc(100% - 180px); /* Asetetaan leveys ja otetaan huomioon marginaali vasemmalla */
    position: relative;
     transition: margin 0.3s ease; /* Lisää siirtymä */
}

h1 {
    font-size: 18px;
    margin-bottom: 10px;
    text-align: center;
}

#calendar {
    display: grid;
    grid-template-columns: 1fr repeat(7, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.header {
     display: contents;
}

.header .day {
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
    background-color: #e9ecef;
    color: rgb(0, 0, 0);
    border-radius: 4px;
}


.header .week-input {
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
    background-color: #e9ecef;
    color: rgb(0, 0, 0);
     border-radius: 4px;
    
}
.header .week-input input {
    padding: 5px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 20px;
    text-align: center;
}
.header .week-input input::-webkit-outer-spin-button,
.header .week-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.header .week-input .day-number {
   display: block;
    margin-top: 2px;
     font-size: 0.8rem;
    color: #6c757d;
    font-weight: normal;
    margin-left: 0;
    white-space: nowrap;
    text-align: center;
}
.header .week-input label {
  white-space: nowrap; /* Estää labelin rivittymisen */
  margin-right: 2px;
}
.calendar-header-buttons{
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.calendar-header-buttons .day-number {
   margin-left: 10px;
     font-size: 0.8rem;
    color: #6c757d;
    font-weight: normal;
     white-space: nowrap;
}

.header .empty-cell {
    background: transparent;
}

.rows {
    display: contents;
}

.time {
    font-weight: bold;
    text-align: center;
    padding: 10px 0;
    background-color: #e9ecef;
    border-radius: 4px;
}

.dropzone {
    min-height: 80px;
    border: 1px dashed #ced4da;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: background-color 0.3s;
    position: relative;
}

.dropzone:hover {
    background-color: #e2e6ea;
}

#workouts {
    margin-top: 10px;
}

/* Harjoitukset rivit */
.workout-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    flex-wrap: wrap;
    gap: 2px;
}

.workout-row h3 {
    flex-basis: 100%;
    font-size: 18px;
    margin-bottom: 2px;
}

/* Harjoitukset */
.workout {
    background-color: #007bff;
    color: white;
    padding: 8px;
    margin: 2px;
    border-radius: 2px;
    cursor: grab;
    text-align: center;
    font-size: 12px;
    width: 100px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow: hidden;
}

.workout:hover {
    background-color: #0056b3;
}

/* Kuormitusrivin tyylit */
.kuormitus {
    min-height: 20px;
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    border-radius: 4px;
    text-align: center;
    line-height: 40px;
    font-size: 14px;
    color: #6c757d;
    font-weight: bold;

}

/* Toggle-nappi */
#toggleNavbarLeft {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 18px;
    z-index: 1001;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleNavbarLeft:hover {
    background-color: #0056b3;
}

/* Navigointipalkki */
#navbarLeft {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 150px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    transform: translateX(-150px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

#navbarLeft.visible {
    transform: translateX(0);
}


#toggleNavbarRight {
    position: fixed;
     top: 10px;
    right: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 18px;
    z-index: 1001;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#toggleNavbarRight:hover {
    background-color: #0056b3;
}

#navbarRight {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
     width: 150px;
    background-color: #f8f9fa;
    border-left: 1px solid #ddd;
    overflow-y: auto;
    transform: translateX(150px);
    transition: transform 0.3s ease;
    z-index: 1000;
    margin: 0; /* Poista mahdolliset marginaalit */
    padding: 0; /* Poista mahdolliset paddingit */
}

#navbarRight.visible {
    transform: translateX(0);
}

/* Navigointipalkin sisältö */
#navbarContentLeft {
    padding: 10px;
}

#navbarContentLeft h3 {
    margin: 15px 0 10px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}


#navbarContentRight {
    padding: 10px;
    display: flex;
    flex-direction: column; /* Buttons stacked */
    gap: 10px; /* Spacing between buttons */
}


#navbarContentRight h2{
  margin: 15px 0 10px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}


#closeCalendar {
  position: absolute; /* Asetetaan absoluuttisesti */
    top: 10px;        /* Etäisyys yläreunasta */
    right: 10px;      /* Etäisyys oikeasta reunasta */
    background-color: red;  /* Punainen taustaväri */
    color: white;        /* Valkoinen teksti */
    border: none;        /* Ei reunusta */
    border-radius: 50%;  /* Pyöreä muoto */
    width: 20px;          /* Leveys */
    height: 20px;         /* Korkeus */
    display: flex;        /* Keskitetään sisältö */
    align-items: center;  /* Pystysuoraan keskitys */
    justify-content: center;/* Vaakasuoraan keskitys */
    cursor: pointer;     /* Osoitin muuttuu kädeksi */
    font-size: 14px;     /* Tekstin koko */
    line-height: 1;        /* Pienentää riviväliä */
    padding: 0;          /* Poistaa sisätyhjät */
    z-index: 100;          /* Varmistaa näkymisen */
}

#closeCalendar:hover {
  background-color: darkred;  /* Tummempi punainen hoverilla */
}