/* =========================================================
   ROCKET CHATBOT
========================================================= */

.rocket-chat {
    position: static;
    z-index: 9999;
}


/* =========================================================
   ROCKET BUTTON
   ONLY THE GIF IS VISIBLE
========================================================= */

.rocket-button {
    position: fixed;

    right: 20px;
    bottom: 20px;

    /* Fixed clickable area */
    width: 90px;
    height: 90px;

    padding: 0;
    margin: 0;

    background: transparent !important;

    border: none !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    color: transparent;
    font-size: 0;

    cursor: pointer;

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

    z-index: 10000;

    outline: none !important;
    appearance: none;
    -webkit-appearance: none;

    /* Prevent this element from affecting page layout */
    overflow: visible;

    transition: none;
}


/* =========================================================
   REMOVE ALL BUTTON BACKGROUND / EFFECTS
========================================================= */

.rocket-button:hover,
.rocket-button:focus,
.rocket-button:active {
    background: transparent !important;

    border: none !important;

    box-shadow: none !important;

    outline: none !important;
}


/* =========================================================
   ROCKET GIF / IMAGE
   EXACTLY 300px
========================================================= */

.rocket-logo {
    width: 300px !important;
    height: 300px !important;

    max-width: none !important;
    max-height: none !important;

    min-width: 300px !important;
    min-height: 300px !important;

    object-fit: contain;

    display: block;

    padding: 0;
    margin: 0;

    background: transparent !important;

    border: none !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    outline: none !important;

    pointer-events: none;

    /* Keep the 300px image centered on the fixed button */
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    transform-origin: center center;
}


/* =========================================================
   ROCKET HOVER
========================================================= */

.rocket-button:hover .rocket-logo {
    transform: translate(-50%, -50%) scale(1.05);
}


/* =========================================================
   ROCKET FLY ANIMATION
========================================================= */

.rocket-button.fly-away {
    animation: rocketFly 1.5s ease-in forwards;
}


@keyframes rocketFly {

    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-110vh) rotate(-25deg);
        opacity: 0;
    }

}


/* =========================================================
   CHATBOX
========================================================= */

.rocket-chatbox {
    position: fixed;

    right: 30px;
    bottom: 105px;

    width: 370px;

    max-width: calc(100vw - 40px);

    background: #ffffff;

    border: 1px solid #e5e5e5;

    border-radius: 12px;

    box-shadow:
        0 15px 50px rgba(7, 29, 54, 0.20);

    overflow: hidden;

    display: none;

    z-index: 9999;

    animation: chatOpen 0.3s ease;
}


.rocket-chatbox.active {
    display: block;
}


/* =========================================================
   CHATBOX OPEN ANIMATION
========================================================= */

@keyframes chatOpen {

    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


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

.rocket-chat-header {
    background: #071d36;

    color: #ffffff;

    padding: 17px 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;
}


.rocket-chat-header strong {
    display: block;

    font-family: 'Fraunces', serif;

    font-size: 17px;

    font-weight: 500;
}


.rocket-chat-header span {
    display: block;

    margin-top: 3px;

    font-size: 11px;

    color: rgba(255, 255, 255, 0.65);
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.rocket-close {
    border: none !important;

    background: transparent !important;

    color: #ffffff;

    font-size: 24px;

    cursor: pointer;

    line-height: 1;

    padding: 0;

    margin: 0;

    box-shadow: none !important;

    outline: none !important;
}


.rocket-close:hover,
.rocket-close:focus,
.rocket-close:active {
    background: transparent !important;

    border: none !important;

    box-shadow: none !important;

    outline: none !important;

    color: #ffffff;
}


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

.rocket-messages {
    padding: 18px;

    min-height: 60px;

    max-height: 260px;

    overflow-y: auto;

    display: flex;

    flex-direction: column;

    gap: 10px;
}


/* =========================================================
   COMMON MESSAGE
========================================================= */

.rocket-message {
    max-width: 82%;

    padding: 10px 13px;

    border-radius: 10px;

    font-family: 'Inter', sans-serif;

    font-size: 13px;

    line-height: 1.5;

    box-sizing: border-box;
}


/* =========================================================
   USER MESSAGE
========================================================= */

.rocket-message.user {
    align-self: flex-end;

    background: #b08d2c;

    color: #ffffff !important;

    border-bottom-right-radius: 3px;
}


/* =========================================================
   BOT MESSAGE
========================================================= */

.rocket-message.bot {
    align-self: flex-start;

    background: #f2f3f5;

    color: #071d36;

    border-bottom-left-radius: 3px;
}


/* =========================================================
   INPUT AREA
========================================================= */

.rocket-input-area {
    display: flex;

    gap: 8px;

    padding: 12px;

    border-top: 1px solid #eeeeee;

    box-sizing: border-box;
}


.rocket-input-area input {
    flex: 1;

    min-width: 0;

    height: 42px;

    border: 1px solid #dddddd;

    border-radius: 6px;

    padding: 0 12px;

    font-family: 'Inter', sans-serif;

    font-size: 13px;

    outline: none;

    box-sizing: border-box;
}


.rocket-input-area input:focus {
    border-color: #b08d2c;
}


.rocket-input-area button {
    flex: 0 0 42px;

    width: 42px;

    height: 42px;

    padding: 0;

    border: none !important;

    border-radius: 6px;

    background: #b08d2c;

    color: #ffffff;

    font-size: 18px;

    cursor: pointer;

    box-shadow: none !important;

    outline: none !important;
}


.rocket-input-area button:hover {
    background: #071d36;
}


/* =========================================================
   FORM
========================================================= */

.rocket-form-container {
    display: none;

    padding: 0 16px 16px;

    box-sizing: border-box;
}


.rocket-form-container.active {
    display: block;

    animation: formAppear 0.4s ease;
}


@keyframes formAppear {

    from {
        opacity: 0;

        transform: translateY(8px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}


/* =========================================================
   FORM FIELD
========================================================= */

.rocket-form-field {
    margin-bottom: 10px;
}


.rocket-form-field label {
    display: block;

    margin-bottom: 5px;

    color: #071d36;

    font-family: 'Inter', sans-serif;

    font-size: 12px;

    font-weight: 600;
}


.rocket-form-field input,
.rocket-form-field textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #dddddd;

    border-radius: 5px;

    padding: 9px 10px;

    font-family: 'Inter', sans-serif;

    font-size: 12px;

    outline: none;

    background: #ffffff;

    color: #071d36;
}


.rocket-form-field input:focus,
.rocket-form-field textarea:focus {
    border-color: #b08d2c;

    outline: none;
}


.rocket-form-field textarea {
    height: 65px;

    resize: vertical;
}


/* =========================================================
   SUBMIT BUTTON
========================================================= */

.rocket-form-submit {
    width: 100%;

    padding: 11px;

    border: none !important;

    border-radius: 5px;

    background: #071d36;

    color: #ffffff !important;

    font-family: 'Inter', sans-serif;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    margin-top: 4px;

    box-shadow: none !important;

    outline: none !important;
}


.rocket-form-submit:hover {
    background: #b08d2c;
}


/* =========================================================
   SUCCESS MESSAGE
========================================================= */

.rocket-success-message {
    display: none;

    margin-top: 12px;

    padding: 12px;

    border-radius: 6px;

    background: #071d36;

    color: #ffffff !important;

    font-family: 'Inter', sans-serif;

    font-size: 13px;

    line-height: 1.5;

    text-align: center;

    box-sizing: border-box;
}


.rocket-success-message.active {
    display: block;

    animation: successAppear 0.4s ease;
}


@keyframes successAppear {

    from {
        opacity: 0;

        transform: translateY(8px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }

}


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

@media (max-width: 600px) {

    /* -----------------------------------------------------
       ROCKET BUTTON
    ----------------------------------------------------- */

    .rocket-button {
        right: 12px;

        bottom: 100px;

        width: 70px;

        height: 70px;

        padding: 0;

        background: transparent !important;

        border: none !important;

        border-radius: 0 !important;

        box-shadow: none !important;

        overflow: visible;
    }


    /* -----------------------------------------------------
       ROCKET IMAGE
       STILL EXACTLY 300px
    ----------------------------------------------------- */

    .rocket-logo {
        width: 300px !important;

        height: 300px !important;

        min-width: 300px !important;

        min-height: 300px !important;

        max-width: none !important;

        max-height: none !important;

        position: absolute;

        left: 50%;

        top: 50%;

        transform: translate(-50%, -50%);
    }


    /* -----------------------------------------------------
       CHATBOX
    ----------------------------------------------------- */

    .rocket-chatbox {
        right: 15px;

        bottom: 85px;

        width: calc(100vw - 30px);

        max-width: none;

        border-radius: 10px;
    }


    /* -----------------------------------------------------
       HEADER
    ----------------------------------------------------- */

    .rocket-chat-header {
        padding: 15px;
    }


    /* -----------------------------------------------------
       MESSAGES
    ----------------------------------------------------- */

    .rocket-messages {
        max-height: 220px;

        padding: 15px;
    }


    .rocket-message {
        font-size: 12px;

        max-width: 85%;
    }


    /* -----------------------------------------------------
       INPUT
    ----------------------------------------------------- */

    .rocket-input-area {
        padding: 10px;
    }


    /* -----------------------------------------------------
       FORM
    ----------------------------------------------------- */

    .rocket-form-container {
        padding: 0 13px 13px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .rocket-button {
        right: 8px;

        bottom: 20px;
    }


    .rocket-chatbox {
        right: 10px;

        bottom: 78px;

        width: calc(100vw - 20px);
    }

}