/**
 * Shell of our Progressive Web App
 */
 
/** Reset approach. All the elements behave as border-box */
* {
    box-sizing: border-box; 
}

/** Basic and general style */
html, body {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-display: optional;
    color: #444;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale; 
    
}

/** Avoid horizontal scrolling */
html {
    overflow-x: hidden;
}

.modal__header {
    position: absolute;
    right: 2rem;
}

.modal__header .modal__close {
    cursor: pointer;    
}

.modal__header .modal__close:before {
    font-size: 2rem;
}

/* For the "inset" look only */
#wrapper {
    height: 100%;
}


h1 small {
    display: block;
    font-weight: 300;
}

.header {
    background-color: #2f4858;
    padding: 0 1rem;
    margin: 0 auto;
}

.header h1 {
    max-width: 48rem;
    margin: auto;
    padding-left: 3.5rem;
    background-image: url(logo-ivrmaker.png);
    background-repeat: no-repeat;
    background-size: auto 60%;
    background-position: left center;
    color: white;
    font-size: 1.5rem;
    line-height: 2.3;
}

.header h1 a {
    color: inherit;
    text-decoration: inherit;
}

.header__title {
    margin: 0 auto;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 3rem;
    text-align: center;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

body.state-media .container {
    height: calc(90vh - 3rem);
}

.container-left-column {
    background-color: #f0f0f0;
}

.container-right-column {
    position: relative;
    background-color: white;
    padding: 0 1rem 0 1rem;
}

.footer {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #323232;
    padding: 1rem;
    text-align: center;
    font-size: 0;
}

.footer img {
    display: inline-block;
    vertical-align: middle;
    max-height: 4rem;
    margin: 0 2rem;
}

.footer img:last-child {
    max-height: 2.77rem;
}


/** Loader */
.loader {
    z-index: 1000;
    
    left: 50%;
    top: 50%;
    position: fixed;
    
    -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%); 
}

.loader #spinner {
    box-sizing: border-box;
    stroke: #673AB7;
    stroke-width: 3px;
    -webkit-transform-origin: 50%;
            transform-origin: 50%;
    -webkit-animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite;
            animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite; 
}

@-webkit-keyframes rotate {
  from { -webkit-transform: rotate(0); transform: rotate(0); }
  to   { -webkit-transform: rotate(450deg); transform: rotate(450deg); } }

@keyframes rotate {
  from { -webkit-transform: rotate(0); transform: rotate(0); }
  to   { -webkit-transform: rotate(450deg); transform: rotate(450deg); } }

@-webkit-keyframes line {
  0%   { stroke-dasharray: 2, 85.964; -webkit-transform: rotate(0); transform: rotate(0); }
  50%  { stroke-dasharray: 65.973, 21.9911; stroke-dashoffset: 0; }
  100% { stroke-dasharray: 2, 85.964; stroke-dashoffset: -65.973; -webkit-transform: rotate(90deg); transform: rotate(90deg); } }

@keyframes line {
  0%   {stroke-dasharray: 2, 85.964; -webkit-transform: rotate(0); transform: rotate(0); }
  50%  {stroke-dasharray: 65.973, 21.9911; stroke-dashoffset: 0; }
  100% {stroke-dasharray: 2, 85.964; stroke-dashoffset: -65.973; -webkit-transform: rotate(90deg); transform: rotate(90deg); } }
  
.logout-action {
    position: fixed;
    top: .5rem;
    right: .5rem;
    z-index: 1000;
    color: white;
    line-height: 1;
    font-size: 2rem;
}

  
/** Main content */
.main {
    padding: 1rem;
    background-color: white;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; 
    max-width: 26rem;
    margin: 0 auto;
    
    transform: opacity;
    
}

.main.state-offline:before {
    content: "OFFLINE";
    position: fixed;
    right: .5rem;
    top: .5rem;
    background-color: #FF4136;
    text-align: center;
    color: white;
    padding: .5rem;
    z-index: 5000;
}


.menu-action {
    position: fixed;
    top: .5rem;
    right: .5rem;
    z-index: 10000;
    color: white;
    line-height: 1;
    font-size: 2rem;
    transition: all .3s ease-out;
}

#menu-action-toggle {
    display: none;
}

.menu-action > span {
    border: none;
    color: white;
    font-size: 1.25rem;
    line-height: 2rem;
    outline: none;
    cursor: pointer;
    background-color: white;
    color: #333;
    width: 2rem;
    height: 2rem;
    text-align: center;
    border-radius: 100%;
}

.navigation {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: -21rem;
    width: 20rem;
    z-index: 10000;
    transition: all .3s ease-out;
    background-color: #333;
    box-shadow: 0 0 1rem black;
}

.navigation h3 {
    margin: 0;
    padding: 0.75rem 0;
    text-align: center;
    line-height: 1.2;
    color: #333;
    background-color: white;
}

.navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.navigation li {
    display: block;
}

.navigation a {
    position: relative;
    display: block;
    padding: 1rem 0 .7rem 3.5rem;
    text-align: left;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    line-height: 1.2;
    font-weight: bold;
    background-color: #0074a3;
}

.navigation a i {
    position: absolute;
    left: 1rem;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    top: 50%;
    margin-top: -0.75rem;
}

.navigation li a {
    background-color: #006679;
}

.navigation a:hover {
    background-color: #58bc4d;
    color: white;
}

#menu-action-toggle:checked + .menu-action {
    transform: rotate(90deg);
}

#menu-action-toggle:checked ~ .navigation {
    left: 0;
}

.navigation ul.language-selector {
    text-align: right;
    margin-right: 1rem;
}

.navigation ul.language-selector li {
    display: inline-block;
    vertical-align: middle;
}

.navigation ul.language-selector li a {
    padding-left: 1rem;
    background-color: transparent;
}

.navigation ul.language-selector img {
    width: 2rem;
}

.working-box {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ff2e61;
    color: white;
    text-align: center;
    padding: 0.3rem 0;
    line-height: 1;
    z-index: 1000;
}

.working-box:not(:empty) {
    display: block;
}


div#conversations {
    max-width: 50em;
    margin: auto;
    padding: 1em;
    border-radius: 1em;
    background: #F0F0F0;
}

.conversation-item {
    padding: 0.75em;
    background: #2e8b5730;
    border-radius: 8px;
    cursor: pointer;

    display: flex;
    flex-flow: row nowrap;
    align-items: flex-start;
    justify-content: stretch;
}

.conversation-item .data {
    flex: 1 1 auto;
}

.conversation-item iframe {
    overflow: hidden;
}

div#conversations .chat-line {
    /*white-space: nowrap;*/
    text-overflow: ellipsis;
    overflow: hidden;
}

div#conversations .sender-id {
    text-align: right;
}


















nav#plugins {
    max-width: 50em;
    margin: auto;
}

div#plugin-config {
    max-width: 45em;
    margin: auto;
}

nav#plugins > div {
    padding: 1em;
    border-radius: 8px;
    background: #F0F0F0;
    margin: 0.5em;
}

nav#plugins h3 {
    margin: 0;
}

nav#plugins input[type="checkbox"] {
    margin: auto;
    padding: 1em;
    scale: 1.5;
}

nav#plugins a {
    padding: 0.5em;
    background: #58bc4d;
    color: white;
    border-radius: 8px;
}

#save {
    margin: 0;
    padding: 0.5em;
    border-radius: 8px;
    border-style: none;
    border-width: 1px;

    color: white;
    font-weight: bold;
    background: #58bc4d;
}

#cancel {
    margin: 0 0.5em;
    padding: 0.5em 1em;
    border-radius: 8px;
    border-style: solid;
    border-color: gray;
    border-width: 1px;

    color: gray;
    background: none;
}

#plugin-config form label {
    display: block;
}

#plugin-config form input {
    width: 100%;
}

#plugin-config form input[type="checkbox"] {
    width: auto;
}

#plugin-config form input[type="time"] {
    width: auto;
}

#plugin-config .session-row {
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    justify-content: stretch;

    margin: 0.5em 0;
    padding: 0.5em;

    border-radius: 0.5em;

    background: #F0F0F0;
}

#plugin-config .session-row .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
}

#plugin-config .session-row small {
    color: gray;
}

#plugin-config .order-row {
    margin: 0.5em 0;
    padding: 1em;

    border-radius: 0.5em;

    background: #F0F0F0;
}

#plugin-config .order-row small {
    color: gray;
}
