/* =========================================================
   GRUNNLEGGENDE
   ========================================================= */

body {
    margin: 0;
    padding: 20px;
    box-sizing: border-box;

    height: 100vh;

    background: #111;
    color: white;

    font-family: Arial, sans-serif;
    text-align: center;

    overflow: hidden;
}


/* =========================================================
   KLOKKE
   ========================================================= */

.header {
    height: 80px;
    text-align: center;
    margin-bottom: 15px;
}

#clock {
    font-size: 65px;
    line-height: 1;
    font-weight: 300;
}

#date {
    font-size: 22px;
    margin-top: 8px;
    opacity: 0.7;
}


/* =========================
   VÆR
   ========================= */

.weather-panel {
    height: 30vh;
    margin-bottom: 15px;
    overflow: hidden;
}

.weather-place {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 5px;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.weather-main-icon {
    font-size: 65px;
}

.weather-temperature {
    font-size: 65px;
    font-weight: bold;
}

.weather-info {
    font-size: 20px;
    margin-top: 8px;
}

.weather-title {
    font-size: 21px;
    margin-top: 18px;
    margin-bottom: 8px;
}

.hourly-weather {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.weather-hour {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 17px;
}

.weather-time {
    font-size: 16px;
    opacity: 0.7;
}

.weather-icon {
    font-size: 32px;
}

.weather-temp {
    font-size: 21px;
    font-weight: bold;
}

.weather-hour span {
    white-space: nowrap;
}


/* =========================
   NEDRE DEL
   ========================= */

.bottom {
    height: calc(100vh - 20px - 80px - 15px - 30vh - 15px - 20px);

    display: grid;

    grid-template-columns: 40% 60%;

    gap: 15px;

    min-height: 0;
}


/* =========================================================
   PANELER
   ========================================================= */

.panel {
    background: #222;

    padding: 20px;

    border-radius: 15px;

    box-sizing: border-box;

    overflow: hidden;
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 15px;
}


/* =========================================================
   KALENDER
   ========================================================= */

.calendar-panel {
    overflow: hidden;
}

#calendar {
    height: calc(100% - 50px);
    overflow: hidden;
}

.calendar-event {
    display: grid;
    grid-template-columns: 100px 70px 1fr;

    gap: 10px;

    padding: 12px 0;

    border-bottom: 1px solid #444;

    text-align: left;
}

.calendar-date {
    font-weight: bold;
}

.calendar-time {
    opacity: 0.8;
}

.calendar-title {
    font-weight: bold;
}


/* =========================================================
   UKEPLAN
   ========================================================= */

.plan-panel {
    overflow: hidden;
}

#weekly-plan {
    height: calc(100% - 50px);

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    overflow: hidden;

    position: relative;
}


/* Navn på barnet */

.weekly-plan-header {
    width: 100%;

    font-size: 28px;
    font-weight: bold;

    margin-bottom: 10px;

    flex-shrink: 0;
}


/* Område rundt bildet */

.weekly-plan-image-wrapper {
    width: 100%;
    height: 100%;

    display: flex;

    align-items: center;
    justify-content: center;

    overflow: hidden;
}


/* Selve ukeplanen */

.weekly-plan-image {
    max-width: 100%;
    max-height: 100%;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 8px;
}


/* Ingen ukeplan */

.plan-placeholder {
    opacity: 0.5;
    font-size: 20px;
}/* =========================
   MOBIL KALENDER
   ========================= */

@media (max-width: 600px) {

    .calendar-event {
        grid-template-columns: 80px 55px 1fr;
        gap: 6px;
        padding: 10px 0;
        font-size: 14px;
    }

    .calendar-date {
        font-size: 13px;
    }

    .calendar-time {
        font-size: 13px;
    }

    .calendar-title {
        font-size: 14px;
        white-space: normal;
        overflow-wrap: break-word;
    }
}@media (max-width: 600px) {

    .bottom {
        grid-template-columns: 1fr;
        height: auto;
    }

    .calendar-panel {
        width: 100%;
    }

    .plan-panel {
        width: 100%;
    }
}/* =========================
   KALENDER SCROLL
   ========================= */

#calendar {
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-event {
    min-width: 400px;
}@media (max-width: 600px) {

    body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .weather-panel {
        height: auto;
        min-height: 300px;
    }

    .bottom {
        height: auto;
        min-height: 0;
    }

    .calendar-panel,
    .plan-panel {
        overflow: visible;
    }

    #calendar,
    #weekly-plan {
        height: auto;
        overflow: visible;
    }
}/* =========================
   UKEPLAN
   ========================= */

.plan-display {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.plan-child {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.plan-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}