
/* =========================================================
   ALGEMEEN
   ========================================================= */


/* =========================================================
   DATUMVELD
   ========================================================= */

.date-container {
    position: relative;
    width: 260px;
    max-width: 100%;
}

.date-input-row {
    display: flex;
    width: 100%;
    max-width: 170px;
}

.date-input {
    flex: 1;
    width: 100px;
    height: 44px;
    box-sizing: border-box;
    padding: 0 10px;
    font-size: 17px;
    border: 1px solid #aaa;
    border-radius: 6px 0 0 6px;
    outline: none;
}

.date-input:focus {
    border-color: #4285f4;
}


/* =========================================================
   KALENDERKNOP
   ========================================================= */

.calendar-button {

    width: 48px;
    height: 44px;

    border: 1px solid #aaa;
    border-left: 0;

    border-radius: 0 6px 6px 0;

    background: #f5f5f5;

    cursor: pointer;

    touch-action: manipulation;

    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-button:active {
    background: #ddd;
}


/* =========================================================
   KALENDER ICOON
   Alleen CSS - geen emoji/library
   ========================================================= */

.calendar-icon {

    position: relative;

    display: inline-block;

    width: 22px;
    height: 20px;

    border: 2px solid #555;

    border-radius: 3px;

    box-sizing: border-box;
}

.calendar-icon::before {

    content: "";

    position: absolute;

    left: -2px;
    top: 4px;

    width: 22px;
    height: 2px;

    background: #555;
}

.calendar-icon::after {

    content: "";

    position: absolute;

    left: 4px;
    top: -5px;

    width: 3px;
    height: 7px;

    background: #555;

    box-shadow: 9px 0 0 #555;
}


/* =========================================================
   KALENDER
   ========================================================= */

.calendar {

    display: none;

    position: absolute;

    top: 50px;
    left: 0;

    width: 300px;

    background: white;

    border: 1px solid #bbb;

    border-radius: 8px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.20);

    padding: 12px;

    z-index: 9999;

    box-sizing: border-box;
}

.calendar.open {
    display: block;
}


/* =========================================================
   KALENDER HEADER
   ========================================================= */

.calendar-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;
}

.calendar-title {

    font-size: 17px;
    font-weight: bold;

    text-align: center;

    flex: 1;
}

.month-button {

    width: 42px;
    height: 42px;

    border: 0;

    background: #f0f0f0;

    border-radius: 6px;

    font-size: 22px;

    cursor: pointer;

    touch-action: manipulation;
}

.month-button:active {
    background: #ddd;
}


/* =========================================================
   WEEKDAGEN
   ========================================================= */

.calendar-weekdays,
.calendar-days {

    display: grid;

    grid-template-columns: repeat(7, 1fr);

    gap: 3px;
}

.calendar-weekdays div {

    text-align: center;

    font-size: 12px;

    font-weight: bold;

    padding: 5px 0;

    color: #666;
}


/* =========================================================
   DAGEN
   ========================================================= */

.calendar-day {

    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 5px;

    cursor: pointer;

    font-size: 15px;

    touch-action: manipulation;

    user-select: none;
}

.calendar-day:hover {
    background: #e8f0fe;
}

.calendar-day:active {
    background: #d2e3fc;
}

.calendar-day.today {
    border: 1px solid #4285f4;
}

.calendar-day.selected {
    background: #4285f4;
    color: white;
}

.calendar-day.other-month {
    color: #bbb;
    cursor: default;
}


/* =========================================================
   FOUTMELDING
   ========================================================= */

.date-error {

    display: none;

    margin-top: 5px;

    color: #c00;

    font-size: 13px;
}

.date-error.show {
    display: block;
}


/* =========================================================
   BUTTON
   ========================================================= */

.submit-button {

    padding: 11px 22px;

    font-size: 16px;

    border: 0;

    border-radius: 5px;

    background: #4285f4;

    color: white;

    cursor: pointer;
}

.submit-button:hover {
    background: #3367d6;
}


/* =========================================================
   TABLET / TELEFOON
   ========================================================= */

@media (max-width: 600px) {

    body {
        margin: 15px;
    }

    .form-container {
        padding: 20px;
    }

    .date-container {
        width: 100%;
        max-width: 320px;
    }

    .calendar {
        width: 100%;
        max-width: 320px;
    }

    .calendar-day {
        height: 44px;
        font-size: 16px;
    }

    .month-button {
        width: 46px;
        height: 46px;
    }

}

