/* ========================================
   GLOBAL RESET
======================================== */

* {
    box-sizing: border-box;
}


body {
    margin: 0;
    padding: 12px;
    padding-bottom: 170px;

    font-family: Arial, Helvetica, sans-serif;

    background: #f5f5f5;
    color: #222;
}

h1 {
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.1;
}

h2 {
    font-size: 13px;
    margin: 10px 0 6px 0;
    color: #555;
}



/* ========================================
   SEARCH
======================================== */


.searchBox {
    position: relative;
    display: flex;
    align-items: center;
}


#search {
    width: 100%;
    padding: 12px 45px 12px 15px;
    font-size: 16px;
    border-radius: 14px;
    border: 1px solid #ccc;
    background: white;
}


#clearSearch {

    position: absolute;

    right: 8px;

    width: 30px;
    height: 30px;

    padding: 0;

    border-radius: 50%;

    background: #eeeeee;

    color: #555;

    font-size: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: none;

}


#clearSearch:active {
    transform: scale(0.9);
}



#searchSection {
    position: relative;
}

#suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;

    width: 100%;

    background: white;
    border-radius: 12px;
    overflow: hidden;

    box-shadow: 0 5px 15px rgba(0,0,0,0.15);

    z-index: 1000;
}

#suggestions:empty {
    display: none;
}

#suggestions button {
    display: block;

    width: 100%;

    margin: 0;
    padding: 12px 15px;

    border-radius: 0;
    border-bottom: 1px solid #eeeeee;

    background: white;
    box-shadow: none;

    text-align: left;
    font-size: 15px;
    color: #222;
}

#suggestions button:last-child {
    border-bottom: none;
}

#suggestions button:active {
    transform: none;
    background: #f4f4f4;
}



/* ========================================
   BUTTONS
======================================== */


button {

    border: none;

    background: white;

    padding: 10px 12px;

    font-size: 14px;

    margin: 3px;

    border-radius: 10px;

    cursor: pointer;

    box-shadow: 0 2px 5px rgba(0,0,0,0.1);

}



button:active {

    transform: scale(0.97);

}



/* ========================================
   BUTTON CONTAINERS
======================================== */


#favourites {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}


#categories {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
}

#categories button {
    flex: 0 0 auto;
    padding: 9px 12px;
    border-radius: 999px;
    white-space: nowrap;
}


#products {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#products button {
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    min-height: 0;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
}


#quickDates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#quickDates button {
    flex: 0 0 calc(25% - 5px);
    margin: 0;
    padding: 7px 6px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
}



/* Make buttons easier to hit */

#favourites button {
    flex: 0 0 auto;

    margin: 0;
    padding: 8px 10px;

    font-size: 13px;
    font-weight: 700;

    border-radius: 999px;
    white-space: nowrap;
}








/* ========================================
   RESULT CARD
======================================== */


#result {
    position: fixed;
    bottom: 0;
    left: 0;

    width: 100%;
    padding: 10px 14px 18px 14px;

    background: linear-gradient(
        to top,
        rgba(245,245,245,1),
        rgba(245,245,245,0.85),
        rgba(245,245,245,0)
    );

    z-index: 20;
}

.resultCard {
    background: white;

    border-radius: 18px;

    padding: 14px 16px 16px 16px;

    text-align: center;

    box-shadow: 0 -4px 18px rgba(0,0,0,0.18);
}

.resultCard h2 {
    font-size: 16px;
    margin: 0 0 10px 0;

    color: #444;
    font-weight: 800;
}

.daySection {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 5px;
    margin: 0;
}

.day {
    display: inline-block;

    padding: 3px 14px;

    border-radius: 999px;

    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;

    color: white;
}

.date {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;

    margin: 0;
    color: #111;
}

.time {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;

    margin: 0;
    color: #111;
}



/* ========================================
   STICKER DISPLAY
======================================== */

.day {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}



/* Sticker colours */

.day.blue {

    background: #004db1;

}


.day.green {

    background: #02bc43;

}


.day.red {

    background: #ff1c1c;

}


.day.yellow {

    background: #ffee39;

}


.day.brown {

    background: #b38300;

}


.day.orange {

    background: #ff7722;

}


.day.black {

    background: #252525;

}



/* ========================================
   DESKTOP LIMIT
======================================== */


@media (min-width: 600px) {

    body {

        max-width: 600px;

        margin: auto;

    }

}

/* ========================================
   CATEGORY / PRODUCT SEPARATION
======================================== */


#categorySection {

    margin-bottom: 20px;

}


#categories {

    gap: 8px;

}



#categories button {

    background: #eeeeee;

    font-size: 15px;

    padding: 10px 15px;

}

#categories.collapsed {
    display: none;
}



#productSection {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}



#productTitle {
    margin: 10px 0 8px 0;
    font-size: 18px;
    line-height: 1.1;
}



#products {

    gap: 10px;

}



#products button {
    padding: 12px 14px;
    min-height: 0;
    font-size: 15px;
    border-radius: 12px;
}