/* ======================================================
   AstroAid Live Chat v0.2
====================================================== */

/* ===========================
Floating Button
=========================== */

#astro-chat-button{
    position:fixed;
    right:30px;
    bottom:30px;
    width:70px;
    height:70px;
    border:none;
    border-radius:50%;
    background:#c49143;
    color:#fff;
    font-size:30px;
    cursor:pointer;
    z-index:999999;
    box-shadow:0 10px 35px rgba(0,0,0,.25);
    transition:.3s;
}

#astro-chat-button:hover{
    transform:scale(1.08);
}

/* ===========================
Overlay
=========================== */

#astro-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    backdrop-filter:blur(5px);
    z-index:999998;
}

/* ===========================
Popup
=========================== */

#astro-popup{
    display:none;
    position:fixed;
    right:25px;
    bottom:105px;
    width:400px;
    height:550px;
    max-width:calc(100vw - 30px);
    background:#fff;
    border-radius:20px;
    overflow:hidden;
    box-shadow:0 20px 60px rgba(0,0,0,.25);
    z-index:999999;
}

/* ===========================
Header
=========================== */

.astro-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:16px 20px;
    background:#c49143;
    color:#fff;
}

.astro-user{
    display:flex;
    align-items:center;
    gap:14px;
}

.avatar{
    width:60px;
    height:60px;
    border-radius:50%;
    background:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:30px;
}

.astro-user strong{
    font-size:20px;
    display:block;
}

.astro-user small{
    font-size:14px;
    color:#fff;
}

#astro-close{
    border:none;
    background:none;
    color:#fff;
    font-size:34px;
    cursor:pointer;
}

/* ===========================
Form
=========================== */

#astro-form{
    padding:20px 25px 25px;
    box-sizing:border-box;
}

#astro-popup h2{

    margin:0 0 8px;

    font-size:26px !important;

    font-weight:700;

    line-height:1.15;

    letter-spacing:-0.5px;

    white-space:nowrap;

}

.astro-subtitle{
    margin:0 0 22px;
}

.astro-subtitle{
    margin-bottom:20px;
    color:#666;
    font-size:15px;
}

#astro-form input{
    width:100%;
    height:58px;
    padding:14px 16px;
    border:1px solid #8b8b8b;
    border-radius:10px;
    margin-bottom:16px;
    font-size:16px;
    box-sizing:border-box;
}

#astro-form input:focus{
    outline:none;
    border-color:#c49143;
}

#astro-start{
    width:100%;
    padding:15px;
    border:none;
    border-radius:10px;
    background:#c49143;
    color:#fff;
    font-size:17px;
    font-weight:600;
    cursor:pointer;
    transition:.3s;
}

#astro-start:hover{
    opacity:.92;
}

/* ===========================
Chat Screen
=========================== */

#astro-chat-screen{

    display:none;

    position:relative;

    height:calc(100% - 96px);

    padding:20px;

    box-sizing:border-box;

}

#astro-timer{
    background:#f5f5f5;
    padding:10px;
    border-radius:10px;
    margin-bottom:15px;
    text-align:center;
    font-weight:bold;
    color:#c49143;
}

#astro-messages{

    height:360px;

    overflow-y:auto;

    overflow-x:hidden;

    background:#fafafa;

    border:1px solid #eee;

    border-radius:16px;

    padding:12px;

    box-sizing:border-box;

}

.msg{
    padding:12px 15px;
    border-radius:12px;
    margin-bottom:12px;
    max-width:85%;
    line-height:1.5;
}

.expert{
    background:#efefef;
}

.user{
    background:#c49143;
    color:#fff;
    margin-left:auto;
}

/* ===========================
Input
=========================== */

#astro-input{

    position:absolute;

    left:20px;

    right:20px;

    bottom:20px;

    display:flex;

    align-items:center;

    gap:8px;

}

#astro-input button{
    width:42px;
    height:42px;
    border:none;
    border-radius:10px;
    background:#f3f3f3;
    cursor:pointer;
    font-size:18px;
}

#astro-input input{
    flex:1;
    height:42px;
    border:1px solid #ddd;
    border-radius:10px;
    padding:0 12px;
    font-size:15px;
}

#astro-input input:focus{
    outline:none;
    border-color:#c49143;
}

/* ===========================
Responsive
=========================== */

@media (max-width: 480px) {

    #astro-popup{
        left:10px;
        right:10px;
        width:auto;
        bottom:90px;
    }

    #astro-chat-button{
        left:auto;
        right:15px;
        bottom:15px;
    }

    #astro-chat-badge{
        left:auto;
        right:15px;
        bottom:80px;
        width:220px;

        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);

        transition:
        opacity .4s ease,
        visibility .4s ease,
        transform .4s ease;
    }

    #astro-popup h2{
        font-size:26px !important;
    }

}

.msg.user{

background:#c49143;

color:#fff;

margin-left:auto;

text-align:left;

border-bottom-right-radius:4px;

overflow-wrap:anywhere;
word-break:break-word;

}

.msg.expert{

    width:100%;

    max-width:100%;

    margin:0;

    box-sizing:border-box;

}

@keyframes float{

0%,100%{
transform:translateY(0px);
}

50%{
transform:translateY(-8px);
}

}

#astro-chat-button{

animation:float 4s ease-in-out infinite;

}

/* Button */
#astro-chat-button{
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: visible;
}

/* Ring 1 */
#astro-chat-button::before,
#astro-chat-button::after{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(196,145,67,.55); /* AstroAid Gold */
    transform: translate(-50%, -50%) scale(1);
    animation: astroRing 2.6s linear infinite;
    pointer-events: none;
}

/* Ring 2 (Delay) */
#astro-chat-button::after{
    animation-delay: 1.3s;
}

@keyframes astroRing{

    0%{
        transform: translate(-50%, -50%) scale(1);
        opacity: .7;
    }

    70%{
        opacity: .25;
    }

    100%{
        transform: translate(-50%, -50%) scale(1.9);
        opacity: 0;
    }

}

#astro-chat-badge{
    position: fixed;
    right: 20px;
    bottom: 100px;

    background: #fff;
    color: #222;

    padding: 10px 18px;
    border-radius: 50px;

    font-size: 14px;
    font-weight: 600;

    box-shadow: 0 10px 30px rgba(0,0,0,.12);

    z-index: 999998;


}

#astro-chat-badge::after{
    content: "";
    position: absolute;
    right: 18px;
    bottom: -6px;

    width: 12px;
    height: 12px;

    background: #fff;
    transform: rotate(45deg);
}

@keyframes badgeFloat{
    0%,100%{
        transform: translateY(0);
    }
    50%{
        transform: translateY(-5px);
    }
}
/* ===========================================
   Premium Floating Card
=========================================== */

#astro-chat-badge{

    position:fixed;

    right:35px;
    bottom:110px;

    width:220px;

    background:rgba(255,255,255,.95);

    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);

    border-radius:18px;

    padding:16px 18px;

    border:1px solid rgba(255,255,255,.65);

    box-shadow:
    0 18px 45px rgba(0,0,0,.10);

    z-index:999998;

    transition:.35s;

}

/* Small Pointer */

#astro-chat-badge::after{

    content:"";

    position:absolute;

    right:34px;
    bottom:-8px;

    width:16px;
    height:16px;

    background:rgba(255,255,255,.95);

    transform:rotate(45deg);

    border-right:1px solid rgba(255,255,255,.65);
    border-bottom:1px solid rgba(255,255,255,.65);

}

/* Heading */

.badge-title{

    font-size:17px;
    font-weight:700;

    color:#232323;

    margin-bottom:6px;

    line-height:1.2;

}

/* Subtitle */

.badge-subtitle{

    font-size:13px;

    color:#6d6d6d;

    line-height:1.4;

}

/* Trust Badge */

.astro-trust-badge{

    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    width:100%;

    margin-top:18px;

    padding:4px 4px;

    background:#FFF8E8;

    border:1px solid #F0DFC0;

    border-radius:4px;

    color:#8A6422;

    font-size:13px;
    font-weight:600;

    box-sizing:border-box;

}

.astro-quick-replies{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:10px;

    margin-top:16px;

}

.quick-reply{

    border:none;

    background:#fff;

    border:1px solid #E7D5B2;

    border-radius:8px;

    padding:8px 8px;

    font-size:12px;

    font-weight:600;

    color:#6F4A12;

    cursor:pointer;

    transition:.25s;

    text-align:center;

}

.quick-reply:hover{

    background:#C49143;

    color:#fff;

    transform:translateY(-2px);

}

.quick-reply.full{

    grid-column:1 / -1;

}

.astro-chat-btn{

    display:block;

    text-align:center;

    background:#C49143;

    color:#fff !important;

    text-decoration:none;

    padding:12px;

    border-radius:5px;

    font-weight:600;

    margin-top:5px;

}

@media (max-width:480px){

   /* Popup */
#astro-popup{
    left:10px;
    right:10px;
    width:auto;
    bottom:90px;
    max-height:85vh;
    height:auto;
}

    /* Header */
    .astro-header{
        padding:16px 18px;
    }

    .astro-user{
        display:flex;
        align-items:center;
        gap:12px;
    }

    .astro-user .avatar{
        width:56px;
        height:56px;
        min-width:56px;
        min-height:56px;
        border-radius:50%;
        display:flex;
        align-items:center;
        justify-content:center;
        font-size:30px;
        flex-shrink:0;
    }

    .astro-user strong{
        display:block;
        font-size:18px;
        line-height:1.25;
    }

    .astro-user small{
        display:block;
        font-size:14px;
        line-height:1.4;
        margin-top:4px;
    }

    #astro-close{
        font-size:30px;
        flex-shrink:0;
    }

    /* Form */
    #astro-form{
        padding:16px;
    }

    #astro-form h2{
        font-size:18px;
        line-height:1.3;
        margin-bottom:8px;
    }

    .astro-subtitle{
        font-size:12px;
        line-height:1.5;
        margin-bottom:18px;
    }

    #astro-form input{
        height:52px;
        padding:0 16px;
        font-size:14px;
        margin-bottom:14px;
        border-radius:12px;
    }

    #astro-start{
        height:52px;
        font-size:18px;
        border-radius:12px;
        margin-top:4px;
    }

    .astro-trust-badge{
        margin-top:12px;
        padding:10px 12px;
        font-size:13px;
        line-height:1.5;
        border-radius:10px;
    }

}

@media (max-width:480px){

    #astro-chat-screen{
        height:420px;
        padding:15px;
    }

    #astro-messages{
        height:325px;
        overflow-y:auto;
        overflow-x:hidden;
        padding:12px;
    }

    #astro-input{
        left:15px;
        right:15px;
        bottom:15px;
    }

}

.astro-action-buttons{
    display:flex;
    gap:10px;
    margin-top:15px;
}

.astro-action-buttons .astro-chat-btn{
    flex:1;
    margin:0;
}

#chat-skip-btn{
    background:#fff;
    color:#C49143 !important;
    border:1px solid #C49143;
}

.astro-chat-btn,
.astro-chat-btn:link,
.astro-chat-btn:visited{
    background:#C49143;
    color:#fff !important;
    text-decoration:none;
}

.astro-chat-btn:hover{
    background:#b27f33;
    color:#fff !important;
}

.astro-chat-btn:active,
.astro-chat-btn:focus{
    background:#b27f33;
    color:#fff !important;
    outline:none;
    box-shadow:none;
}