/* ============================================================
   ARTURO SUPPORT
   ============================================================ */

#arturo-support-root {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999999;

    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}


/* ============================================================
   LAUNCHER
   ============================================================ */

#arturo-support-root .arturo-chat__launcher {
    border: 0;
    border-radius: 999px;
    padding: 14px 22px;
    cursor: pointer;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, .18);
}


/* ============================================================
   CHAT WINDOW
   ============================================================ */

#arturo-support-root .arturo-chat {
    width: 360px;
    height: 520px;

    display: flex;
    flex-direction: column;

    background: #fff;
    border-radius: 16px;

    box-shadow:
        0 14px 45px rgba(0, 0, 0, .22);

    overflow: hidden;

    box-sizing: border-box;
}


#arturo-support-root .arturo-chat[hidden] {
    display: none !important;
}


/* ============================================================
   HEADER
   ============================================================ */

#arturo-support-root .arturo-chat__header {
    flex: 0 0 68px;
    min-height: 68px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #eee;

    box-sizing: border-box;
}


#arturo-support-root .arturo-chat__header strong {
    display: block;

    margin: 0;
    padding: 0;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}


#arturo-support-root .arturo-chat__header small {
    display: block;

    margin: 3px 0 0;
    padding: 0;

    font-family: inherit;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;

    opacity: .65;
}


#arturo-support-root .arturo-chat__close {
    width: 36px;
    height: 36px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;
    background: transparent;

    font-family: inherit;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;
}


/* ============================================================
   MESSAGES
   ============================================================ */

#arturo-support-root .arturo-chat__messages {
    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 16px;

    box-sizing: border-box;
}


#arturo-support-root .arturo-chat__message {
    max-width: 82%;

    margin: 0 0 12px;
    padding: 10px 13px;

    border-radius: 12px;

    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;

    white-space: pre-wrap;
    overflow-wrap: anywhere;

    box-sizing: border-box;
}


#arturo-support-root
.arturo-chat__message--assistant,
#arturo-support-root
.arturo-chat__message--human {
    background: #f1f1f1;
    margin-right: auto;
}


#arturo-support-root
.arturo-chat__message--user {
    background: #222;
    color: #fff;
    margin-left: auto;
}


#arturo-support-root
.arturo-chat__message--system {
    background: #fff4d6;
    margin-left: auto;
    margin-right: auto;
}


/* ============================================================
   ORDER VERIFICATION
   ============================================================ */

#arturo-support-root
.arturo-chat__order-verify {
    width: 100%;

    margin: 4px 0 14px;
    padding: 14px;

    background: #f8f8f8;

    border: 1px solid #e5e5e5;
    border-radius: 12px;

    box-sizing: border-box;

    font-family: inherit;
    color: #333;
}


#arturo-support-root
.arturo-chat__order-verify-title {
    margin: 0 0 12px;
    padding: 0;

    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}


#arturo-support-root
.arturo-chat__order-verify-form {
    width: 100%;

    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;
    gap: 12px;

    box-sizing: border-box;
}


#arturo-support-root
.arturo-chat__order-verify-field {
    width: 100%;

    margin: 0;
    padding: 0;

    display: flex;
    flex-direction: column;
    gap: 5px;

    box-sizing: border-box;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;

    color: #444;
}


#arturo-support-root
.arturo-chat__order-verify-field span {
    display: block;

    margin: 0;
    padding: 0;

    font: inherit;
    color: inherit;
}


#arturo-support-root
.arturo-chat__order-verify-field input {
    width: 100% !important;
    height: 40px !important;

    min-height: 40px !important;
    max-height: 40px !important;

    margin: 0 !important;
    padding: 7px 9px !important;

    border: 1px solid #ccc !important;
    border-radius: 7px !important;

    background: #fff !important;
    color: #222 !important;

    box-shadow: none !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;

    box-sizing: border-box !important;
}


#arturo-support-root
.arturo-chat__order-verify-field input:focus {
    outline: 2px solid rgba(20, 58, 105, .18);
    outline-offset: 1px;

    border-color: #143a69 !important;
}


#arturo-support-root
.arturo-chat__order-verify-button {
    width: 100% !important;
    height: 40px !important;

    min-height: 40px !important;

    margin: 0 !important;
    padding: 0 14px !important;

    border: 0 !important;
    border-radius: 7px !important;

    background: #143a69 !important;
    color: #fff !important;

    box-shadow: none !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 40px !important;

    text-align: center !important;
    text-transform: none !important;

    cursor: pointer;

    box-sizing: border-box !important;
}


#arturo-support-root
.arturo-chat__order-verify-button:hover {
    opacity: .92;
}


#arturo-support-root
.arturo-chat__order-verify-button:disabled {
    opacity: .6;
    cursor: wait;
}


#arturo-support-root
.arturo-chat__order-verify-notice {
    display: block;

    width: 100%;

    margin: 0;
    padding: 0;

    font-family: inherit;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;

    color: #777;

    box-sizing: border-box;
}


/* ============================================================
   CHAT INPUT
   ============================================================ */

#arturo-support-root .arturo-chat__form {
    flex: 0 0 92px;
    min-height: 92px;

    box-sizing: border-box;

    border-top: 1px solid #eee;

    padding: 10px;

    display: flex;
    align-items: center;
    gap: 8px;

    background: #fff;
}


#arturo-support-root .arturo-chat__file {
    display: none !important;
}


#arturo-support-root .arturo-chat__attach {
    width: 38px;
    height: 38px;
    min-width: 38px;

    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    border-radius: 8px;

    font-family: inherit;
    font-size: 20px;
    line-height: 1;
}


#arturo-support-root
.arturo-chat__attach:hover {
    background: #f2f2f2;
}


#arturo-support-root
.arturo-chat__attach-icon {
    display: block;
    line-height: 1;
}


#arturo-support-root .arturo-chat__input {
    flex: 1 1 auto;

    min-width: 0;
    width: auto;

    height: 54px !important;
    min-height: 54px !important;
    max-height: 54px !important;

    margin: 0 !important;
    padding: 9px !important;

    resize: none;

    border: 1px solid #ddd !important;
    border-radius: 8px !important;

    background: #fff !important;
    color: #333 !important;

    box-shadow: none !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;

    box-sizing: border-box !important;
}


#arturo-support-root .arturo-chat__send {
    height: 38px !important;
    min-height: 38px !important;

    flex: 0 0 auto;

    margin: 0 !important;
    padding: 0 15px !important;

    border: 0 !important;
    border-radius: 8px !important;

    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 38px !important;

    text-transform: none !important;

    cursor: pointer;

    box-sizing: border-box !important;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 480px) {

    #arturo-support-root {
        right: 12px;
        bottom: 12px;
    }


    #arturo-support-root .arturo-chat {
        width: calc(100vw - 24px);
        height: min(
            600px,
            calc(100vh - 40px)
        );
    }


    #arturo-support-root
    .arturo-chat__messages {
        padding: 12px;
    }


    #arturo-support-root
    .arturo-chat__order-verify {
        padding: 12px;
    }
}