@import "bourbon/bourbon";
@import "variables";

/**************************************
/* GENERAL
/**************************************/

#psdInfoSection,
#psdAssetsSection {
    border: none;
    position: absolute;
    top: 60px;
    bottom: 0;
    overflow: auto;
    padding-right: 8px;
    padding-left: 2px;
    right: 0;

    span.desc, h6 {
        font-size: 14px;
        font-weight: 400;
        margin-top: 24px;
        color: $cc-black !important;
        text-transform: none;
        display: block;
        line-height: 21px;
        height: 21px;
    }

    ul {
        list-style-type: none;
        padding: 0px;
        margin-top: 10px;
    }
}

.section-wrapper {
    padding: 10px 0;
}

.summary-separator {
    height: 1px;
    background-color: $cc-grey-light;
}

.panel-rows {
    color: $cc-grey-light;
    font-size: 12px;
    margin: 10px 0 15px;

    li {
        margin: 0 0 8px;
        text-align: right;
    }

    label {
        font-size: 13px;
        margin-right: 3px;
    }
}

#baseFontInputLabel {
    position: relative;
    top: 4px;
}

#baseFontInput {
    font-size: 12px;
    width: 44px;
    padding: 2px 3px !important;
    height: 20px;
    line-height: 1;
}


/**************************************
/* CSS INSPECTOR
/**************************************/

.cssInspectorCopyAllButton {
    float: right;
    position: relative;
}

.cssInspectorCopyAllButton.zeroclipboard-is-hover {
    @include background-image( linear-gradient($btn-hover-gradient-stop-1 0, $btn-hover-gradient-stop-2 100%) );
}

.extract-plugin .css-properties * {
    @include user-select(text);
}

.css-properties {
    background: $cc-grey-lighter;
    border: 1px solid $cc-grey-light;
    border-radius: $tag-border-radius;
    font-family: "Andale Mono", Monaco, Consolas, "Courier New", monospace;
    height: 180px;
    line-height: 18px;
    margin: 5px 0 12px !important;
    overflow: auto;
    padding: 6px 9px !important;

    > li {
        white-space: nowrap;
    }

    > li.css-properties-message {
        font-family: adobe-clean, source-sans-pro, 'Helvetica Neue', Helvetica, Arial, sans-serif;
        font-size: 14px;
        padding-top: 65px;
        text-align: center;
        margin: 0 auto;
        width: 200px;
        color: $cc-grey;
        white-space: normal;
    }

    .color-chip {
        width: 12px;
        height: 12px;
        border-radius: 0;
        box-shadow: inset 0 0 1px 1px rgba(0, 0, 0, 0.12);
        display: inline-block;
        vertical-align: middle;
        @include user-select(none);
    }

    .property {
        color: $cc-black;
        font-size: 11px;
    }

    .comment {
        color: $cc-grey;
        font-size: 11px;
    }

    .value {
        color: $cc-text;
        font-size: 11px;
    }
}

.base-font-input {
    background: $cc-white;
    border: 1px solid $cc-grey-light;
    color: $cc-text;
    height: 18px;
    line-height: 1;
    width: 48px;
}

/* CONTEXT MENU */
.extract-plugin {
    .context-menu{
        top: 52px;
        left: 0;
        position: absolute;
        padding: 4px 0;
        background: #fff;
        border: 1px solid #d5d5d5;
        z-index: 2010;
        text-align: left;
        box-shadow: 0 1px 2px rgba(0,0,0,0.2);
        font-weight: 400;
        font-size: inherit;
        letter-spacing: normal;
        cursor: pointer;
        line-height: inherit;
        min-width: 30px;
    }

    .context-menu a {
        position: relative;
        height: 19px;
        line-height: inherit;
        font-size: inherit;
        padding: 0 10px 0 20px;
        display: block;
        color: $cc-text;
        font-weight: inherit;
        text-decoration: none;
        border-bottom: none;
    }

    .context-menu a i {
        background-position: -100px 2000px;
        display: none;
    }

    .context-menu a.active i {
        display: inherit;
        position: absolute;
        top: 0;
        left: 0;
        background-position: -35px -1538px;
        height: 26px;
    }

    .context-menu a:hover {
        background: #227ecb;
        color: #fff;
    }

    .context-menu a:hover i{
        background-position: -4px -1718px;
    }
}

/* FONT UNIT TYPE MENU */
#psdInfoSection .fontUnit {
    width: 24px;
}

/* DROP DOWN */

.dropdown{
    display: inline-block;
    color: $cc-text;
    font-weight: normal;
    line-height: normal;
    font-size: 12px;
}

.dropdown-btn {
    background-color: #e5e9e9;
    color: $cc-text;
    font-weight: normal;
    background-color: $btn-bg;
    background: -moz-linear-gradient(top,  $btn-gradient-stop-1 0%, $btn-gradient-stop-2 100%);
    background-image: -ms-linear-gradient(top, $btn-gradient-stop-1 0%, $btn-gradient-stop-2 100%);
    @include background-image( linear-gradient($btn-gradient-stop-1 0, $btn-gradient-stop-2 100%) );
    padding-left: 6px;
    padding-right: 20px;
    line-height: 22px;
    text-align: left;
    border: 1px solid $btn-border;
    box-shadow: inset 0 1px 0 $cc-white;
    text-shadow: 0 1px 0 $cc-white;
    position: relative;
}

.dropdown-btn:after {  /* down triangle */
    display: inline-block;
    border-style: solid;
    border-width: 4px 4px 0 4px;
    border-color: #999 transparent transparent;
    content: '';
    position: absolute;
    right: 6px;
    top: 10px;
    width: 0px;
  }

/**************************************
/* PREPROCESSOR SELECT
/**************************************/

/* HEADING */
#psdInfoSection h4.preprocessor-header {
    background: #fff;
    padding-bottom: 6px;
    border-bottom: 1px solid #d5d5d5;
    color: #444;
    font-size: 21px;
    font-size: 1.3125rem;
    font-weight: 300;
    line-height: 28px;
    padding-top: 24px;
    margin-top: 0;
    position: relative;
}

#psdInfoSection div.preprocessor {
    display: inline-block;
}

div.menu-active {
    cursor: pointer;
}

#psdInfoSection div.preprocessor.hide {
    cursor: default;
}

#psdInfoSection div.preprocessor.hide em {
    display: none;
}

#psdInfoSection div.preprocessor b {
    text-transform: none;
    font-weight: 300;
}

#psdInfoSection div.preprocessor em {
    width: 0;
    height: 0;
    position: relative;
    top: -2px;
    border-style: solid;
    border-width: 7px 5px 0 5px;
    border-color: #999 transparent transparent;
    margin-left: 6px;
    display: inline-block;
}

/* PREPROCESSOR MENU */
.extract-plugin {
    .preprocessor-selector {
        width: 150px;
        min-width: 150px;
        line-height: 32px;
        padding: 0;
    }

    .context-menu.preprocessor-selector a {
        position: relative;
        height: 32px;
        font-size: .875rem;
        padding: 0 5px 0 28px;
        border-bottom: 1px #d5d5d5 solid;
    }

    .context-menu.preprocessor-selector a.active i {
        background-position: -30px -1530px;
    }

    .context-menu.preprocessor-selector a:hover i{
        background-position: 0 -1710px;
    }
}


/**************************************
/* COLORS
/**************************************/

.color-list {
    margin-top: 15px;

    li {
        float: left;
        position: relative;
        margin-top: 0px;

        .color-chip {
            box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
            border-radius: 0;
            margin-bottom: 10px;
            margin-right: 10px;
            width: $color-chip-size;
            height: $color-chip-size;
            position: relative;
            cursor: pointer;
        }

        &:hover,
        &.selected,
        &.layer-over {
            background-color: transparent;
            .color-chip {
                outline: none;
            }
        }

        &.selected > .color-chip {
            outline: 2px solid $cc-blue;
        }
    }
}

.color-list {
    .dropper-item {
      .color-chip {
          border: 1px #bbb dashed;
          box-sizing: border-box;
          border-radius: 1px;
          box-shadow: none;
      }
    }
}

.color-chip {
    .dropper {
        background-image: url("../images/dropper@2.png");
        background-image: -webkit-image-set(url("../images/dropper.png") 1x, url("../images/dropper@2.png") 2x);
        margin: 5px auto 0 6px;
        width: 15px;
        height: 15px;
        background-size: 15px 15px;
        opacity: 0.75;
    }
}

.solid-color-list {
    @extend .color-list;
}

.gradient-list {
    @extend .color-list;
    margin-bottom: 26px;
}


/**************************************
/* FONTS
/**************************************/

#psdInfoSection .font-list {
    padding: 0;
    margin-top: 0px;
}

/**** Font Family ****/
.number-rect {
    height: $number-rect-height;
    padding-left: $number-rect-horizontal-padding;
    padding-right: $number-rect-horizontal-padding;
    min-width: number-rect-width;
    background-color: #e7e7e7;
    color: $cc-black;
    p {
        text-align: center;
        line-height: $number-rect-height + 1;
        font-size: 12px;
        margin: 0px;
    }
}


.font-family-list-item {
    margin: 0px;
    position: relative;

    .arrow {
        border-bottom: 4px solid transparent;
        border-left: 6px solid $cc-grey-dark;
        border-top: 4px solid transparent;
        width: 1px;
        height: 1px;
        position: absolute;
        top: 12px;
        left: 1px;
        pointer-events: none;
        @include backface-visibility(hidden);
        @include transform(translateZ(0) rotate(90deg));
        @include transition-property(transform);
        @include transition-duration(140ms);
    }

    &.closed {
        .arrow {
            @include transform(translateZ(0) rotate(0deg));
        }
    }

    .font-family-name {
        margin: 0;
        padding: 7px 0px 7px 41px;
        float: left;
        width: 100%;
        box-sizing: border-box;
        font-size: 14px;
        width: 90%;
        @include user-select(none);
        cursor: pointer;
        color: $cc-text;
    }

    .font-face-count {
        @extend .number-rect;
        top: 6px;
        right: 1px;
        padding: 0 6px;
        position: absolute;
        pointer-events: none;
        border-radius: $tag-border-radius;
    }

    .typekit-anchor {
        background: url("../images/typekit_small.png") no-repeat scroll 0 50%;
        background: -webkit-image-set(url("../images/typekit_small.png") 1x, url("../images/typekit_small@2x.png") 2x) no-repeat scroll 0 50%;
        position: absolute;
        width: 20px;
        height: 19px;
        top: 6px;
        left: 16px;
    }

    .typekit-anchor:hover {
        opacity: .8;
    }

    &.deactive {
        .font-family-name {
            opacity: .3;
        }
    }

    &.layer-hover {
        .font-family-name {
            color: $cc-blue-lite;
        }
    }
}

/**** Font Face List ****/
#psdInfoSection .font-list .font-face-list {
    margin: 0px;
    padding-bottom: 0px;

    .list-bottom-padding {
        height: 10px;
    }
}


#psdInfoSection .font-face-list-item {
    ul {
        width: 60%;
        float: right;
        margin: 0px;
    }

    .font-face-name {
        color: $cc-grey-dark;
        width: 37%;
        float: left;
        margin: 0px 0px 4px;
        text-align: right;
        font-size: 12px;
    }

    &.deactive {
        .font-face-name {
            opacity: .3;
        }
    }

    .text-style-size {
        @extend .number-rect;
        margin: 0px 0px 3px 0px;
        padding: 0 5px;
        display: inline-block;
        border-radius: 0;
        cursor: pointer;

        &.selected,
        &.layer-hover {
            background-color: $cc-blue;
            > p {
                color: $cc-white;
            }
        }

        &.layer-hover {
            background-color: $cc-grey-dark;
        }

        &.deactive {
            pointer-events: none;
            opacity: .3;
        }
    }
}


/**************************************
/* DERIVED ASSETS
/**************************************/
.download-frame {
    display: none;
}

#assetCounter {
    background-color: #e7e7e7;
    color: $cc-black;
    font-size: 11px;
    padding: 2px 5px;
    position: relative;
    top: -1px;
    left: 3px;
    display: inline;
    pointer-events: none;
    @include transition(0.2s, linear);
    @include transition-property(background-color, color);

    &.new_asset {
        background-color: #00A2FF;
        color: #FFF;
    }
}

#psdAssetsSection {
    .assets-content {
        padding-top: 23px;

        #extract_for_device {
            margin-right: 5px;
            color: #fff;
            font-size: 12px;
            line-height: 1.313rem;
            vertical-align: top;
            padding: 0 15px;
        }
    }

    .derived-assets-list {
        padding-left: 0px;
        padding-right: 0px;
        width: 272px;
    }

    #extract {
        margin-right: 8px;
    }

    .extraction-in-progress,
    .extraction-complete {
        display: none;
        position: relative;
        font-size: 12px;
        height: auto;
        padding: 17px 0 14px 17px;
        margin-top: 13px;
        width: 250px;

        .msg {
            width: 176px;
            position: relative;
            display: inline-block;
            margin-left: 12px;
            font-weight: normal;
            vertical-align: top;
            cursor: default;
            span.show-files {
                color: $cc-text;
                font-weight: normal;
                font-style: italic;
                font-size: 12px;
            }
        }
    }

    .extraction-in-progress {
        background: #e4f1f9;
        .extraction-spinner {
            background-image: url("../images/cc-spinner.gif");
            width: 32px;
            height: 32px;
            display: inline-block;
            margin-top: 5px;
        }
    }

    .extraction-complete {
      background: #e4f9e6;
      .icon {
          background-image: url("../images/icon-done.svg");
          width: 34px;
          height: 33px;
          display: inline-block;
          margin-top: 5px;
      }
      .close-button {
          font-size: 18px;
          cursor: pointer;
          position: absolute;
          right: 9px;
          top: 0;
      }
    }
}

.disabledLabel {
    opacity: 0.5;
}


.derived-asset-list-item {
    height: 43px;
    width: 100%;
    float: left;
    clear: left;
    position: relative;

    &:hover{
        background-color: $cc-blue-lite;

        .image-wrapper {
            border: 1px solid transparent;
        }
    }

    &.selected {
        background-color: $cc-blue-lite;
    }

    &.pending-delete {
        opacity: 0.5;
        pointer-events: none;
    }

    .image-wrapper {
        width: 42px;
        height: 32px;
        margin: 5px 8px 0 10px;
        float: left;
        background-image: url("../images/checker.svg");
        background-size: 23%;
        border: 1px solid $cc-grey-light;
        cursor: pointer;

        div {
            background: #fff url("../images/svg-icon.svg") center center no-repeat;
            width: 100%;
            height: 100%;
        }
    }

    p {
        line-height: 43px;
        margin: 0px 0px 0px 10px;
    }

    .del-button {
        width: 13px;
        height: 13px;
        background: url("../images/remove.png") no-repeat;
        background: -webkit-image-set(url("../images/remove.png") 1x, url("../images/remove@2x.png") 2x) no-repeat;
        position: absolute;
        visibility: hidden;
        cursor: pointer;
        top: -2px;
        left: 4px;
    }

    .del-button:active{
        color: $cc-blue-darker;
    }

    .settings-button {
        width: 16px;
        height: 16px;
        background: url("../images/settings.png") no-repeat;
        background: -webkit-image-set(url("../images/settings.png") 1x, url("../images/settings@2x.png") 2x) no-repeat;
        position: absolute;
        visibility: hidden;
        cursor: pointer;
        top: 13px;
        right: 33px;
    }

    .download-button {
        background: url("../images/cc-extract-sprite.svg") no-repeat 2px -78px;
        width: 18px;
        height: 17px;
        position: absolute;
        visibility: hidden;
        cursor: pointer;
        top: 13px;
        right: 9px;
    }

    .asset-label {
        display: block;
        padding-right: 3px;
        font-weight: normal;
        font-size: 12px;
        color: #444 !important;
        vertical-align: middle;
        line-height: 32px;
        position: relative;
        margin: 0 0 0 42px;
        line-height: 43px;
        max-width: 155px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        cursor: default;
    }
}

/**************************************
/* PUBLIC ONE-UP
/**************************************/

.extract-plugin.public {
    #psdInfoSection,
    #psdAssetsSection,
    #psdInspectSection {
        top: 113px;
    }
}
