/*
 * Campi data/ora usabili su Safari, iPhone e iPad.
 * WebKit ritaglia il testo se l'input ha padding, e appearance:none toglie il selettore.
 * Su Apple il valore resta ISO; la digitazione visibile è gg/mm/aaaa.
 */

html body input[type="date"],
html body input[type="time"],
html body input[type="datetime-local"],
html body input[type="month"],
html body input[type="week"] {
    -webkit-appearance: auto;
    appearance: auto;
    line-height: normal;
}

html body input[type="date"]::-webkit-date-and-time-value,
html body input[type="time"]::-webkit-date-and-time-value,
html body input[type="datetime-local"]::-webkit-date-and-time-value,
html body input[type="month"]::-webkit-date-and-time-value,
html body input[type="week"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.4em;
    margin: 0;
}

html body input[type="date"]::-webkit-datetime-edit,
html body input[type="time"]::-webkit-datetime-edit,
html body input[type="datetime-local"]::-webkit-datetime-edit,
html body input[type="month"]::-webkit-datetime-edit,
html body input[type="week"]::-webkit-datetime-edit {
    display: inline-block;
    padding: 0;
    line-height: normal;
}

html body input[type="date"]::-webkit-calendar-picker-indicator,
html body input[type="time"]::-webkit-calendar-picker-indicator,
html body input[type="datetime-local"]::-webkit-calendar-picker-indicator,
html body input[type="month"]::-webkit-calendar-picker-indicator,
html body input[type="week"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
}

html body .prassi-date {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

html body .prassi-date.prassi-date-fill {
    display: block;
    width: 100%;
}

html body .c-sheet-value > .prassi-date,
html body .c-form-group > .prassi-date,
html body td > .prassi-date {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    display: block;
}

html body .prassi-date-text {
    box-sizing: border-box;
    padding-right: 2.5rem !important;
}

html body .prassi-date-fill .prassi-date-text {
    width: 100%;
}

html body .prassi-date:not(.prassi-date-fill) .prassi-date-text {
    width: 11.5rem;
}

html body .prassi-date:not(.prassi-date-fill) .prassi-date-text[data-kind="time"] {
    width: 7.5rem;
}

html body .prassi-date:not(.prassi-date-fill) .prassi-date-text[data-kind="datetime-local"] {
    width: 16rem;
}

html body .prassi-date-open {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    color: #546e7a;
    pointer-events: none;
    z-index: 1;
}

html body .prassi-date-open svg {
    width: 18px;
    height: 18px;
    display: block;
}

html body input.prassi-date-native {
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    width: 2.75rem !important;
    min-width: 0 !important;
    max-width: 2.75rem !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    opacity: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: transparent !important;
    cursor: pointer;
    z-index: 2;
}

html body .prassi-date-text[aria-invalid="true"] {
    border-color: #C62828 !important;
}

@supports (-webkit-touch-callout: none) {
    html body input.prassi-date-text,
    html body input[type="date"],
    html body input[type="time"],
    html body input[type="datetime-local"] {
        font-size: 16px;
    }
}
