/* Shared form controls for HighvaleFE.Core views (loaded by Views/Shared/_Layout.cshtml). */

/* Loading spinner (site/spinner.svg). Size only: pages show and hide these with .hidden or inline display. */
img.hv-spinner {
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

    /* Site.css squashes img.ajaxwait (the old bar GIF) to 10px tall. */
    img.ajaxwait.hv-spinner {
        width: 20px;
        height: 20px;
    }

/* x-editable's saving indicator pointed at ../img/loading.gif, which doesn't exist. */
.editableform-loading {
    background-image: url("spinner.svg");
    background-size: 20px 20px;
}

/* Shift picker (Views/Shared/Partial/ShiftPicker.cshtml, ShiftPickerStatic.cshtml): a date field with a calendar
   button, a Day/Night segmented toggle and, on ShiftPicker, a Refresh button, all on one row. */
.shift-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 4px 0 16px;
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.shift-picker-label {
    margin: 0;
    color: #4a5565;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Date field: bootstrap-datetimepicker opens from the .input-group-addon. */
.shift-picker-date.input-group {
    width: 180px;
}

    .shift-picker-date .form-control,
    .shift-picker-date .form-control[readonly] {
        max-width: none;
        height: 38px;
        padding: 6px 12px;
        border: 1px solid #d5dce6;
        border-right: 0;
        border-radius: 10px 0 0 10px;
        background-color: #ffffff;
        box-shadow: none;
        color: #18202c;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }

    .shift-picker-date .input-group-addon {
        padding: 0 12px;
        border: 1px solid #d5dce6;
        border-radius: 0 10px 10px 0;
        background-color: #ffffff;
        color: #5d6878;
        font-size: 15px;
        cursor: pointer;
        transition: background-color 0.15s, color 0.15s;
    }

        .shift-picker-date .input-group-addon:hover {
            background-color: #f3f5f8;
            color: #1f6feb;
        }

    .shift-picker-date .form-control:focus {
        border-color: #1f6feb;
    }

        .shift-picker-date .form-control:focus + .input-group-addon {
            border-color: #1f6feb;
        }

/* Day/Night: the radios stay in the page (scripts read and watch them) but are drawn as a segmented toggle. */
.shift-picker-toggle {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #d5dce6;
    border-radius: 10px;
    background-color: #f3f5f8;
}

    .shift-picker-toggle input[type="radio"] {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: 0;
        opacity: 0;
        pointer-events: none;
    }

    .shift-picker-toggle label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 30px;
        margin: 0;
        padding: 0 14px;
        border-radius: 7px;
        color: #5d6878;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
    }

        .shift-picker-toggle label:hover {
            color: #18202c;
        }

    .shift-picker-toggle input[type="radio"]:checked + label {
        background-color: #ffffff;
        box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12), 0 0 0 1px rgba(16, 24, 40, 0.04);
        color: #18202c;
    }

        .shift-picker-toggle input[type="radio"]:checked + label .fa-sun-o {
            color: #d97706;
        }

        .shift-picker-toggle input[type="radio"]:checked + label .fa-moon-o {
            color: #4f46e5;
        }

    .shift-picker-toggle input[type="radio"]:focus-visible + label {
        outline: 2px solid #1f6feb;
        outline-offset: 1px;
    }

/* The date picker's pop-up calendar. */
.shift-picker .bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 8px;
    border: 1px solid #e3e7ee;
    border-radius: 12px;
    box-shadow: 0 12px 28px -8px rgba(16, 24, 40, 0.25);
    font-family: inherit;
}

    .shift-picker .bootstrap-datetimepicker-widget table th,
    .shift-picker .bootstrap-datetimepicker-widget table td {
        height: 32px;
        border-radius: 8px;
        font-size: 13px;
    }

    .shift-picker .bootstrap-datetimepicker-widget table th {
        color: #5d6878;
        font-weight: 600;
    }

        .shift-picker .bootstrap-datetimepicker-widget table th.picker-switch {
            color: #18202c;
        }

    .shift-picker .bootstrap-datetimepicker-widget table td.day:hover,
    .shift-picker .bootstrap-datetimepicker-widget table td span:hover,
    .shift-picker .bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
        background-color: #f3f5f8;
    }

    .shift-picker .bootstrap-datetimepicker-widget table td.old,
    .shift-picker .bootstrap-datetimepicker-widget table td.new {
        color: #a3adbb;
    }

    /* Specific enough to beat the bundle's old bootstrap-datepicker gradients (.datepicker table tr td.today/.active...).
       Today comes first so a selected today still shows as selected. */
    .shift-picker .bootstrap-datetimepicker-widget table tr td.day.today,
    .shift-picker .bootstrap-datetimepicker-widget table tr td.day.today:hover,
    .shift-picker .bootstrap-datetimepicker-widget table tr td.day.today:active {
        border-color: transparent;
        background-color: transparent;
        background-image: none;
        color: #1f6feb;
        font-weight: 600;
    }

        .shift-picker .bootstrap-datetimepicker-widget table tr td.day.today:hover {
            background-color: #f3f5f8;
        }

    .shift-picker .bootstrap-datetimepicker-widget table tr td.day.active,
    .shift-picker .bootstrap-datetimepicker-widget table tr td.day.active:hover,
    .shift-picker .bootstrap-datetimepicker-widget table tr td.day.active:active,
    .shift-picker .bootstrap-datetimepicker-widget table tr td span.active {
        border-color: transparent;
        background-color: #1f6feb;
        background-image: none;
        color: #ffffff;
        text-shadow: none;
    }

    .shift-picker .bootstrap-datetimepicker-widget table td.today:before {
        border-bottom-color: #1f6feb;
    }

    .shift-picker .bootstrap-datetimepicker-widget table td.active.today:before {
        border-bottom-color: #ffffff;
    }
