/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

h4 {
    margin-bottom: 1rem !important;
}

body {
    display: flex;
    align-items: center;
    padding: 0 10px;
    justify-content: center;
    min-height: 100vh;
}

.wrapper {
    width: 100vw;
    background: #fff0c5;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.wrapper header {
    display: flex;
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
    justify-content: space-between;
}

.wrapper .School_Logo{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px;
}

header .icons {
    display: flex;
}

header .icons span {
    height: 38px;
    width: 38px;
    margin: 0 1px;
    cursor: pointer;
    color: #878787;
    text-align: center;
    line-height: 38px;
    font-size: 1.9rem;
    user-select: none;
    border-radius: 50%;
}

.icons span:last-child {
    margin-right: -10px;
}

header .icons span:hover {
    background: #f2f2f2;
}

header .current-date {
    font-size: 1.45rem;
    font-weight: 500;
}

.calendar {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 90vh;
    padding: 20px;
}

.calendar ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    text-align: center;
    padding: 0 !important;
}

.calendar .days {
    display: flex;
    flex-wrap: wrap;
    flex: 1 !important;
    margin-bottom: 20px;
}

.calendar li {
    color: #333;
    width: calc(100% / 7);
    font-size: 1.07rem;
}

.calendar .weeks li {
    font-weight: 500;
    cursor: default;
}

.cell {
    align-content: stretch;
    z-index: 1;
    cursor: pointer;
    position: relative;
    border-style: solid;
    border-width: 1px;
    border-color: rgb(201, 201, 201);
    width: calc(100% / 7);
    flex: 1 1 calc(100% / 7);
    border-radius: 5px;
    background-color: #ffe2b7;
}

.cell li {
    font-size: 2.5vh; /* Font size becomes relative to screen height */
    margin: 2px 0;
}

.cell video {
    /* Use a percentage of the cell height, not a fixed width */
    max-height: 60%; 
    width: auto;
    max-width: 90%;
    object-fit: contain;
}

.days li.inactive {
    color: #aaa;
}

.days li.active {
    color: #ffffff;
    background-color: rgb(255, 102, 0);
    border-radius: 10%;
}

@media (max-width: 768px) and (orientation: portrait) {
    /* 1. Force the header to a very slim height */
    .wrapper header {
        padding: 5px 15px !important;
        min-height: 10vh; /* Keeps it strictly to 10% of screen height */
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* 2. Target the nested div you have (class="header") */
    header .header {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* 3. Strip all margins from h4 and p tags */
    header .header h4 {
        font-size: 0.9rem !important;
        margin: 0 !important;
        line-height: 1.1;
    }

    header .current-date {
        font-size: 0.8rem !important;
        margin: 0 !important;
        line-height: 1;
        color: #666;
    }

    /* 4. Shrink the navigation icons */
    header .icons span {
        font-size: 1.2rem !important;
        height: 28px;
        width: 28px;
        line-height: 28px;
        margin: 0 2px;
    }

    /* 5. Shrink the Days-of-the-Week labels too */
    .calendar .weeks li {
        font-size: 0.75rem;
        padding-bottom: 2px;
    }

    .cell li {
        font-size: 1.1rem;
    }
}

#today-btn {
    padding: 5px 15px;
    border: 1px solid rgb(255, 102, 0);
    background: transparent;
    color: rgb(255, 102, 0);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-right: 30px;
}

#today-btn:hover {
    background:rgb(255, 125, 39);
    color: #fff;
}

/* Adjusting the header for mobile */
@media (max-width: 768px) {
    #today-btn {
        padding: 3px 10px;
        font-size: 0.8rem;
    }
}