/* ===========================================
   RY TRAVEL AI CHATBOT
=========================================== */

:root{
    --primary:#ff0000;
    --primary-dark:#b20000;
    --secondary:#f5f5f5;
    --border:#dddddd;
    --text:#333333;
    --white:#ffffff;
    --shadow:0 8px 25px rgba(0,0,0,.15);
}

*{
    box-sizing:border-box;
}

#ry-chat{
    position:fixed;
    right:25px;
    bottom:100px;
    z-index:9999;
    font-family:'Segoe UI',sans-serif;
}

#ry-chat-window{
    width:370px;
    height:400px;
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    box-shadow:var(--shadow);
    border:1px solid #ececec;
}

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

.ry-chat-header{

    height:70px;

    background:linear-gradient(
        135deg,
        var(--primary),
        var(--primary-dark)
    );

    color:white;

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:15px;

}

.ry-chat-brand{

    display:flex;

    align-items:center;

    gap:12px;

}

.ry-chat-brand img{

    width:42px;

    height:42px;

    border-radius:50%;

    background:white;

    padding:4px;

}

.ry-chat-brand h4{

    margin:0;

    font-size:16px;

    font-weight:700;

}

.ry-chat-brand span{

    font-size:12px;

    opacity:.9;

}

.ry-chat-action{

    display:flex;

    gap:8px;

}

.ry-chat-action button{

    width:30px;

    height:30px;

    border:none;

    border-radius:50%;

    background:rgba(255,255,255,.18);

    color:white;

    cursor:pointer;

    transition:.25s;

}

.ry-chat-action button:hover{

    background:white;

    color:var(--primary);

}

/* ==========================
BODY
========================== */

#ry-chat-body{

    flex:1;

    background:#fafafa;

    padding:18px;

    overflow-y:auto;

    display:flex;

    flex-direction:column;

    gap:16px;

}

#ry-chat-body::-webkit-scrollbar{

    width:6px;

}

#ry-chat-body::-webkit-scrollbar-thumb{

    background:#ccc;

    border-radius:10px;

}

.ai-message{

    display:flex;

    justify-content:flex-start;

}

.user-message{

    display:flex;

    justify-content:flex-end;

}

.bubble{

    max-width:80%;

    padding:12px 15px;

    border-radius:18px;

    line-height:1.6;

    font-size:14px;

    word-wrap:break-word;

}

.ai-message .bubble{

    background:white;

    color:var(--text);

    border:1px solid #e9e9e9;

}

.user-message .bubble{

    background:var(--primary);

    color:white;

}

/* ==========================
QUICK BUTTON
========================== */

.quick-question{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

}

.quick-btn{

    border:none;

    background:white;

    border:1px solid var(--primary);

    color:var(--primary);

    border-radius:20px;

    padding:8px 15px;

    cursor:pointer;

    transition:.25s;

    font-size:13px;

}

.quick-btn:hover{

    background:var(--primary);

    color:white;

}

/* ==========================
FOOTER
========================== */

.ry-chat-footer{

    background:#ffffff;

    border-top:1px solid #ececec;

    padding:12px;

    display:flex;

    align-items:center;

    gap:10px;

}

#chat-input{

    flex:1;

    height:45px;

    border:1px solid #dcdcdc;

    border-radius:25px;

    padding:0 18px;

    outline:none;

    font-size:14px;

    transition:.3s;

}

#chat-input:focus{

    border-color:var(--primary);

    box-shadow:0 0 0 3px rgba(211,47,47,.15);

}

#send-message{

    width:45px;

    height:45px;

    border:none;

    border-radius:50%;

    background:var(--primary);

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    transition:.25s;

}

#send-message:hover{

    background:var(--primary-dark);

    transform:scale(1.05);

}

#send-message svg{

    width:18px;

    height:18px;

}

/* ==========================
TYPING INDICATOR
========================== */

.typing{

    display:flex;

    gap:5px;

    padding:12px 16px;

    background:#fff;

    border-radius:18px;

    width:70px;

    border:1px solid #ececec;

}

.typing span{

    width:8px;

    height:8px;

    border-radius:50%;

    background:#999;

    animation:typing 1.2s infinite;

}

.typing span:nth-child(2){

    animation-delay:.2s;

}

.typing span:nth-child(3){

    animation-delay:.4s;

}

@keyframes typing{

    0%{

        transform:translateY(0);

        opacity:.4;

    }

    50%{

        transform:translateY(-5px);

        opacity:1;

    }

    100%{

        transform:translateY(0);

        opacity:.4;

    }

}

/* ==========================
ANIMATION
========================== */

.ai-message,

.user-message{

    animation:fadeUp .25s ease;

}

@keyframes fadeUp{

    from{

        opacity:0;

        transform:translateY(15px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

/* ==========================
MINIMIZE
========================== */

.chat-minimized{

    height:70px !important;

    overflow:hidden;

}

/* ==========================
RESPONSIVE
========================== */

@media(max-width:768px){

    #ry-chat{

        right:10px;

        left:10px;

        bottom:10px;

    }

    #ry-chat-window{

        width:100%;

        height:75vh;

    }

}

/* ==========================
UTILITY
========================== */

.hidden{

    display:none !important;

}

.disabled{

    opacity:.6;

    pointer-events:none;

}