@import '~superdesk-ui-framework/app/styles/_variables.scss';

/* ui fixes for planning redesign - should be avoided */
.sd-searchbar {
    .sd-searchbar__icon {
        margin-bottom: 0;
    }

    .sd-searchbar__input {
        height: 4.8rem;
        margin: 0;

        &:focus {
            border: none;
            box-shadow: none;
        }
    }
}

.sd-page-grid--basic {
    background-color: $sd-background;
}

.side-panel__content {
    overflow-wrap: break-word;

    .side-panel__content-block {
        input, p, textarea {
            margin: 0;
        }
    }
}

.sd-page-content--slide-in--open .sd-page-content__content-block--main {
    width: calc(100vw - 60.8rem) !important;
}

// Make <div class="sd-line-input__input" /> the same as an input element when
// sd-line-input--disabled modifier is used
.sd-line-input.sd-line-input--disabled div.sd-line-input__input {
    border-bottom: 1px dotted rgba(0, 0, 0, 0.15);
    cursor: not-allowed;
}

// Hack so that content is not rendered underneath the workqueue
.sd-page-grid--basic .sd-content--margin-b30 {
    margin-bottom: 30px;
}

// styles related to infinite scroll for list panel component
.sd-column-box__main-column__listpanel {
    overflow: hidden;
    .sd-column-box__main-column__items {
        overflow: auto !important;
        width: 100%;
        height: calc(100vh - (#{$nav-height} + #{$subnav-height} * 2 + 30px));

        &--featured {
            // 68px = for featured list header including overlapping margin of header and list
            height: calc(100vh - (#{$nav-height} + #{$subnav-height} * 2 + 30px + 68px));
        }
    }
    .loading-indicator{
        top: calc(#{$nav-height} + #{$subnav-height});
    }
}

// Checkbox with badge
.element-with-badge {
    + .element-with-badge, + .sd-check__wrapper {
        margin-left: 1.2rem;
        vertical-align: top;
    }
}

.sd-check__wrapper + .element-with-badge {
    margin-left: 1.2rem;
    vertical-align: top;
}

.open-preview .sd-preview-panel--width-560px {
    width: 560px !important;
}

// Show the hand cursor when hovering Assignment Group titles
.sd-list-header__name {
    &--cursorPointer {
        cursor: pointer;
    }
}

// Fixes for Assignment Group List
.sd-list-item-group {
    &__empty-msg {
        line-height: 4rem;
        text-align: center;
        color: $grayLight;
    }
}

// Allows a badge in Assignment SubNav title
.subnav__page-title {
    .badge {
        vertical-align: top;
        margin-top: 4px;
        margin-left: 1rem;
    }
}

// Fix for showing Assignment page and Authoring editor side by side
.sd-page-content--split {
    width: unset;
}

// Fix for placing the LockContainer in the Tab section of Assignment Preview
.nav-tabs {
    &--no-grow {
        flex-grow: 0 !important;
    }
}

.cursor-pointer { cursor: pointer; }

// Remove the underline from text inside check boxes
a:hover {
   &.sd-check__wrapper {
      text-decoration: none;
   }
}

// Overrides to show the AddToPlanning/FulfilAssignment apps in a modal container
.planning-app__modal {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: auto;

    .sd-column-box__main-column__listpanel {
        .sd-column-box__main-column__items {
            padding-bottom: 2.6rem !important;
            // 96px = modal header + footer height
            // 80px = top + bottom space around for modal type .modal--fill
            height: calc(100vh - (#{$nav-height} + #{$subnav-height} * 2 + 96px + 80px));
        }
    }

    .sd-page-content--slide-in {
        height: 100%;

        .sd-page-content__content-block--main {
            width: calc(100vw - 8.0rem) !important;
        }
        &--open {
            .sd-page-content__content-block--main {
                width: calc(100vw - 60.8rem) !important;
            }
        }
    }
}

.AddToPlanning {
    .sd-list-item {
        margin: 1rem;
    }
}

.FulfilAssignment {
    .archive-item {
        margin: 1rem;
    }
}

.sd-filters-panel--fixed {
    flex-shrink: 0;    
}
