/*
 * Copyright 2005-2015 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* basic settings */
html,
body {
    height: 100%;
}
body {
    margin: 0;
    padding: 0;
    font-weight: normal;
    font-size: 11px;
    font-family: Tahoma, sans-serif;
    line-height: 1;
    min-width: 500px;
    background-color: #f1f2f2;
}
body.rtl {
    text-align: right;
    direction: rtl;
}
body.invitation {
    min-width: 0;
    min-height: 0;
}
a {
    text-decoration: underline;
    color: #008ad9;
}
a:hover {
    text-decoration: none;
}
img {
    vertical-align: bottom;
    border: 0 none;
}
.clear {
    clear: both;
    height: 0;
    font-size: 0;
    line-height: 0;
    display: block;
    visibility: hidden;
}

/* layout of chat */
#top {
    position: relative;
    padding: 5px 14px;
    background: #ffffff url("images/topbg.gif") scroll repeat-x 0 100%;
    _zoom: 1; /* IE6 fix */
}
#chat-header {
    position: relative;
    padding: 0 10px;
    background: #f1f2f2 url("images/chatheaderbg.gif") scroll repeat-x 0 0;
    _zoom: 1; /* IE6 fix */
}
#chat {
    padding: 0 10px;
    background: #f1f2f2;
}
#message {
    padding: 0 10px;
    background: #f1f2f2;
}
#send {
    padding: 0 10px 5px;
    background: #ffffff url("images/bottombg.gif") scroll repeat-x 0 0;
}
#footer {
    width: 400px;
    margin: 0 auto;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: center;
    color: #999999;
}
#footer a {
    color: #999999;
}

/* chat header (#chat-header) */
#chat-header .background-center {
    background: #ffffff url("images/chatheaderbgc.gif") scroll repeat-x 0 0;
}
#chat-header .background-left {
    background: transparent url("images/chatheaderbgl.gif") scroll no-repeat 0 0;
    _zoom: 1; /* IE6 fix */
}
#chat-header .background-right {
    height: 42px;
    background: transparent url("images/chatheaderbgr.gif") scroll no-repeat 100% 0;
}
#logo {
    font-weight: normal;
    font-size: 17px;
    font-family: Arial, sans-serif;
    color: #495151;
    padding: 10px 0;
}
#logo a {
    float: left;
    text-decoration: none;
}
#page-title {
    float: right;
    margin-top: 5px;
    text-align: right;
}

/* common controls */
#controls-region {
    padding-right: 25px;
}
.control {
    display: inline-block;
    margin: 15px 0 0 11px;
    cursor: pointer;
    float: right;
}
.tpl-image {
    width: 16px;
    height: 16px;
    background: transparent url("images/buttons.gif") scroll no-repeat 0 0;
}
.image-close-window {
	background-position: -128px -16px;
}
a:hover .image-close-window {
	background-position: -128px 0;
}
.close-control .tpl-image {
    background-position: -128px -16px;
}
.active-close-control .tpl-image {
    background-position: -128px 0;
}
.refresh-control .tpl-image {
    background-position: -80px -16px;
}
.active-refresh-control .tpl-image {
    background-position: -80px 0;
}
.secure-mode-control .tpl-image {
    background-position: -144px -16px;
}
.active-secure-mode-control .tpl-image {
    background-position: -144px 0;
}
.history-control .tpl-image {
    background-position: -112px -16px;
}
.active-history-control .tpl-image {
    background-position: -112px 0;
}
.sound-control .sound-control-on {
    background-position: -48px -16px;
}
.active-sound-control .sound-control-on {
    background-position: -48px 0;
}
.sound-control .sound-control-off {
    background-position: -64px -16px;
}
.active-sound-control .sound-control-off {
    background-position: -64px 0;
}
.send-mail-control .tpl-image {
    background-position: -32px -16px;
}
.active-send-mail-control .tpl-image {
    background-position: -32px 0;
}
.redirect-control .tpl-image {
    background-position: -96px -16px;
}
.active-redirect-control .tpl-image {
    background-position: -96px 0;
}
.user-name-control {
    font-size: 14px;
    cursor: auto;
    float: left;
    line-height: 22px;
    margin-top: 12px;
}
.user-name-control-set {
    display: inline-block;
    vertical-align: middle;
    background-position: 0 -16px;
}
.user-name-control-set:hover {
    background-position: 0 0;
}
.user-name-control-change {
    display: inline-block;
    vertical-align: middle;
    background-position: -16px -16px;
}
.user-name-control-change:hover {
    background-position: -16px 0;
}
.user-name-control-input-background {
    width: 95px;
    height: 16px;
    padding: 3px;
    background: #ffffff url("images/input_name.gif") scroll no-repeat 0 0;
    display: inline-block;
    _background-color: transparent;
}
#user-name-control-input {
    width: 95px;
    height: 16px;
    margin: 0;
    padding: 0;
    border: 0 none;
    font-weight: normal;
    font-size: 12px;
    font-family: Tahoma, sans-serif;
}
.user-name-control-prefix {
    padding-right: 10px;
}

/* main chat region (#chat) */
#chat .background-left {
    background: #ffffff url("images/chatbgl.gif") scroll repeat-y 0 0;
}
#chat .background-right {
    background: transparent url("images/chatbgr.gif") scroll repeat-y 100% 0;
}
#chat .background-shady-center {
    background: transparent url("images/sdwbgc.png") scroll repeat-x 0 100%;
}
#chat .background-shady-left {
    background: transparent url("images/sdwbgl.png") scroll no-repeat 0 100%;
}
#chat .background-shady-right {
    position: relative;
    padding: 0 4px 40px;
    background: transparent url("images/sdwbgr.png") scroll no-repeat 100% 100%;
    _zoom: 1; /* IE6 fix */
}
#status-region {
    position: absolute;
    bottom: 20px;
    left: 14px;
    font-size: 12px;
    color: #333333;
}
.status {
    float: left;
    padding-right: 10px;
}
#avatar-region {
    float: right;
    height: 200px;
    background: #eeeeee url("images/avatarbg.gif") scroll repeat-y 100% 0;
}
.avatar {
    width: 100px;
    height: 100px;
    margin: 10px 10px 0 10px;
    text-align: center;
    line-height: 0;
    font-size: 0;
    overflow: hidden;
}
.default-avatar {
    background: transparent url("images/avatar.jpg") scroll no-repeat 50% 10px;
    width: 100px;
    height: 100px;
}
.avatar img {
    max-width: 100px;
    border: none;
}
#messages-region {
    height: 200px;
    min-height: 150px;
    overflow-y: auto;
    padding: 10px 10px 0;
    font-weight: normal;
    font-size: 10px;
    font-family: Tahoma, sans-serif;
    line-height: 1.8em;
    color: #999;
}
#messages-region .message-info {
    font-size: 1.1em;
    color: #7baa0f;
}
#messages-region .message-hidden,
#messages-region .message-event {
    font-size: 1.1em;
}
#messages-region .name-agent {
    font-size: 1.1em;
    font-weight: bold;
    color: #000;
}
#messages-region .name-user {
    font-size: 1.1em;
    font-weight: bold;
    color: #da251d;
}
#messages-region .message-agent,
#messages-region .message-user {
    font-size: 1.1em;
    color: #000;
}

/* message area (#message) */
#message .background-center {
    background: #ffffff url("images/message.png") scroll repeat-x 0 -95px;
}
#message .background-left {
    background: transparent url("images/message.png") scroll no-repeat 0 0;
}
#message .background-right {
    height: 58px;
    padding: 14px 14px 23px;
    background: transparent url("images/message.png") scroll no-repeat 100% -190px;
}
#message-input {
    overflow: auto;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-weight: normal;
    font-size: 12px;
    font-family: Tahoma, sans-serif;
    border: 0 none;
    background: transparent;
    resize: none; /* disable resize textarea in Google Chrome, Safari and Firefox 4 */
}

/* sending message area (#send) */
#post-message {
}
#send-message, .submit-button {
    float: right;
    width: 190px;
    height: 33px;
    font-weight: normal;
    font-size: 17px;
    font-family: Arial, sans-serif;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    color: #495151;
    background: url("images/submit.gif") no-repeat 0 0 transparent;
}
#send-message:hover, .submit-button:hover {
    color: #000000;
    background: url("images/submit.gif") no-repeat -190px 0 transparent;
}
#predefined-wrapper {
    float: left;
    padding: 5px 0 0 3px;
}
#predefined {
    width: 200px;
}

/* error page (error.tpl) */
#logo-wrapper {
    position: relative;
    padding: 5px 14px;
    background: #ffffff url("images/logobg.gif") scroll repeat-x 0 100%;
    _zoom: 1; /* IE6 fix */
}
.headers-inwards-wrapper-common {
    background: #ffffff url("images/wndb.gif") scroll repeat-x 0 100%;
}
.headers-inwards-wrapper-left {
    background: transparent url("images/chatbgl.gif") scroll repeat-y 0 0;
}
.headers-inwards-wrapper-right {
    background: transparent url("images/chatbgr.gif") scroll repeat-y 100% 0;
}
.headers-inwards-wrapper-top {
    background: transparent url("images/wndt.gif") scroll repeat-x 0 0;
}
.headers-inwards-wrapper-top-left {
    background: transparent url("images/wndtl.gif") scroll no-repeat 0 0;
}
.headers-inwards-wrapper-top-right {
    background: transparent url("images/wndtr.gif") scroll no-repeat 100% 0;
}
.headers-inwards-wrapper-bottom-left {
    background: transparent url("images/wndbl.gif") scroll no-repeat 0 100%;
}
.headers-inwards-wrapper-bottom-right {
    position: relative;
    padding: 14px;
    background: transparent url("images/wndbr.gif") scroll no-repeat 100% 100%;
}
.headers-inwards-wrapper-bottom-right .buttons {
    top: 14px;
    position: absolute;
    right: 25px;
}
#headers {
    padding: 0 10px;
    background: #f1f2f2;
}
#content-wrapper {
    padding: 10px 14px 50px;
    background: transparent url("images/content.gif") scroll repeat-x 0 -2px;
}
#content-wrapper {
    font-weight: normal;
    font-size: 13px;
    font-family: Arial, sans-serif;
}
.info-message {
    padding: 0 60px 0 0;
    font-weight: normal;
    font-size: 13px;
    font-family: Arial, sans-serif;
}

/* redirection page (redirect.tpl) */
.left {
    float: left;
    width: 49%;
}
.right {
    float: right;
    width: 49%;
}
.center {
    padding-top: 30px;
    text-align: center;
}
ul {
    margin: 10px 0;
    padding: 0 0 0 10px;
    list-style: none outside none;
}
ul li {
    margin: 0 0 4px;
    padding: 0 0 0 10px;
    list-style: none outside none;
    background: transparent url("images/list.gif") scroll no-repeat 0 5px;
}

/* miscellanea */
.form {
    margin: 0;
    padding: 0;
    border: 0;
    border-collapse: collapse;
    vertical-align: top;
}
.form td {
    margin: 0;
    padding: 5px;
    border: 0;
    border-collapse: collapse;
    vertical-align: top;
}
#content-wrapper #send-message {
    float: left;
    margin-top: 10px;
}
#content-wrapper input,
#content-wrapper textarea,
.headers-inwards-wrapper-bottom-right input {
    border: 1px solid #bbc4c4;
}
#ajax-loader {
    display: none;
    position: absolute;
    top: 200px;
    left: 250px;
}

/* invitations */
#invitation-messages-region {
    height: 150px;
    min-height: 150px;
    width: 388px;
    overflow-y: auto;
    padding: 0;
    font-weight: normal;
    font-size: 10px;
    font-family: Tahoma, sans-serif;
    line-height: 1.8em;
    color: #999999;
    background-color: #ffffff;
}
#invitation-messages-region .message-info {
    font-size: 1.1em;
    color: #7baa0f;
}
#invitation-messages-region .message-hidden,
#invitation-messages-region .message-event {
    font-size: 1.1em;
}
#invitation-messages-region .name-agent {
    font-size: 1.1em;
    font-weight: bold;
    color: #000000;
}
#invitation-messages-region .name-user {
    font-size: 1.1em;
    font-weight: bold;
    color: #da251d;
}
#invitation-messages-region .message-agent,
#invitation-messages-region .message-user {
    font-size: 1.1em;
    color: #000000;
}

/* confirmation dialogue */
.info-message .visitor {
    color: blue;
}
.info-message .operator {
    color: green;
}
#confirm-pane {
    width: 100%;
}
#confirm-pane .button-wrapper {
    width: 400px;
    margin: 140px auto 0;
}
#confirm-pane .submit-button {
    float: none;
    display: inline-block;
}

/* Centenario: visual overrides */
body {font-family:Segoe UI,Arial,sans-serif;color:#263746;background:#f1f4f7;}
a {color:#265d80;} a:hover {color:#173d57;}
#top,#logo-wrapper {background:#172c3e;color:#fff;padding:9px 16px;}
#logo {color:#fff;font-family:Segoe UI,Arial,sans-serif;font-weight:600;}
#page-title {color:#fff;}
#chat-header,#chat,#message,#send,#headers {background:#f1f4f7;}
#chat-header .background-center {background:#e4ebf0;border-radius:10px 10px 0 0;}
#chat-header .background-left,#chat-header .background-right {background:none;}
#chat .background-left {background:#fff;border:1px solid #dce5eb;border-radius:10px;}
#chat .background-right,#chat .background-shady-center,#chat .background-shady-left,#chat .background-shady-right {background:none;}
#avatar-region {background:#f4f7f9;}
#messages-region {font-family:Segoe UI,Arial,sans-serif;font-size:13px;line-height:1.6;color:#526372;}
#messages-region .name-agent {color:#235c7b;}
#messages-region .name-user {color:#8a6a26;}
#messages-region .message-info {color:#526f79;}
#message .background-center {background:#fff;border:1px solid #d5e0e7;border-radius:10px;}
#message .background-left,#message .background-right {background:none;}
#message-input {font-family:Segoe UI,Arial,sans-serif;font-size:14px;color:#263746;}
#send-message,.submit-button {background:#245d7d;color:#fff;border:0;border-radius:7px;font-family:Segoe UI,Arial,sans-serif;font-size:14px;font-weight:600;}
#send-message:hover,.submit-button:hover {background:#194761;color:#fff;}
#headers {padding-top:10px;}
.headers-inwards-wrapper-common {background:#fff;border:1px solid #dce5eb;border-radius:10px;}
.headers-inwards-wrapper-left,.headers-inwards-wrapper-right,.headers-inwards-wrapper-top,.headers-inwards-wrapper-top-left,.headers-inwards-wrapper-top-right,.headers-inwards-wrapper-bottom-left,.headers-inwards-wrapper-bottom-right {background:none;}
.info-message {color:#334a5a;font-family:Segoe UI,Arial,sans-serif;line-height:1.5;}
#content-wrapper {background:#f1f4f7;color:#263746;font-family:Segoe UI,Arial,sans-serif;}
#content-wrapper input,#content-wrapper textarea,.headers-inwards-wrapper-bottom-right input {border:1px solid #bfcfdb;border-radius:5px;padding:6px;box-sizing:border-box;max-width:100%;}
#footer {max-width:100%;color:#677c8b;} #footer a {color:#526e80;}
@media (max-width:540px) {#avatar-region {display:none;} #content-wrapper {padding:12px 14px 25px;} #content-wrapper .form {width:100%;} #content-wrapper input,#content-wrapper textarea {max-width:100%;} #ajax-loader {left:50%;}}

/* MCEI Centenario: navy and gold */
body {background:#071b2b;color:#e6edf5;}
a {color:#f0cd73;} a:hover {color:#ffe5a0;}
#top,#logo-wrapper {background:#0b263d;border-bottom:1px solid #31546a;}
#logo {color:#f2f5fb;min-height:38px;}
#logo img {width:120px;height:50px;max-width:38vw;object-fit:contain;object-position:left center;vertical-align:middle;}
#page-title {color:#edf3fc;font-weight:600;}
#chat-header,#chat,#message,#send,#headers,#content-wrapper {background:#071b2b;color:#e7eef7;}
#chat-header .background-center {background:#102e45;border:1px solid #45667a;border-radius:10px 10px 0 0;}
#chat .background-left {background:#0b2235;border:1px solid #496b7f;}
#avatar-region {background:#102b3f;}
#status-region {color:#c7d8e5;}
#messages-region {color:#c9d8e5;}
#messages-region .name-agent {color:#f4d37a;}
#messages-region .name-user {color:#9dd7f4;}
#messages-region .message-agent,#messages-region .message-user {color:#f0f5fa;}
#messages-region .message-info {color:#aec6d5;}
#message .background-center {background:#102d43;border:1px solid #496b7f;}
#message-input {color:#f4f7fb;}
#send-message,.submit-button {background:linear-gradient(135deg,#f8df96,#d2a437);color:#102538;box-shadow:0 2px 9px rgba(0,0,0,.25);}
#send-message:hover,.submit-button:hover {background:#ffdb78;color:#102538;}
.headers-inwards-wrapper-common {background:#102e45;border:1px solid #45667a;}
.info-message {color:#e4edf5;}
#content-wrapper input,#content-wrapper textarea,.headers-inwards-wrapper-bottom-right input {background:#102d43;color:#f4f7fa;border:1px solid #567386;}
#footer,#footer a {color:#a9becf;}
/* =========================================
   MCEI CENTENARIO - MOBILE CHAT
   ========================================= */

@media (max-width: 540px) {

    /* Remove the original 500px minimum */
    html,
    body {
        min-width: 0;
        width: 100%;
    }

    body {
        overflow-x: hidden;
        font-size: 14px;
        line-height: 1.4;
    }

    /* Keep padding inside the available width */
    #logo-wrapper,
    #top,
    #headers,
    #content-wrapper,
    #chat-header,
    #chat,
    #message,
    #send {
        box-sizing: border-box;
        width: 100%;
    }

    #logo-wrapper,
    #top {
        padding: 8px 12px;
    }

    /* Header title and logo */
    #logo {
        overflow: hidden;
    }

    #logo img {
        max-width: 105px !important;
        max-height: 45px !important;
        width: auto !important;
        height: auto !important;
    }

    #page-title {
        max-width: 55%;
        font-size: 14px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    #headers {
        padding: 8px 10px 0;
    }

    .headers-inwards-wrapper-bottom-right {
        padding: 12px;
    }

    .info-message {
        padding-right: 35px;
        font-size: 13px;
        line-height: 1.5;
    }

    #content-wrapper {
        padding: 12px 14px 30px;
    }

    /* Stack form labels above their fields */
    #content-wrapper table.form,
    #content-wrapper table.form tbody,
    #content-wrapper table.form tr,
    #content-wrapper table.form td {
        display: block;
        box-sizing: border-box;
        width: 100%;
    }

    #content-wrapper table.form td {
        padding: 4px 0;
    }

    #content-wrapper input[type="text"],
    #content-wrapper input[type="email"],
    #content-wrapper textarea,
    #content-wrapper select {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
        padding: 9px 10px;
        font-size: 16px;
    }

    #content-wrapper textarea {
        min-height: 100px;
    }

    #content-wrapper #send-message,
    #content-wrapper .submit-button {
        float: none;
        display: block;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        margin: 14px 0 0;
    }

    /* Give the conversation more room */
    #avatar-region {
        display: none;
    }

    #messages-region {
        box-sizing: border-box;
        font-size: 13px;
    }

    #footer {
        box-sizing: border-box;
        width: 100%;
        padding-right: 10px;
        padding-left: 10px;
    }
}

/* =========================================
   MCEI CENTENARIO - CLOSE CHAT BUTTON
   ========================================= */

/* Clickable button around the existing icon */
#headers .buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #cba958;
    border-radius: 9px;
    background: #102f46;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

/* Draw the X with CSS, replacing the old sprite */
#headers .buttons a .image-close-window {
    display: block;
    width: 16px;
    height: 16px;
    border: 0;
    background:
        linear-gradient(
            45deg,
            transparent 44%,
            #f3d27c 45%,
            #f3d27c 55%,
            transparent 56%
        ),
        linear-gradient(
            -45deg,
            transparent 44%,
            #f3d27c 45%,
            #f3d27c 55%,
            transparent 56%
        );
}

#headers .buttons a:hover {
    background: #24465a;
    border-color: #ffe096;
}

#headers .buttons a:focus-visible {
    outline: 2px solid #f5d47c;
    outline-offset: 3px;
}

/* Give the larger button enough room */
#headers .headers-inwards-wrapper-bottom-right .buttons {
    top: 10px;
    right: 12px;
}

#headers .info-message {
    padding-right: 46px;
}

@media (prefers-reduced-motion: reduce) {
    #headers .buttons a {
        transition: none;
    }
}
