/* Additions to the legacy theme in ~/_Content/css. Keep this small: the legacy CSS is copied unchanged. */

/* Pages without a section sidebar (errors, sign-in problems). */
.admin-main--full {
    left: 0;
}

.admin-dev-context {
    font-size: 11px;
    color: #fff;
}

/* DataTables search box with the legacy glyphicon add-on. */
.dataTables_filter label {
    width: 100%;
    margin: 0;
}

.dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
}

/* asp-validation-summary always renders; only show the box when it has errors. Without errors it
   keeps the 10px its empty list took in legacy (Html.ValidationSummary), so the fields sit where
   legacy's did. */
.validation-summary-valid {
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
}

/* Dip switch editor: legacy drew each switch as two .dipthing blocks (top lit = on); here they sit in
   one toggle button so the switch is focusable and announces its state. */
.dip-toggle-wrap {
    display: inline-block;
    margin-right: 4px;
}

.dip-toggle {
    display: block;
    padding: 0;
    border: 0;
    background: none;
}

.dip-toggle .dipthing {
    display: block;
}

.dip-toggle:focus-visible {
    outline: 2px solid #333;
    outline-offset: 2px;
}

.dragHandle {
    cursor: move;
}

/* LED flash sequence preview: one light per LED, coloured by the running sequence. */
.led-light {
    height: 20px;
    width: 20px;
    margin: 0 auto;
    border-radius: 50%;
    border: 1px solid #767676;
}

.errtool-children .errtool-operation {
    cursor: move;
}

/* Error code Import: the file input stays focusable but hidden; its label is the button. */
.import-form {
    display: inline-block;
    margin: 0;
}

.import-file {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.import-form label.btn {
    margin-bottom: 0;
}

.import-file:focus + label.btn {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Product Image: legacy's Fine Uploader box, as the label of a hidden file input. */
.product-image-upload {
    display: block;
    margin: 0;
    cursor: pointer;
}

.product-image-upload img {
    width: 100%;
}

.import-file:focus + .product-image-upload img,
.product-image-upload:hover img {
    border-color: #fd020b;
}

.product-image-removed .thumbnail {
    opacity: 0.3;
}

.import-file:focus + label.btn--close-thumbnail {
    outline: 2px solid #000;
}

/* Menu builder: the static content preview frame inside the phone mock-up. */
.mb-preview-frame {
    width: 100%;
    height: 560px;
    border: 0;
}

/* Menu builder: legacy showed the edit button of the item being edited while the pointer stayed
   on it; keep it shown (in its hover colours) for as long as the item is open. */
.nav__menu-item.active .btn--edit {
    right: 0;
    color: #fff !important;
    background-color: #fd020b;
}

/* Logout is a form button (a POST) that looks like legacy's Logout link. */
.navbar-logout {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-transform: inherit;
}

/* Translations list: a row's save status takes no room until there is one (legacy had none). */
#translations .help-block:empty {
    display: none;
}

/* A form-group caption that labels no single control: styled as legacy's label there. */
.form-group span.control-label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
    text-transform: uppercase;
}

/* Menu builder icon viewer: legacy's .ico tiles, with a button in place of legacy's div. */
.ico > button {
    padding: 19px 25px;
    font-family: 'mitsi-toolbox';
    border: 0;
    background: none;
}

.ico > button.selected {
    color: #fff;
    background-color: #fd020b;
}

/* Headings kept at the right level for screen readers but sized like legacy's h4s. */
h2.h4 {
    text-transform: none;
}

/* TinyMCE 6 in legacy's square TinyMCE 4 frame. */
.tox.tox-tinymce {
    border: 1px solid #ccc;
    border-radius: 0;
}
