/* ========================================================================
   Show-M contact form: "Wunschtermin" date picker (js/showm-datepicker.js)
   - Field: same pill as the other fields (css/showm-form.css) plus a
     calendar icon.
   - Calendar: dark frosted panel below the field; the selected day uses
     the primary button look. Buttons/table are reset because the theme
     styles them globally.
   ===================================================================== */

/* ---------- Field ---------- */
.m1_formular_wrapper .form_item .wpcf7-form-control.showm-datepicker:not(.wpcf7-submit) {
    padding-right: calc(var(--showm-field-pad) + 30px);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4d4d4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--showm-field-pad) center;
    background-size: 18px 18px;
    caret-color: transparent;
    cursor: pointer;
}

/* ---------- Calendar panel ---------- */
.showm-cal {
    position: absolute;
    left: 0;
    z-index: 9999;
    box-sizing: border-box;
    width: 324px;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid rgba(212, 212, 212, 0.35);
    border-radius: 24px;
    background: rgba(37, 37, 37, 0.92);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    color: #d4d4d4;
    font-family: 'Nexa-Regular', system-ui, sans-serif;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
}

.showm-cal[hidden] {
    display: none;
}

/* ---------- Month header: prev | month year | next ---------- */
.showm-cal .showm-cal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.showm-cal .showm-cal__title {
    color: #ffffff;
    font-family: 'Nexa-Bold', system-ui, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 36px;
}

.showm-cal .showm-cal__nav {
    flex: 0 0 auto;
    width: 36px;
    min-width: 0;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
    box-shadow: inset 0 0 0 1px rgba(212, 212, 212, 0.35);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.showm-cal .showm-cal__prev {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 5l-7 7 7 7' fill='none' stroke='%23d4d4d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.showm-cal .showm-cal__next {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%23d4d4d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.showm-cal .showm-cal__nav:hover {
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px #d4d4d4;
}

.showm-cal .showm-cal__nav[aria-disabled="true"] {
    opacity: 0.3;
    cursor: default;
}

.showm-cal .showm-cal__nav[aria-disabled="true"]:hover {
    background-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(212, 212, 212, 0.35);
}

.showm-cal .showm-cal__nav:focus {
    outline: none;
}

.showm-cal .showm-cal__nav:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ---------- Weekdays + days ---------- */
.showm-cal .showm-cal__grid {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    table-layout: fixed;
    background: transparent;
}

.showm-cal .showm-cal__grid th,
.showm-cal .showm-cal__grid td {
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
    vertical-align: middle;
}

.showm-cal .showm-cal__grid th {
    height: 28px;
    color: rgba(212, 212, 212, 0.6);
    font-family: 'Nexa-Bold', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.showm-cal .showm-cal__grid td {
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
}

.showm-cal .showm-cal__grid td:focus {
    outline: none;
}

.showm-cal .showm-cal__grid td > span {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 auto;
    border: 1px solid transparent;
    border-radius: 50%;
    line-height: 36px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.showm-cal .showm-cal__grid td:hover > span {
    border-color: #d4d4d4;
    background: rgba(255, 255, 255, 0.08);
}

/* keyboard focus (cells only get focus from the keyboard) */
.showm-cal .showm-cal__grid td:focus > span {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.showm-cal .showm-cal__grid td.is-today > span {
    border-color: rgba(212, 212, 212, 0.5);
}

.showm-cal .showm-cal__grid td.is-other {
    color: rgba(212, 212, 212, 0.45);
}

/* weekends + past days */
.showm-cal .showm-cal__grid td.is-disabled {
    color: rgba(212, 212, 212, 0.22);
    cursor: not-allowed;
}

.showm-cal .showm-cal__grid td.is-disabled:hover > span {
    border-color: transparent;
    background: transparent;
}

.showm-cal .showm-cal__grid td.is-selected {
    color: #353434;
}

.showm-cal .showm-cal__grid td.is-selected > span {
    border-color: transparent;
    background: rgba(254.54, 254.54, 254.54, 0.8);
    box-shadow: inset 0 3px 15px rgba(255, 255, 255, 0.55);
    font-family: 'Nexa-Bold', system-ui, sans-serif;
}

@media screen and (max-width: 360px) {
    .showm-cal {
        width: 288px;
        padding: 10px;
    }

    .showm-cal .showm-cal__grid td > span {
        width: 34px;
        height: 34px;
        line-height: 32px;
    }
}
