/*!
 * Start Bootstrap - SB Admin (http://startbootstrap.com/)
 * Copyright 2013-2016 Start Bootstrap
 * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
 */

/* Global Styles */

body {
    margin-top: 100px;
    background-color: #222;
}

img {
    width:100%;
    height:auto;
    border:0;
    outline:0;
    vertical-align:middle;
    display:block;
}

@media(min-width:768px) {
    body {
        margin-top: 50px;
    }
}

#wrapper {
    padding-left: 0;
}

#page-wrapper {
    width: 100%;
    padding: 0;
    background-color: #fff;
    position: relative;
}

.huge {
    font-size: 50px;
    line-height: normal;
}

@media(min-width:768px) {
    #wrapper {
        padding-left: 225px;
    }

    #page-wrapper {
        padding: 10px;
    }
}

/* Top Navigation */

.top-nav {
    padding: 0 15px;
}

.top-nav>li {
    display: inline-block;
    float: left;
}

.top-nav>li>a {
    padding-top: 15px;
    padding-bottom: 15px;
    line-height: 20px;
    color: #999;
}

.top-nav>li>a:hover,
.top-nav>li>a:focus,
.top-nav>.open>a,
.top-nav>.open>a:hover,
.top-nav>.open>a:focus {
    color: #fff;
    background-color: #000;
}

.top-nav>.open>.dropdown-menu {
    float: left;
    position: absolute;
    margin-top: 0;
    border: 1px solid rgba(0,0,0,.15);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    background-color: #fff;
    -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175);
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
}

.top-nav>.open>.dropdown-menu>li>a {
    white-space: normal;
}

ul.message-dropdown {
    padding: 0;
    max-height: 250px;
    overflow-x: hidden;
    overflow-y: auto;
}

li.message-preview {
    width: 275px;
    border-bottom: 1px solid rgba(0,0,0,.15);
}

li.message-preview>a {
    padding-top: 15px;
    padding-bottom: 15px;
}

li.message-footer {
    margin: 5px 0;
}

ul.alert-dropdown {
    width: 200px;
}

/* Side Navigation */

@media(min-width:768px) {
    .side-nav {
        position: fixed;
        top: 51px;
        left: 225px;
        width: 225px;
        margin-left: -225px;
        border: none;
        border-radius: 0;
        overflow-y: auto;
        background-color: #222;
        bottom: 0;
        overflow-x: hidden;
        padding-bottom: 40px;
    }

    .side-nav>li>a {
        width: 225px;
    }

    .side-nav li a:hover,
    .side-nav li a:focus {
        outline: none;
        background-color: #000 !important;
    }
}

.side-nav>li>ul {
    padding: 0;
}

.side-nav>li>ul>li>a {
    display: block;
    padding: 10px 15px 10px 38px;
    text-decoration: none;
    color: #999;
}

.side-nav>li>ul>li>a:hover {
    color: #fff;
}

/* Flot Chart Containers */

.flot-chart {
    display: block;
    height: 400px;
}

.flot-chart-content {
    width: 100%;
    height: 100%;
}

/* Custom Colored Panels */

.huge {
    font-size: 40px;
}

.panel-heading .huge {
    font-size: 30px;
}

.panel-green {
    border-color: #5cb85c;
}

.panel-green > .panel-heading {
    border-color: #5cb85c;
    color: #fff;
    background-color: #5cb85c;
}

.panel-green > a {
    color: #5cb85c;
}

.panel-green > a:hover {
    color: #3d8b3d;
}

.panel-red {
    border-color: #d9534f;
}

.panel-red > .panel-heading {
    border-color: #d9534f;
    color: #fff;
    background-color: #d9534f;
}

.panel-red > a {
    color: #d9534f;
}

.panel-red > a:hover {
    color: #b52b27;
}

.panel-yellow {
    border-color: #f0ad4e;
}

.panel-yellow > .panel-heading {
    border-color: #f0ad4e;
    color: #fff;
    background-color: #f0ad4e;
}

.panel-yellow > a {
    color: #f0ad4e;
}

.panel-yellow > a:hover {
    color: #df8a13;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

.pagination{
    margin: 0;
}

#page-wrapper table tbody tr td.newMsgNum{
    color: #d5155c;
    width: 120px;
    vertical-align: middle;
}

#page-wrapper table tr td.newMsgNum figure {
    width: 50px;
    float: left;
    margin: 0 5% 0 0;
}

.overCover{
    width: 100%;
    height: auto;
    min-height: 850px;
    position: absolute;
    background: #505050;
    top: 55px;
    left: 0;
    border-radius: 20px 20px 0 0;
}

.content {
    padding: 15px 15px 40px 15px;
    max-width: 900px;
    background-color: #0808086e;
    margin: 5% auto;
    border-radius: 15px;
    box-shadow: 1px 1px 10px #000000;
}

.content header {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin: 1% 0 4%;
    padding: 0 0 2% 0;
    border-bottom:#a17c44 1px solid;
}

.content hr {
    border-top:#a17c44 1px solid;
}

.msgTitle {
    overflow: hidden;
}

.msgTitle p {
    color: #fff;
    font-size: 2rem;
    padding: 0;
    margin: 0;
    line-height: 4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.content .right {
    width: 100%;
}

/* 客服對話 */

button#branch , button#type {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    align-items: center;
}

ul#selectBranch , ul#selectType {
    padding: 2% 3%;
}

ul#selectBranch input:first-child , ul#selectType input:first-child {
    margin-left: 0;
}

ul#selectBranch input , ul#selectType input {
    margin: 0 1% 0 4%;
}

.bubbleArea:first-child {
    margin: 0 0 6%;
}

.bubbleArea {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin: 5% 0;
}

.identityBubble {
    width: 10%;
    margin: 0 0 0 4%;
}

.fromUs .identityBubble {
    margin: 0 4% 0 0;
}

.membersPhoto {
    background-color: #fff;
    border-radius: 50%;
    overflow: hidden;
    text-align: center;
    height: fit-content;
    padding: 0;
    margin: 0 auto 5%;
    width: 75%;
}

.membersPhoto img {
    width: 90%;
    margin: 5% auto 0;
}

.membersName {
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    color: #ffffff;
}

.takeBubble {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    padding: 1% 2%;
    word-break: break-all;
    position: relative;
}

.takeBubble::before {
    border-color: transparent transparent transparent transparent;
    border-style: solid;
    border-width: 20px;
    content: "";
    height: 0px;
    position: absolute;
    top: 25px;
    left: -40px;
    width: 0px;
}

.takeBubble::after {
    border-color: #ffffff transparent transparent #ffffff;
    border-style: solid solid solid solid;
    border-width: 10px 20px;
    content: "";
    height: 0px;
    position: absolute;
    top: 25px;
    right: -25px;
    width: 0px;
}

.msgtime {
    position: absolute;
    color: #8f8f8f;
    font-size: 12px;
    bottom: -23px;
    left: 0;
}

.fromUs .msgtime{
    left: unset;
    right: 0;
}

.fromUs .takeBubble::before {
    border-color: transparent transparent transparent transparent;
} 

.fromUs .takeBubble::after{
    border-color: #ffffff #ffffff transparent transparent;
    right: unset;
    left: -25px;
}

.fromUs .membersPhoto img {
    padding: 6%;
}

.takeBubble p {
    color: #000;
    margin: 0;
}

.takeBubble p a {
    color: #007bff;
    margin: 0 .5%;
    text-decoration: underline;
}

#messageForm {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    height: 40px;
}

#messageForm input {
    background-color: #ffffffde;
    margin: 0 1% 0 0;
    width: 90%;
    border: 1px solid #a17c44;
}

#messageForm button {
    width: 10%;
    border: 1px solid #a17c44;
    background-color: #a17c44;
    color: #ffffff;
    font-weight: bold;
}

/* 新增訊息 */
.snapHide {
    display: none;
}

table.sendNewMsg tbody tr td:first-child {
    width: 150px;
}

table.sendNewMsg tbody tr td:last-child input[readonly*="readonly"] {
    width: 300px;
    background-color: #d7d7d7;
    border: #b9b9b9 1px solid;
}
#fromTitle {
    width: 300px;
}

table.sendNewMsg tbody tr td:last-child input[readonly*="readonly"]:focus {
    outline: none;
}

#fromWording {
    resize: none;
    height: 200px;
}

@media screen and (max-width:576px) {
    .bubbleArea:first-child {
        margin: 0 0 10vmin;
    }
    .bubbleArea {
        margin: 10vmin 0;
    }
    .massage-title {
        padding: 8px 15px;
        flex-wrap: wrap;
        border-radius: 40px;
        border: 1px solid #ffdc7d;
    }
    .massage-title-block p {
        margin: 0 !important;
    }
    .fromUs .takeBubble::before{
        content: none;
    }
    .takeBubble::before{
        content: none;
    }
    .takeBubble::after{
        content: none;
    }
    .fromUs .takeBubble::after{
        content: none;
    }
    #messageForm button {
        width: 20vmin;
    }
    .membersPhoto {
        width: 100%;
    }
    .membersName{
        display: none;
    }
}