@import '../../assets/sass/config';
@import '../assets/sass/mixins/direction';

$dark-grey-color-1: #565F68 !default;

.alpha-admin-notices+.wrap h1,
.templates-builder h1 {
    display: none !important;
}

div.template-builder {
    padding: 32px 40px 32px 40px;
}

#alpha-template-nav {
    padding-top: 0;
    margin-bottom: 1.65em;

    +#alpha_new_template {
        display: none;
    }

    .nav-tab-active {
        pointer-events: none;
    }
}

table.posts {
    #template_type {
        width: 212px;
    }

    #date {
        width: 21.9%;
    }
}

.alpha-wrap #posts-filter {

    .search-box,
    .tablenav {

        select,
        input {
            height: 40px;
        }
    }

    .tablenav-pages input {
        height: auto;
    }

    input[type="search"] {
        margin-#{$right}: 10px;
    }
}

.templates-builder {
    padding: 40px 40px 32px;
    text-align: center;

    select:hover {
        color: var(--alpha-dark-color);
    }

    .wrap {
        margin: 0;
        text-align: #{$left};
    }

    .wrap input[type=checkbox] {
        top: -1px;
        margin-#{$left}: 10px;
        width: 18px;
        height: 18px;
    }

    form a {
        color: var(--alpha-body-color);

        &.current {
            color: var(--alpha-primary-color);
        }

        &:hover {
            color: var(--alpha-primary-color);
        }
    }

    .row-title {
        font-weight: 400;
    }

    .nav-tab {
        padding: 9px 0 11px;
        margin: side-values(16px 37px 0 0);
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        color: var(--alpha-body-color);
        font-size: 13px;
        font-weight: 500;

        &:last-child {
            margin-#{$right}: 0;
        }
    }

    @media (max-width: 1199px) {
        p.search-box {
            margin-bottom: 10px;
        }
    }

    @media (max-width: 767px) {
        .subsubsub {
            float: none;
            text-align: left;
        }

        p.search-box {
            display: flex;
            position: relative;
            height: auto;
        }
    }

    @media (max-width: 479px) {
        p.search-box {
            display: flex;
        }
    }

    .nav-tab-active,
    .nav-tab:hover {
        // color: #000;
        border-bottom-color: var(--alpha-primary-color);
    }

    h1.wp-heading-inline,
    h1+a {
        display: none !important;
    }

    .subsubsub {
        margin: 0 -1em 10px;
        text-transform: uppercase;

        a {
            padding: 0.2em 1em;
            font-size: 12px;

            &.current {
                font-weight: 400;
            }
        }
    }

    #posts-filter .button {
        background-color: var(--alpha-admin-dark-grey-color-1);
        border-color: var(--alpha-admin-dark-grey-color-1);
        color: var(--alpha-white-color);

        &:hover,
        &:focus,
        &.active {
            background-color: lighten($dark-grey-color-1, 10%);
            border-color: lighten($dark-grey-color-1, 10%);
        }
    }

    .tablenav {
        padding: 0;
        margin: 0;

        .actions {
            margin-bottom: 20px;
        }

        select {
            margin-#{$right}: 10px;
            text-transform: capitalize;
        }
    }

    .tablenav-pages {
        margin-top: 10px;
    }

    .page-title-action {
        color: var(--alpha-white-color);
    }

    .wp-list-table {
        margin-bottom: 20px;
    }

    .template_type.column-template_type a,
    .active_in.column-active_in a {
        display: inline-block;
        margin-top: 2px;
        margin-#{$right}: 4px;
        padding: 2px 12px;
        color: var(--alpha-admin-text-color);
        border-radius: 2px;
        text-transform: uppercase;
        text-decoration: none;
        border: 1px solid var(--alpha-light-color);
        font-size: 10px;
        transition: background .3s, border-color .3s, color .3s;

        &:hover {
            background: var(--alpha-body-color);
            border-color: var(--alpha-body-color);
            color: var(--alpha-white-color);
        }
    }

    .column-date {
        font-size: 12px;
    }

    .column-title strong {
        position: relative;
        top: 5px;
        font-size: 13px;
    }
}

/* Sidebars Builder */
.sidebars-builder #sidebar_table {
    border: 0;
}

#add_widget_area {
    margin: side-values(40px 0 0 40px);
}

@media (min-width: 768px) {
    .sidebars-builder .column-title {
        padding-#{$left}: 40px;
    }
}


// Alpha Template Library
.alpha-new-template-modal {
    width: 500px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);

    select,
    input {
        min-width: 100%;
        min-height: 40px;
        padding: .3em 1em;
        color: #666;
        font-size: 13px;
        border-color: var(--alpha-admin-border-color-1);

        &:focus {
            border-color: var(--alpha-light-color);
            box-shadow: none;
        }
    }

    select:hover,
    select:focus {
        color: #666;
    }
}

.alpha-template-actions {
    order: -1;
    text-align: left;
}

.alpha-new-template-form {
    h4 {
        margin-top: -8px;
    }

    .option {
        margin-bottom: 22px;
    }
}

#alpha-new-studio-trigger {
    position: absolute;
    top: 0;
    #{$right}: -1px;
    bottom: 0;
    width: 50px;
    cursor: pointer;
}

#alpha-create-template-type {
    display: block;
    margin-top: 30px;
    width: 100%;
    padding: 10px;
    border: 0;
    background: var(--alpha-primary-color);
    color: var(--alpha-white-color);
    font-size: 14px;
    font-weight: 600;
    padding: 11px 7px;
    text-transform: uppercase;

    &:hover,
    &:focus {
        background: var(--alpha-primary-color-hover);
    }
}

@media (max-width: 767px) {
    .alpha-new-template-description {

        h4,
        p {
            display: none;
        }
    }

    .alpha-new-template-description {
        padding: 0;
    }

    .alpha-new-template-description,
    .alpha-new-template-form {
        max-width: none;
    }
}