/*
 DejaLu
 Copyright (c) 2015 Hoa V. DINH. All rights reserved.
 */

html {
    padding: 0;
    margin: 0;
}

body {
    font-family: "Helvetica Neue";
    font-size: 15px;
    padding: 0;
    margin: 0;
    -webkit-user-select: none;
    margin-bottom: 40px;
}

.message .content table {
    line-height: normal;
}

#templates {
    display: none;
}

#recipient {
    font-size: 14px;
    position: fixed;
    /*border-bottom: 1px solid #eee;*/
    border-bottom: 1px solid #ddd;
    padding: 10px;
    background-color: white;
    left: 0;
    right: 0;
    z-index: 1;
    min-height: 15px;
}

#recipient .content {
    font-weight: bold;
}

#recipient-margin {
    min-height: 36px;
}

.subject {
    /*
     margin: 10px;
     margin-left: 50px;
     margin-right: 50px;
     */
    /*
     padding: 10px;
     */
    font-size: 30px;
    font-weight: 300;
    padding-top: 10px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 14px;
    /*font-weight: bold;*/
    color: #bbb;
    max-width: 600px;
    margin: 0 auto;
    /*text-align: center;*/
    display: -webkit-flex;
}

.subject:hover {
    /* text-decoration: underline; */
}

.subject .subject-text {
    display: inline-block;
    -webkit-user-select: text;
    -webkit-flex: 1 1 auto;
}

.subject .conversation-has-attachment {
    cursor: default;
    display: inline-block;
    -webkit-flex: 0 1 auto;
    min-width: 30px;
    height: 30px;
    position: relative;
    top: 2px;
    background-image: url(DejaLu_Attachment_24.png);
    opacity: 0.3;
    background-size: 25px 24px;
    background-repeat: no-repeat;
    background-position: center;
}

.subject .conversation-has-attachment.hidden {
    display: none;
}

.subject .conversation-has-attachment:hover {
    opacity: 0.6;
}

.subject .conversation-has-attachment:active {
    opacity: 0.8;
}

.subject .conversation-reply {
    cursor: default;
    display: inline-block;
    -webkit-flex: 0 1 auto;
    min-width: 30px;
    height: 30px;
    position: relative;
    top: 2px;
    background-image: url(DejaLu_Reply_24.png);
    opacity: 0.3;
    background-size: 27px 24px;
    background-repeat: no-repeat;
    background-position: center;
    margin-left: 10px;
}

.subject .conversation-reply.hidden {
    display: none;
}

.subject .conversation-reply:hover {
    opacity: 0.6;
}

.subject .conversation-reply:active {
    opacity: 0.8;
}

.message {
    position: relative;
    border-bottom: 1px solid #ddd;
    opacity: 1;
    transition: opacity 0.25s;
}

.message.hidden {
    opacity: 0;
}

.message.bubble {
    padding: 20px;
    margin: 0 auto;
    max-width: 600px;
    margin-bottom: 12px;
}

.message.bubble.larger {
    max-width: 800px;
}

.message.bubble.me:not(.read) {
    /*  background-color: #f0f0ff;*/
}

.message .content {
    color: #444;
    -webkit-user-select: text;
    word-wrap: break-word;
    -webkit-nbsp-mode: space;
    overflow-x: scroll;
    padding-left: 10px;
    padding-right: 10px;
    line-height: 19px;
    margin-top: 5px;
}

.message .content a {
    color: #2E6AFF;
}

.message .content-container {
    /*
     margin-left: -10px;
     padding-left: 20px;
     margin-right: -10px;
     padding-right: 20px;
     */
    /*
     padding-left: 10px;
     padding-right: 10px;
     */
    margin-top: 10px;
    transition: height 250ms;
    left: 0;
    right: 0;
    overflow-y: hidden;
    position: relative;
    left: -10px;
    width: calc(100% + 20px);
}

.message-placeholder {
    color: #ccc;
}

.message .content-container.setup {
    transition: none;
}

/*
.message .headers {
    overflow: hidden;
    transition: height 250ms;
}

.message .headers.hidden {
    height: 0;
}
 */

.message .headers-content {
    background-color: #eee;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 15px;
    line-height: 20px;
    max-width: 570px;
    margin-left: auto;
    margin-right: auto;
}

.header-name {
    text-align: right;
    vertical-align: top;
}

.header-value {
    position: relative;
    top: 1px;
    -webkit-user-select: text;
}

.header-container.hidden {
    display: none;
}

.header-date-container {
    display: none;
}

.header-replyto-container .header-name, .header-from-container .header-name, .header-to-container .header-name, .header-cc-container .header-name, .header-bcc-container .header-name {
    padding-top: 2px;
}

/*
 .message.bubble.read {
 padding-bottom: 7px;
 }
 */

/*
 .message.bubble.read .sender {
 color: #aaa;
 }
 */

.message.bubble.read .content-container {
    /*height: 25px;*/
}

/*
 .message.bubble.read .content {
 color: #aaa;
 }
 */

.message.bubble .read-overlay {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.40);
}

.message.bubble.me .read-overlay {
    /*  background-color: rgba(240, 240, 255, 0.40);*/
}

.message.bubble.read .read-overlay {
    pointer-events: all;
    display: block;
    opacity: 1.0;
}

.message.bubble.selected .date {
    color: rgba(0, 128, 255, 0.6);
}

.message.bubble.read .content-footer {
    position: absolute;
    left: 0;
    right: 0;
    /*
     height: 15px;
     bottom: 10px;
     background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
     */
    height: 30px;
    bottom: 20px;
    background: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 90%, rgba(255, 255, 255, 1) 100%);
}

/*
 .message.bubble.read.me .content-footer {
 background: -webkit-linear-gradient(top, rgba(240, 240, 255, 0) 0%,rgba(240, 240, 255, 1) 100%);
 }
 */

.message.bubble.read .content-footer.actual-size {
    display: none;
}

.sender-line {
    max-width: 600px;
    margin: 0 auto;
    display: -webkit-flex;
}

.sender {
    position: relative;
    /*  padding-left: 10px;*/
    /*font-size: 15px;*/
    font-size: 20px;
    /*
     font-weight: bold;
     font-size: 10px;
     */
    /*color: #080;*/
    color: #000;
    display: inline;
    -webkit-flex: 1 1 auto;
    /*
     text-overflow: ellipsis;
     white-space: nowrap;
     overflow: hidden;
     */
}

.sender .hover {
    transition: none;
    position: absolute;
    border: 1px solid #ddd;
    padding: 5px;
    padding-bottom: 5px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 5px;
    opacity: 1;
    top: -6px;
    left: -11px;
    z-index: -1;
    background-color: #fcfcfc;
}

.sender .hover.hidden {
    transition: opacity 250ms;
    opacity: 0;
}

.sender .hover .arrow-down {
    position: absolute;
    right: 5px;
    top: 13px;
    height: 12px;
    width: 12px;
    opacity: 0.6;
    background-image: url(DejaLu_ArrowDown_12.png);
    background-size: 9px 12px;
    background-repeat: no-repeat;
    background-position: center;
}

.sender .ellipsis {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.message.bubble.me .sender {
    color: #0974d1;
}

.sender:hover {
    position: relative;
    /*text-decoration: underline;*/
    cursor: default;
}

.sender .recipient-text.hidden {
    display: none;
}

.sender .recipient-text {
    transition: color 0.25s, margin 0.25s;
    color: #888;
    margin-left: 0px;
}

.sender:hover .recipient-text {
    /*color: rgba(128, 128, 128, 0.10);*/
    margin-left: 20px;
}

.date {
    position: relative;
    top: 7px;
    /*right: 0;*/
    -webkit-flex: 0 1 auto;
    color: #ccc;
    font-size: 13px;
}

.debug-msg-rowid {
    display: none;
    position: relative;
    font-size: 13px;
    top: 7px;
    margin-right: 10px;
    color: red;
}

#messages.debug-enabled .debug-msg-rowid {
    display: inline;
}

#subject-container {
    /*background-color: #f8f8f8;*/
    /*background: linear-gradient(to bottom, rgba(240,240,240,1) 0%,rgba(255,255,255,1) 20%,rgba(255,255,255,1) 100%);*/
    /*padding-top: 20px;*/
    /*border-bottom: 1px solid #ddd;*/
    position: relative;
    transition: opacity 0.25s;
    opacity: 1;
}

#subject-container.me:not(.read) {
    /*background-color: #f0f0ff;*/
}

/*
 #subject-container .read-overlay {
 opacity: 0;
 pointer-events: none;
 position: absolute;
 left: 0;
 right: 0;
 top: 0;
 bottom: 0;
 background-color: rgba(255, 255, 255, 0.60);
 }

 #subject-container.me .read-overlay {
 }

 #subject-container.read .read-overlay {
 pointer-events: all;
 display: block;
 opacity: 1.0;
 }
 */

#subject-container.hidden {
    opacity: 0;
}

#subject-container .recipient {
    font-size: 12px;
    padding-top: 3px;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 600px;
    margin: 0 auto;
    color: #ccc;
    /*text-align: center;*/
}

#subject-container .recipient.hidden {
    display: none;
}

.subject-separator {
    /*border-top: 1px solid #ccc;
     width: 400px;
     margin: 0 auto;
     */
    height: 10px;
}

#reply-button {
    position: absolute;
    right: 10px;
    top: 10px;
    color: #ccc;
    -webkit-transition: opacity 0.25s;
}

#reply-button.hidden {
    opacity: 0;
}

#reply-button:hover {
    color: #888;
}

#reply-button:active {
    color: #444;
}

#reply-container {
    margin-bottom: 30px;
    -webkit-transition: height 0.25s, margin 0.25s, opacity 0.25s;
    height: 100px;
    opacity: 1;
}

#reply-container.hidden {
    margin-bottom: 0px;
    opacity: 0;
    height: 0px;
    pointer-events: none;
    display: none;
}

.reply-content-container {
    left: 0;
    right: 0;
    /*overflow: scroll;*/
    border: 1px solid #ddd;
    border-radius: 3px;
    margin: 10px;
    height: 70px;
}

.reply-content-container.focused {
    border: 1px solid #ddf;
}

.reply-content-container.hidden {
    height: 0;
    border: none;
    margin: 0;
    margin-left: 10px;
    margin-right: 10px;
}

.reply-content {
    padding: 10px;
    -webkit-user-select: text;
    outline: none;
    height: 100%;
}

.reply-button-container {
    text-align: right;
    margin-left: 10px;
    margin-right: 10px;
}

.reply-button-container button {
    outline: none;
    width: 80px;
    background-color: #eee;
    border: 1px solid #ccc;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 3px;
}

.reply-button-container button:active {
    background-color: #ddd;
    border: 1px solid #ccc;
}

blockquote[type=cite] {
    border-left: 1px solid #ccc;
    margin-left: 0;
    margin-right: 0;
    padding-left: 10px;
}

blockquote {
    margin-left: 0;
    margin-right: 0;
    padding-left: 10px;
}

#message-template {
    display: none;
}

#subject-template {
    display: none;
}

.message-container {
    max-width: 600px;
    margin: 0 auto;
}

.message.larger .message-container {
    max-width: 800px;
}

#more-messages {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    color: #bbb;
    /*display: none;*/
    cursor: default;
    font-size: 18px;
}

#more-messages.hidden {
    display: none;
}

#more-messages.temporary-hidden {
    opacity: 0;
}

#more-messages:hover {
    color: #444;
}

#more-messages-text {
    margin: 0 auto;
    max-width: 600px;
}

.address {
    display: inline-block;
    margin-right: 5px;
    cursor: default;
    border: 1px solid rgba(0, 0, 0, 0);
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 5px;
}

.address:hover {
    border: 1px solid #aaa;
}

.address .display-name {
}

.address .mailbox {
    color: #888;
}

#update-button {
    position: fixed;
    top: 10px;
    width: 100%;
    text-align: center;
    -webkit-transition: top 0.25s;
}

#update-button.hidden {
    top: -50px;
}

#update-button .content {
    cursor: default;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.5);
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

#update-button:hover .content {
    background-color: rgba(0, 0, 0, 0.75);
}

.-dejalu-image {
    max-width: 600px;
    max-height: 400px;
    width: auto;
    height: auto;
}

.images-container {
    margin-top: 20px;
    display: block;
}

.image-container {
    display: inline-block;
    width: 190px;
    height: 190px;
    position: relative;
    left: -10px;
}

.container .image-wrapper {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.container .image-wrapper.has-border {
    border: 1px solid #ccc;
    background-color: #fff;
}

.container .selection-wrapper {
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    padding: 10px;
    border-radius: 10px;
}

.container.selected .selection-wrapper {
    background-color: #e0e0e0;
}

.image-container, .attachment-container, .embedded-image-container {
    -webkit-user-select: none;
}

.embedded-image-container .image-wrapper, .image-container .image-wrapper, .attachment-container {
    -webkit-user-drag: element;
}

.attachment-container .image-wrapper, .attachment-container .selection-wrapper, .attachment-container img {
    -webkit-user-drag: none;
}

.image-container img {
    position: absolute;
    left: -100%;
    right: -100%;
    margin: auto;
    background-color: #fff;
}

.image-container .overlay {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    opacity: 0.0;
}

.image-container:hover .overlay {
    opacity: 1.0;
}

.image-container.selected .overlay {
    opacity: 1.0;
}

.image-container .attachment-name {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    color: #ccc;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-container.selected .attachment-name {
    color: #eee;
    background-color: #0069d9;
}

.image-container img.portrait {
    max-width: 100%;
}

.image-container img.landscape {
    max-height: 100%;
}

.image-container img.smaller-height {
    top: -100%;
    bottom: -100%;
}

.embedded-image-container {
    display: inline-block;
    position: relative;
    left: -10px;
}

.embedded-image-container.hidden {
    display: none;
}

.embedded-image-container img {
    position: relative;
}

.embedded-image-container img.bigger {
    max-width: 580px;
    max-height: 400px;
    width: auto;
    height: auto;
}

.embedded-image-container .overlay {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    opacity: 0.0;
}

.embedded-image-container:hover .overlay {
    opacity: 1.0;
}

.embedded-image-container.selected .overlay {
    opacity: 1.0;
}

.embedded-image-container .attachment-name {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    color: #ccc;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.embedded-image-container.selected .attachment-name {
    color: #eee;
    background-color: #0069d9;
}

.attachments-container {
    margin-top: 20px;
    display: block;
}

.attachment-container {
    width: 180px;
    height: 120px;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    -webkit-user-select none;
}

.attachment-container .selection-wrapper {
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.attachment-container img {
    margin: auto;
    display: block;
    width: 64px;
    height: 64px;
}

.attachment-container .attachment-name-container {
    text-align: center;
    height: 21px;
    color: #888;
    margin-top: 5px;
    padding-top: 2px;
}

.attachment-container .attachment-name {
    display: inline-block;
    border-radius: 5px;
    padding-top: 2px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 170px;
}

.attachment-container.selected .attachment-name {
    color: #eee;
    background-color: #0069d9;
}

.container.loading img {
    opacity: 0;
}

.container .placeholder {
    background-color: #eee;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.0;
}

.container.loading .placeholder {
    opacity: 1.0;
}

.-dejalu-text-part {
    margin-bottom: 10px;
}

.-dejalu-highlighted {
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(244, 234, 38, 0.7)), to(rgba(237, 206, 0, 0.7)) );
}

.-dejalu-search-result-focus {
    -webkit-box-sizing: border-box;
    box-shadow: 0 0 2px #444;
}

@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    
    .subject .conversation-has-attachment {
        background-image: url(DejaLu_Attachment_24@2x.png);
    }
    
    .subject .conversation-reply {
        background-image: url(DejaLu_Reply_24@2x.png);
    }
    
    .sender .hover .arrow-down {
        background-image: url(DejaLu_ArrowDown_12@2x.png);
    }
    
}
