.hm-appointments-calendar {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;

    background: var(
        --hm-appointments-container-background,
        transparent
    );
}


.hm-appointments-calendar *,
.hm-appointments-calendar *::before,
.hm-appointments-calendar *::after {
    box-sizing: border-box;
}


/* Layout */

.hm-appointments-calendar__layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
    gap: 32px;
    align-items: stretch;
}


.hm-appointments-calendar__panel {
    min-width: 0;
}

.hm-appointments-calendar__panel--calendar {
    display: flex;
    flex-direction: column;
}


/* Kopfbereiche */

.hm-appointments-calendar__header,
.hm-appointments-calendar__booking-header {
    min-height: 48px;
    margin: 0 0 10px;
    padding: 0;

    display: flex;
    align-items: center;
}


.hm-appointments-calendar__header {
    justify-content: space-between;
    gap: 16px;
}


.hm-appointments-calendar__booking-header {
    justify-content: flex-start;
}


/* Überschriften */

.hm-appointments-calendar__heading {
    margin: 0;
    padding: 0;

    font-family:
        var(
            --hm-appointments-heading-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-heading-size,
            28px
        );

    font-weight: inherit;
    line-height: 1.2;

    color:
        var(
            --hm-appointments-heading-color,
            inherit
        );
}


.hm-appointments-calendar__month {
    flex: 1;
    text-align: center;
}


.hm-appointments-calendar__slots-title {
    text-align: left;
}


/* Navigationspfeile */

.hm-appointments-calendar__nav {
    width: auto;
    height: auto;
    min-width: 0;

    position: static;

    margin: 0;
    padding: 0 4px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 0;
    background: transparent;

    color:
        var(
            --hm-appointments-nav-color,
            #333333
        );

    font-family: Arial, sans-serif;

    font-size:
        var(
            --hm-appointments-nav-size,
            24px
        );

    font-weight: 400;
    line-height: 1;

    cursor: pointer;
}


.hm-appointments-calendar__nav:hover:not(:disabled) {
    opacity: 0.75;
}


.hm-appointments-calendar__nav:disabled {
    opacity: 0.3;
    cursor: default;
}


/* Wochentage */

.hm-appointments-calendar__weekdays,
.hm-appointments-calendar__days {
    display: grid;
    grid-template-columns:
        repeat(7, minmax(0, 1fr));
    gap: 6px;
}


.hm-appointments-calendar__weekdays {
    margin-bottom: 6px;
    text-align: center;
}


.hm-appointments-calendar__weekdays span {
    padding: 1px 0;

    font-family:
        var(
            --hm-appointments-weekday-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-weekday-size,
            14px
        );

    color:
        var(
            --hm-appointments-weekday-color,
            inherit
        );
}


/* Kalendertage */

.hm-appointments-calendar__day {
    min-height: 48px;
    padding: 3px 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d8d8d8;
    border-radius: 0;

    background:
        var(
            --hm-appointments-day-background,
            #ffffff
        );

    color:
        var(
            --hm-appointments-day-color,
            inherit
        );

    font-family:
        var(
            --hm-appointments-day-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-day-size,
            18px
        );

    line-height: 1;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
}


.hm-appointments-calendar__day:hover:not(:disabled) {
    color:
        var(
            --hm-appointments-day-hover-color,
            #ffffff
        );

    background:
        var(
            --hm-appointments-day-hover-background,
            #333333
        );
}


.hm-appointments-calendar__day.is-selected {
    color:
        var(
            --hm-appointments-day-selected-color,
            #ffffff
        );

    background:
        var(
            --hm-appointments-day-selected-background,
            #333333
        );
}


.hm-appointments-calendar__day--disabled {
    opacity: 0.3;
    cursor: default;
}


.hm-appointments-calendar__day--empty {
    border: 0;
    background: transparent;
}


/* Allgemeiner Text */

.hm-appointments-calendar__slots-intro,
.hm-appointments-calendar__booking-notice,
.hm-appointments-calendar__field label,
.hm-appointments-calendar__required-note {
    font-family:
        var(
            --hm-appointments-text-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-text-size,
            14px
        );

    color:
        var(
            --hm-appointments-text-color,
            inherit
        );
}


.hm-appointments-calendar__slots-intro {
    margin: 0 0 8px;
}


.hm-appointments-calendar__booking-notice {
    margin: 8px 0 0;
    line-height: 1.5;
}


.hm-appointments-calendar__slots-list:not(:empty)
    + .hm-appointments-calendar__booking-notice {
    margin-top: 16px;
}


.hm-appointments-calendar__booking-notice a {
    color: inherit;
    text-decoration: underline;
}


.hm-appointments-calendar__optional {
    opacity: 0.7;
}


/* Ladezustand und keine verfügbaren Termine */

.hm-appointments-calendar__loading,
.hm-appointments-calendar__no-slots {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0;
    white-space: nowrap;

    font-family:
        var(
            --hm-appointments-text-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-text-size,
            14px
        );

    color:
        var(
            --hm-appointments-text-color,
            inherit
        );
}


/* Checkboxen */

.hm-appointments-calendar__checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    font-family:
        var(
            --hm-appointments-text-font,
            inherit
        );

    color:
        var(
            --hm-appointments-text-color,
            inherit
        );

    line-height: 1.5;
}


.hm-appointments-calendar__checkbox input {
    flex: 0 0 auto;
    margin-top: 3px;
}


.hm-appointments-calendar__checkbox-text {
    font-family:
        var(
            --hm-appointments-text-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-checkbox-text-size,
            14px
        );

    color:
        var(
            --hm-appointments-text-color,
            inherit
        );

    line-height: 1.5;
}


/* Uhrzeiten */

.hm-appointments-calendar__slots-list {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 6px;
}


.hm-appointments-calendar__slot {
    width: 100%;
    min-height: 48px;
    padding: 3px 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #d8d8d8;
    border-radius: 0;

    background:
        var(
            --hm-appointments-slot-background,
            #ffffff
        );

    color:
        var(
            --hm-appointments-slot-color,
            inherit
        );

    font-family:
        var(
            --hm-appointments-slot-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-slot-size,
            16px
        );

    line-height: 1;
    text-align: center;

    cursor: pointer;

    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        border-color 0.15s ease;
}


.hm-appointments-calendar__slot:hover,
.hm-appointments-calendar__slot.is-selected {
    color:
        var(
            --hm-appointments-slot-hover-color,
            #ffffff
        );

    background:
        var(
            --hm-appointments-slot-hover-background,
            #333333
        );
}


/* Formular */

.hm-appointments-calendar__form-wrap {
    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid #d8d8d8;
}


.hm-appointments-calendar__form-title {
    margin-bottom: 16px;
}


.hm-appointments-calendar__field-row {
    margin-bottom: 16px;
}


.hm-appointments-calendar__field-row--checkbox {
    margin-bottom: 6px;
}


.hm-appointments-calendar__field-row--checkbox:last-of-type {
    margin-bottom: 16px;
}


.hm-appointments-calendar__field {
    width: 100%;
}


.hm-appointments-calendar__field label {
    display: block;
    margin-bottom: 6px;
}


.hm-appointments-calendar__field input,
.hm-appointments-calendar__field textarea {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;

    border: 1px solid #d8d8d8;
    border-radius: 0;

    background: #ffffff;

    font-family:
        var(
            --hm-appointments-text-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-text-size,
            14px
        );

    color:
        var(
            --hm-appointments-text-color,
            inherit
        );
}


.hm-appointments-calendar__field textarea {
    min-height: 110px;
    resize: vertical;
}


/* Buchungsbutton */

.hm-appointments-calendar__submit {
    width: 100%;
    padding: 12px 18px;

    border: 0;
    border-radius: 0;

    background:
        var(
            --hm-appointments-button-background,
            #333333
        );

    color:
        var(
            --hm-appointments-button-color,
            #ffffff
        );

    font-family:
        var(
            --hm-appointments-button-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-button-size,
            16px
        );

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        opacity 0.15s ease;
}


.hm-appointments-calendar__submit:hover:not(:disabled) {
    background:
        var(
            --hm-appointments-button-hover-background,
            #111111
        );

    color:
        var(
            --hm-appointments-button-hover-color,
            #ffffff
        );
}


.hm-appointments-calendar__submit:disabled {
    opacity: 1;
    cursor: default;

    color:
        var(
            --hm-appointments-button-disabled-color,
            #ffffff
        );

    background:
        var(
            --hm-appointments-button-disabled-background,
            #a7aaad
        );
}


/* Tablet */

@media (max-width: 900px) {

    .hm-appointments-calendar__layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }


    .hm-appointments-calendar__slots-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* Smartphone */

@media (max-width: 560px) {

    .hm-appointments-calendar {
        padding: 16px;
    }


    .hm-appointments-calendar__layout {
        gap: 20px;
    }


    .hm-appointments-calendar__heading {
        font-size:
            var(
                --hm-appointments-heading-size-mobile,
                28px
            );
    }


    .hm-appointments-calendar__header,
    .hm-appointments-calendar__booking-header {
        min-height: 0;
        margin-bottom: 8px;
    }


    .hm-appointments-calendar__weekdays span {
        font-size:
            var(
                --hm-appointments-weekday-size-mobile,
                14px
            );
    }


    .hm-appointments-calendar__weekdays,
    .hm-appointments-calendar__days {
        gap: 4px;
    }


    .hm-appointments-calendar__day {
        min-height: 42px;
        padding: 2px;

        font-size:
            var(
                --hm-appointments-day-size-mobile,
                18px
            );
    }


    .hm-appointments-calendar__nav {
        width: 34px;
        height: 34px;
        min-width: 34px;

        font-size:
            var(
                --hm-appointments-nav-size-mobile,
                24px
            );
    }


    .hm-appointments-calendar__slots-intro,
    .hm-appointments-calendar__booking-notice,
    .hm-appointments-calendar__field label,
    .hm-appointments-calendar__required-note,
    .hm-appointments-calendar__loading,
    .hm-appointments-calendar__no-slots,
    .hm-appointments-calendar__field input,
    .hm-appointments-calendar__field textarea {
        font-size:
            var(
                --hm-appointments-text-size-mobile,
                14px
            );
    }


    .hm-appointments-calendar__checkbox-text {
        font-size:
            var(
                --hm-appointments-checkbox-text-size-mobile,
                14px
            );
    }


    .hm-appointments-calendar__slots-list {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 4px;
    }


    .hm-appointments-calendar__slot {
        min-height: 42px;
        padding: 2px;

        font-size:
            var(
                --hm-appointments-slot-size-mobile,
                16px
            );
    }


    .hm-appointments-calendar__submit {
        font-size:
            var(
                --hm-appointments-button-size-mobile,
                16px
            );
    }


    .hm-appointments-calendar__loading,
    .hm-appointments-calendar__no-slots {
        white-space: normal;
    }
}

.hm-appointments-calendar__booking-success {
    padding-top: 0;
}

.hm-appointments-calendar__success-heading {
    margin-bottom: 18px;
}

.hm-appointments-calendar__success-meta {
    margin: 0 0 14px;
}

.hm-appointments-calendar__success-type,
.hm-appointments-calendar__success-date,
.hm-appointments-calendar__success-time {
    margin: 0;
    padding: 0 0 0.25em;
    line-height: 1.35;
}

.hm-appointments-calendar__success-time {
    margin-top: 0;
}

.hm-appointments-calendar__success-type strong,
.hm-appointments-calendar__success-date strong,
.hm-appointments-calendar__success-time strong {
    font-weight: 600;
}

.hm-appointments-calendar__calendar-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.hm-appointments-calendar__calendar-select {
    min-width: 220px;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 0;
}

.hm-appointments-calendar__booking-notice[hidden],
.hm-appointments-calendar__notice-confirmation-row[hidden] {
    display: none !important;
}


.hm-appointments-calendar__ics-button {
    margin-top: 16px;
}

.hm-appointments-calendar__success-message {
    margin-top: 22px;
    white-space: pre-line;
}

@media (max-width: 767px) {
    .hm-appointments-calendar__calendar-choice {
        align-items: flex-start;
        flex-direction: column;
    }

    .hm-appointments-calendar__calendar-select {
        width: 100%;
    }
}

/* Heutiger Tag */

.hm-appointments-calendar__day.is-today:not(.hm-appointments-calendar__day--empty) {
    box-shadow:
        inset 0 0 0 2px
        var(
            --hm-appointments-day-today-color,
            #b32d2e
        );
}


/* Kalenderinformationen unter dem Kalender */

.hm-appointments-calendar__calendar-info {
    margin-top: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;

    font-family:
        var(
            --hm-appointments-text-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-text-size,
            14px
        );

    color:
        var(
            --hm-appointments-text-color,
            inherit
        );
}

.hm-appointments-calendar__calendar-info p {
    margin: 0;
    padding: 0 0 0.25em;
    line-height: 1.35;
}

.hm-appointments-calendar__calendar-info p + p {
    margin-top: 0;
}

.hm-appointments-calendar__calendar-info .hm-appointments-calendar__booking-notice {
    margin-top: 14px;
}

.hm-appointments-calendar__required-note {
    margin: auto 0 0 !important;
    padding: 0 !important;
    line-height: 1.4;
    opacity: 1;
}


/* Zweispaltige Kontaktdaten */

.hm-appointments-calendar__field-row--two {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
}


/* Terminart */

.hm-appointments-calendar__meeting-title {
    margin-bottom: 8px;

    font-family:
        var(
            --hm-appointments-text-font,
            inherit
        );

    font-size:
        var(
            --hm-appointments-text-size,
            14px
        );

    color:
        var(
            --hm-appointments-text-color,
            inherit
        );
}


.hm-appointments-calendar__meeting-detail {
    margin-top: 12px;
}

.hm-appointments-calendar__meeting-info {
    margin: 10px 0 0;
    line-height: 1.5;
}

.hm-appointments-calendar__meeting-methods[hidden],
.hm-appointments-calendar__meeting-detail[hidden],
.hm-appointments-calendar__meeting-info[hidden] {
    display: none !important;
}


/* Erfolgsausgabe */


.hm-appointments-calendar__ics-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hm-appointments-calendar__ics-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.hm-appointments-calendar__success-image-wrap {
    display: flex;
    margin-top: 18px;
}

.hm-appointments-calendar__success-image-wrap--left {
    justify-content: flex-start;
}

.hm-appointments-calendar__success-image-wrap--center {
    justify-content: center;
}

.hm-appointments-calendar__success-image-wrap--right {
    justify-content: flex-end;
}

.hm-appointments-calendar__success-image {
    width: auto;
    height: auto;
    max-width: 100%;
}


@media (max-width: 560px) {

    .hm-appointments-calendar__field-row--two {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hm-appointments-calendar__calendar-info,
    .hm-appointments-calendar__meeting-title {
        font-size:
            var(
                --hm-appointments-text-size-mobile,
                14px
            );
    }
}


/* Terminart-Auswahl */
.hm-appointments-calendar__meeting-select {
    width: 100%;
    min-height: 40px;
    padding: 6px 10px;
    border: 1px solid #d8d8d8;
    border-radius: 0;
    background: #ffffff;
    font: inherit;
    color: inherit;
}


/* Individueller Hinweis zur gewählten Terminart -------------------------- */
.hm-appointments-calendar__meeting-notice {
    margin: 8px 0 0;
    padding: 0;
    font: inherit;
    color: inherit;
}


/* Bot-/Spam-Schutz -------------------------------------------------------- */
.hm-appointments-calendar__honeypot {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
