/* MY PAGE (ebook users) */

html,body{
    height: 100%;
}

body{
    margin: 0;
    /*background-color: #e9e9e9;*/
}

/* MAIN */

#main {
    margin: 0 40px -76px 40px;
    padding-top: 120px;
    min-height: 100%;
    height: auto!important;
    margin-bottom: -76px;
}

#page {
    height: 100%;
}

#footer-push {
    clear: both;
    height: 76px;
}

#footer {
    clear: both;
    margin-top: 0;
}

#mypage-actions {
    width: 100%;
    text-align: center;
}

#new_product,
#write_ebook,
#gen_ebook,
#gen_kindle_ebook,
#icon-upload-appearance,
#import_new_product {
    left: 0;
    right: 0;
    min-width: 220px;
    /* width:220px;*/
    /* height:29px;*/
    height: 32px;
    /*background-color:rgb(78,78,78);*/
    background-color: rgb(232,167,36);
    color: #fff;
    text-transform: uppercase;
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    font-size: 0.85em;
    /* font-size:1em;*/
    padding: 4px;
    letter-spacing: 0.05em;
}

#new_product {
    margin-right: 10px;
    min-width: 180px;
    height: 34px;
}

#new_product.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#new_product.max-reached {
    color: red;
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

#import_new_product {
    color: rgb(232,167,36);
    position: relative;
}

#products-list,
.products-grid {
    margin: auto;
    left: 0;
    right: 0;
    padding-top: 20px;
    padding-left: 40px;
    padding-right: 40px;
}

.product {
    padding-bottom: 16px;
}

/* @new */
.product .book-users {
    max-height: 114px;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
}

.product.importing {
    opacity: 0.8;
}

.product .notifications-button {
    vertical-align: middle;
}

.product .notifications-button span {
    font-size: 16px;
    vertical-align: middle;
}

.product .notifications-button.active {
    color: rgb(232, 167, 36);
}

.product-icon,.product-info,.product-actions {
    display: inline-block;
    vertical-align: top;
}

.product-icon {
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

.product-actions, .product-import-actions {
    padding: 0 16px;
}

.del {
    border: 2px solid rgba(215,31,38,0.5);
    color: rgb(215,31,38);
    text-transform: lowercase;
    background-color: transparent;
    font-weight: 300;
}

.del:hover {
    border: 2px solid rgba(215,31,38,1);
}

.del .fa-trash-o {
    margin-right: 4px;
}

.action.import-config {
    display: none;
}

.importing .product-info {
    color: #999;
}

.importing .product-date,
.importing .product-title + div,
.product-import-status,
.importing .book-users,
.importing .product-actions,
.product-import-actions,
.importing .project-tags .book-print-tag,
.importing .project-tags .shared-tag {
    display: none;
}

.importing .product-import-actions,
.importing .product-import-status {
    display: block;
}

.project-import-info {
    display: none;
    font-size: 1.1em;
    font-style: italic;
    color: rgb(232,167,36);
    margin-bottom: 10px;
}

.importing .project-import-info {
    display: block;
}


.importing .import-cancel {
    color: rgb(215,31,38);
}

.importing .import-cancel::before {
    display: none;
}

button.import-config[style*="display: inline-block"] + button.import-cancel::before {
    display: inline;
}

.project-import-info::after {
    content: '...';
    width: 0;
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
    -webkit-transition: opacity 0.66s ease-out;
    transition: opacity 0.66s ease-out;
    -webkit-animation: widthchange 2s linear infinite;
    animation: widthchange 2s linear infinite;
}

@-webkit-keyframes widthchange {

    0% {
        width: 0;
        opacity: 0;
    }

    25% {
        width: 4px;
        opacity: 1;
    }

    37.5% {
        opacity: 0;
    }

    50% {
        width: 8px;
        opacity: 1;
    }

    100% {
        width: 12px;
        opacity: 0;
    }

}

@keyframes widthchange {

    0% {
        width: 0;
        opacity: 0;
    }

    25% {
        width: 4px;
        opacity: 1;
    }

    37.5% {
        opacity: 0;
    }

    50% {
        width: 8px;
        opacity: 1;
    }

    100% {
        width: 12px;
        opacity: 0;
    }

}

.product-title {
    font-family: "Roboto", sans-serif;
    font-size: 1.3em;
    text-transform: uppercase;
    font-weight: 400;
    font-style: normal;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
    text-overflow: ellipsis;
    max-height: 3em;
    overflow-y: hidden;
    overflow-x: hidden;
    word-wrap: break-word;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-title.empty {
    color: #aaa;
    font-style: italic;
}

.product-date, .product-import-status {
    vertical-align: middle;
}

.product-info .book-type {
    font-size: 0.9em;
    margin-top: 10px;
    display: inline-block;
    padding: 5px 0;
}

.product-info .book-type .type {
    color: #fff;
    border-radius: 2px;
    padding: 5px 10px;
    font-weight: bold;
}

.product.basic .book-type .type {
    background-color: rgba(232, 167, 36, 0.8);
}

.product.cookbook .book-type .type {
    background-color: rgba(103, 161, 141, 0.8);
}

.product.poetry .book-type .type {
    background-color: rgba(52, 95, 154, 0.8);
}

.product.kids_book .book-type .type {
    background-color: rgba(85, 184, 244, 0.8);
}

.product.comics_book .book-type .type {
    background-color: rgba(255, 127, 80, 0.8);
}

.product.fixed_layout_book .book-type .type {
    background-color: rgba(201, 154, 255, 0.8);
}

.product.importing .book-type .type {
    background-color: rgba(0, 0, 0, 0.2);
}

.book-users {
    position: absolute;
    right: 4px;
    top: 0;
    max-width: 80px;
    text-align: right;
}

.book-users > div {
    margin: 0 4px 8px;
}

.import-cancel {
    color: #d61e26;
}

.import-config {
    color: #4e4e4e;
}

/* /MAIN - END */

/* NEW EBOOK DIALOG */

button {
    outline: none;
    cursor: pointer;
    text-align: center;
    border: none;
}

#new_book {
    left: 0;
    right:0;
    width: 100px;
    height: 32px;
    /*background-color:rgb(78,78,78);*/
    background-color: #000;
    color: #fff;
    text-transform: uppercase;
    font-family: "Roboto", sans-serif;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    font-size: 0.9em;
    padding: 4px;
    letter-spacing: 0.1em;
    margin-bottom: 2em;
}

.create-dialog #new_book {
    margin-bottom: 0;
}

#book_models {
    text-align: left;
    width: 80%;
    margin: auto;
    margin-bottom: 1.5em;
}

#book_models label span.fa-book {
    color: rgb(232,167,36);
    font-size: 1.5em;
    vertical-align: bottom;
    margin-right: 0.2em;
}

#book_models .fa-question-circle {
    font-size: 1.7em;
    vertical-align: middle;
    cursor: pointer;
    margin-right: 10px;
}

.importing .cover-overlay .fa-spin {
    color: #000;
}

div#book-models-tip {
    background-color: #eee;
    color: #555;
    text-shadow: none;
    padding: 0.5em;
    border-radius: 5px;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    overflow-y: auto;
    max-height: 450px;
}

div#book-models-tip h3{
    margin-bottom: 0.5em;
}

div#book-models-tip{
    font-weight: normal;
}

#book_models .book-model-formats {
    font-size: 0.9em;
    margin-top: 10px;
    display: inline-block;
    color: #fff;
    background-color: rgba(164, 164, 164, 0.5);
    border-radius: 2px;
    padding: 5px 10px;
    font-weight: bold;
}

#book_models .book-model-description {
    overflow-x: hidden;
    overflow-y: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding-top: 0.8em;
    font-size: 0.9em;
    color: #888;
}

#book_models .book-model-description-more {
    width: 100%;
    display: block;
    text-align: right;
    color: #e8a723;
    font-size: 0.9em;
    font-style: italic;
    font-weight: bold;
    cursor: pointer;
}

/* /NEW EBOOK DIALOG - END */

/* PRODUCTS NAVBAR */

#products-navbar {
    text-align: center;
    margin-bottom: 20px;
}

.bt-touch #products-navbar {
    display: none;
}

.lipageinfo {
    display: block;
    margin: 1em;
    font-style: italic;
    color: #777;
}

.licurpage {
    background-color: #fff;
    min-width: 24px;
    display: inline-block;
    border-radius: 18px;
    border: 2px solid rgb(232,167,36);
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    max-height: 24px;
    margin-right: 0.4em;
    line-height: 20px;
}

.lipagelink {
    margin-right: 0.4em;
}

#products-list .cover,
.products-grid .cover {
    cursor: pointer;
}

/* /PRODUCTS NAVBAR - END */

/* CONTINOUS SCROLL LOADER */

.products-list-loader {
    width: 100%;
    text-align: center;
}

/* USER AVATAR */

.book-users, .project-import-info {
    margin-top: 8px;
}

.book-users > .user-avatar {
    margin-right: 4px;
    display: inline-block;
    cursor: pointer;
}

.book-users .user-avatar.medium.add-user {
    position: relative;
    background-color: #aaa;
}

/* @new */
.button.user-avatar.medium.add-user {
    order: -1;
}

.book-users span.fa.fa-user {
    font-size: 16px;
}

.book-users .add-user span.fa.fa-user {
    margin-right: 2px;
}

.book-users span.fa.fa-plus {
    position: absolute;
    font-size: 8px;
    top: 5px;
    right: 5px;
    line-height: 10px;
}

.qtip-content .user-info{
    font-weight: normal;
    font-style: normal;
    font-size: 1.2em;
    text-shadow: 0px 0px;
    font-family:  "Roboto", 'sans-serif';
}

.qtip-content .user-info .user-name{
    font-weight: bold;
}

.qtip-content .user-info .user-role{
    font-size: 0.9em;
}

#cover-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    background-color: rgba(0,0,0,0.7);
}

#cover-preview-overlay .cover-preview-big {
    position: absolute;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    -webkit-transition: all 200ms;
    transition: all 200ms;
    -webkit-transform-origin: 50% 50%;
    transform-origin: 50% 50%;
}

/* /USER AVATAR - END */

/* RESPONSIVE CUSTOMIZATIONS */

.open-actions-btn,
.top-nav {
    display: none !important;
}

#ebook-authoring-header {
    text-align: right;
    height: 78px;
}

#user-panel {
    position: relative;
    padding: 15px 0;
    display: inline-block;
    vertical-align: middle;
}

/* /RESPONSIVE CUSTOMIZATIONS - END */

/* NEW EBOOK DIALOG */

#book_models {
    text-align: center;
}

#book_models .book-model-description {
    white-space: normal;
}

#new-ebook-dialog .back-btn {
    font-size: 0.8em;
    margin: 0.6em;
    /*color: rgb(78,78,78);*/
    color: #000;
    background-color: transparent;
    position: absolute;
    top: 0;
    left: 0;
    padding: 2px;
}

#new-ebook-dialog .close_dialog {
    padding: 2px;
}

#new-ebook-dialog .create-dialog {
    min-height: 450px;
}

#new-ebook-dialog #change-theme {
    margin-bottom: 14px;
}

#new-ebook-dialog .change-theme-btn {
    color: #939292;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 0.05em;
}

#new-ebook-dialog .change-theme-btn span {
    margin-right: 4px;
    margin-left: 8px;
}

#new-ebook-dialog .change-theme-btn:hover {
    color: rgb(232, 167, 36);
}

#new-ebook-dialog #change-theme .active-theme a {
    color: rgb(232, 167, 36);
    font-weight: bold;
}

#new-ebook-dialog #change-theme .active-theme .leopardi-detail {
    font-style: italic;
    color: #939292;
    margin-left: 4px;
    display: none;
}

#new-ebook-dialog #change-theme .active-theme #leopardi-active + .leopardi-detail {
    display: inline;
}

.create-dialog h3 {
    margin: 1em 0 0;
}

.create-dialog .import-section {
    border: 2px dashed #b3b3b3;
    border-radius: 10px;
    position: relative;
    background-image: url('/images/create_dialog_bg.png'); /* SISTEMARE PATH */
    background-repeat: no-repeat;
    background-size: 90px;
    background-position: 40px center;
    overflow: hidden;
    min-height: 220px;
}

.create-dialog .import-section.import-cover {
    padding-left: 100px;
    padding-right: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background-image: none;
}

.create-dialog .import-section.import-cover .cover-background-image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('/images/import_cover_bg.svg');
    background-size: 80px;
    background-position: 10px;
    background-repeat: no-repeat;
}

#new-cover-dialog .import-section .remove-img {
    position: absolute;
    left: 10px;
    bottom: 20px;
    min-width: 50px;
    width: 80px;
    font-size: 0.6em;
    padding-left: 1px;
    padding-right: 1px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-top: 0;
    min-height: 10px;
    line-height: 1em;
    height: 24px;
    display: none;
}

.create-dialog .import-section.import-cover .checkbox-info-button {
    color: #B1B1B1;
    background-color: transparent;
    font-size: 18px;
}

.create-dialog .import-section.import-cover .checkbox-info-button,
.create-dialog .import-section.import-cover .inputcheckbox {
    vertical-align: middle;
}

.create-dialog .import-section.highlight {
    border-color: rgb(232,167,36);
}

.create-dialog .import-section.dialog-section h4 {
    margin-top: 20px;
}

.create-dialog .import-section.dialog-section h4::first-letter,
.dialog-section h4::first-letter {
    text-transform: uppercase;
}

.create-dialog .import-section h5 {
    color: #b3b3b3;
    font-size: 1em;
    font-style: italic;
    margin-top: 30px;
    margin-bottom: 20px;
}

.create-dialog .import-section .button.dark-button {
    background-color: #808080 !important;
    margin-top: 14px;
}

.create-dialog .import-section .small-button {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 8px;
    min-width: 210px;
}

.create-dialog .import-section .small-button.cancel-button {
    margin-top: 1em;
}

.create-dialog .import-uploader-progress-bar {
    margin-top: 10px;
    margin-bottom: 20px;
}

.create-dialog .import-section .info-button {
    background-color: transparent;
    position: absolute;
    top: 0;
    right: 0;
    padding: 6px;
    color: #808080;
}

.create-dialog .import-section > .loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    display: none;
}

.create-dialog .import-section > .loader .fa-spin {
    position: absolute;
    top: 50%;
    margin-top: -0.5em;
    left: 50%;
    left: calc(50% - 20px);
}

#new-ebook-dialog .status-msg,
#new-cover-dialog .status-msg {
    overflow: hidden;
    max-height: 2em;
    /* display: none; */
    margin: 10px auto 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 50%;
    font-size: 0.9em;
    text-transform: lowercase;
    color: #999;
}

#new-ebook-dialog .activity-indicator {
    font-size: 2em;
    margin: 10px;
}

#new-ebook-dialog .status-msg.warning,
#new-cover-dialog .status-msg.warning {
    color: orange;
}

#new-ebook-dialog .status-msg.error,
#new-cover-dialog .status-msg.error {
    color: red;
    margin-bottom: 2px;
}

#new-ebook-dialog .status-msg.two-lines,
#new-cover-dialog .status-msg.two-lines {
    max-height: 2.5em;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#new-ebook-dialog .status-msg a,
#new-cover-dialog .status-msg a {
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    color: inherit;
}

.import-section .filename {
    font-weight: bold;
    font-style: italic;
    color: #666;
}

/* /NEW EBOOK DIALOG - END */

/* DIALOG STEPS */

.dialog-steps {
    white-space: nowrap;
    overflow: hidden;
    -webkit-transition:-webkit-transform 0.25s ease-out 0.1s;
    transition:-webkit-transform 0.25s ease-out 0.1s;
    transition:transform 0.25s ease-out 0.1s;
    transition: transform 0.25s ease-out 0.1s, -webkit-transform 0.25s ease-out 0.1s;
}

.dialog-step {
    width: 100%;
    display: inline-block;
    position: relative;
    -webkit-transition: opacity 0.25s ease-out 0.1s;
    transition: opacity 0.25s ease-out 0.1s;
    /*opacity: 0;*/
    vertical-align: middle;
    padding: 20px;
    white-space: normal;
}

/*.dialog-current-step {
margin-left: 0;
opacity: 1;
}*/

.dialog-second-step {
    margin-left: -4px;
}

.dialog-section {
    padding: 10px;
    margin-bottom: 20px;
}


.dialog-section:last-child {
    margin-bottom: 0;
}

.dialog-section h4 {
    color: #808080;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.dialog-info {
    color: #b3b3b3;
    font-style: italic;
    margin-top: 20px;   
}

/* /DIALOG STEPS - END */

/* UPLOADER */

.import-uploader-progress-bar {
    background-color: #ddd;
    height: 4px;
    max-width: 400px;
    display: block;
    margin: auto;
    position: relative;
    display: none;
    margin-bottom: 0.5em;
}

.import-uploader-progress-bar .progress-indicator-bar {
    background-color: rgb(232, 167, 36);
    width: 0;
    height: 4px;
    position: absolute;
    left: 0;
    border-right: 1px solid #fff;
}

#new-cover-dialog .cover-img-preview-progress {
    position: absolute;
    top: calc(50% - 16px);
    left: 45px;
    color: #666;
    pointer-events: none;
}

/* UPLOADER - END */

.actions .button + .button {
    margin-left: 15px;
}

/* MEDIA QUERY */

@media only screen and (max-width: 720px) {

    #new-ebook-dialog .back-btn span {
        font-size: 35px;
    }

    #book_models {
        margin-top: 20px;
    }

    .create-dialog label {
        margin-right: 0;
    }

}

@media only screen and (max-width: 360px) {

    .beta::before {
        right: 0;
        top: 36px;
        border-bottom-left-radius: 2px;
        border-top-left-radius: 0;
    }

    .beta::after {
        right: 43px;
        top: 26px;
        -webkit-transform: rotate(45deg);
        transform: rotate(90deg);
    }

    /*.product-actions .action,
    .product-actions .action:last-child { REMOVED - WRITE 4.0
    width: 100%;
    display: block;
}*/

}

@media only screen and (min-width: 361px) and (max-width: 480px) {

    /*.product-actions .action,
    .product-actions .action:last-child { REMOVED - WRITE 4.0
    display: inline-block;
    width: auto;
}*/

}

@media only screen and (max-width: 480px) {

    .product-actions .action,
    .product-actions .action:last-child {
        font-size: 12px;
        /*padding-left: 16px;  REMOVED - WRITE 4.0
        padding-right: 16px;
        width: 100%;
        max-width: 260px;
        margin-left: auto;
        margin-right: auto;
        display: block;*/
    }

    #products-list,
    .products-grid {
        padding-top: 0;
    }

    .product {
        max-width: 310px;
        margin-left: auto;
        margin-right: auto;
    }

    .product-icon, 
    .product-info, 
    .product-actions {
        display: block;
    }

    .product-info {
        position: static;
        padding-left: 0;
        padding-right: 0;
        margin-left: 0;
        text-align: center;
    }

    .product-icon div.cover {
        width: 100%;
        margin-bottom: 10px;
        margin-left: -8px;
        margin-top: -8px;
        margin-right: -8px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .cover.missing {
        background-origin: content-box;
        padding: 0 90px;
    }

    .product-title {
        white-space: normal;
    }

    .create-product-box {
        display: none;
    }

    #books-actions {
        padding: 0 0 20px;
    }

}

@media only screen and (min-width: 481px) {

    .grid-actions > div:last-child .actions {
        margin-top: 0;
    }

}

@media only screen and (min-width: 481px) and (max-width: 600px) {

    .product-info {
        margin-left: 0;
    }

    .product-icon div.cover {
        /*width: 88px;*/
        width: 100%;
    }

}

@media only screen and (max-width: 600px) {

    #main {
        margin: 0 auto -76px auto;
    }

    #products-list,
    .products-grid {
        padding-left: 16px;
        padding-right: 16px;
    }

    .product { 
        position: relative;
    }

    .product-info {
        width: 100%;
    }

    .product-title {
        min-width: 1px;
        /*line-height: 1em;*/
    }

    .product-info .book-type {
        font-size: 0.8em;
        margin-top: 8px;
        padding: 4px 0;
        line-height: 1em;
    }

    .book-users {
        margin-top: 14px;
    }

    #mypage-actions button {
        display: block;
        margin: 0 auto 0 auto;
    }

    #mypage-actions button:first-child {
        margin-bottom: 20px;
    }

}

@media only screen and (max-width: 720px) {

    .dialog-step {
        padding: 0;
    }

    .create-dialog h3 {
        margin: 60px 0 1em 0;
    }

}

@media only screen and (min-width: 481px) and (max-width: 768px) {

    .flex-grid.flex-grid-4 > div {
        width: 50%;
    }

}

@media only screen and (max-width: 768px) {

    #products-list,
    .products-grid {
        max-width: 100%;
    }

    .product-actions {
        float: none;
        display: block;
    }

    #main {
        padding-top: 78px;
    }

}

@media only screen and (max-width: 800px) {

    #products-list,
    .products-grid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .themes-short-list {
        padding-left: 0;
        padding-right: 0;
    }

}

@media only screen and (max-width: 960px) {

    #products-list,
    .products-grid {
        width: 100%;
        padding-top: 0;
    }

    #new_product {
        display: none;
    }

}

@media only screen and (max-width: 1100px) {

    #user-panel {
        padding: 12px 0;
    }

}
