@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");
*{
    margin: 0;
    padding: 0;
    font-family: "Poppins", Sans-Serif;
    box-sizing: border-box;
}

:root{
    --container-color: #00000052;
    --text-color: #44fff3;
    --shadow-color: #5da596eb;
    --sec-txt-color: #00000089;
    --bg-color: #003849;
}

body{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url(/pics/global-currency-background_115579-405.avif);
    background-size: cover;
}

.outer-container,
.container{
    padding: 5px 5px 5px;
    border-radius: 10px;
    background: var(--container-color);
    min-height: 45vh;
    min-width: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.outer-container{
    box-shadow: 0px 0px 5px var(--shadow-color);
    overflow: hidden;
}

.outer-container::after{
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    height: 600px;
    width: 200px;
    background: var(--text-color);
    box-shadow: 0 0 20px var(--text-color),
    0 0 50px var(--text-color),
    0 0 80px var(--text-color);
    animation: animate 3s linear infinite;
}

.container{
    padding: 20px 20px 20px;
    z-index: 99;
    background-color: var(--bg-color);
}

@keyframes animate{
    100%{
        transform: translate(-50%, -50%) rotate(225deg);
    }
}

h1,p,.msg{
    color: var(--text-color);
}

h1{
    font-size: 1.5rem;
}

p{
    font-size: 0.7rem;
}

.msg{
    font-size: 0.9rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

form{
    margin: 2rem 0 1rem 0;
}

input, select{
    background-color: transparent;
    color: var(--text-color);
    border: 0.1rem solid var(--text-color);
    border-radius: 5px;
    width: 8.7rem;
    height: 1.5rem;
}

input{
    padding-left: 5px;
    width: 18.8rem;
    height: 2rem;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

select{
    width: 6.3rem;
    border: none;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2px 2px 2px;
    border-radius: 5px;
}

.select-container{
    display: flex;
    border-radius: 5px;
    padding-left: 5px;
    box-shadow: 0px 3px 2px var(--text-color);
}

.amount,.dropdown{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    grid-gap: 10px;
    padding: 10px 10px 10px;
    text-align: center;
}

.amount{
    grid-gap: 20px;
}

i{
    color: var(--text-color);
    font-size: 0.7rem;
}

#exchange, #botIcon{
    background: transparent;
    padding: 5px 5px 5px;
    border-radius: 5px;
    border: 0.1rem solid var(--text-color);
    color: var(--text-color);
    box-shadow: 0px 0px 5px var(--text-color);
    transition: all 0.3s ease-in-out;
}

#exchange:hover,
#botIcon:hover{
    background: var(--text-color);
    color: var(--sec-txt-color);
    box-shadow: 0.5px 0.5px 0px var(--shadow-color);
}

.select-container img{
    max-width: 1.7rem;
}

.chatbot{
    position: fixed;
    bottom: 40px;
    right: 40px; 
    z-index: 9999;
}

#botIcon{
    height: 56px; 
    width: 56px; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);;
    box-shadow: 1px 1px 6px whitesmoke;
}

#chatBox{
    position:fixed;
    inset: 0;
    z-index:50;
    color: white;
}

#chatBackdrop{
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

#openChat{
    position: absolute;
    right: 0;
    top: 0; 
    height: 100vh; 
    width: 360px;
    max-width: 100%;
    background-color: #003849; 
    padding: 6px;
    display: flex;
    flex-direction: column; 
    z-index: 2;
}

.close-chat {
    align-self: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    border: none;
}

.head {
    padding: 0 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.chat-container {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
    height: 85vh;
}

.box {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.usermsg, .botmsg{
    margin: 10px 0;
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 90%;
    width: fit-content;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.5;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.usermsg{
    background: linear-gradient(56deg, rgb(18, 1, 201) 0%, rgb(0, 8, 101) 100%);
    color: rgb(0, 0, 0);
    margin-left: auto;
    align-self: flex-end;
}

.botmsg{
    background: #000000;
    background: linear-gradient(56deg, rgba(0, 0, 0, 1) 0%, rgba(59, 59, 59, 1) 100%, rgba(168, 168, 168, 1) 100%);
    color: white;
    align-self: flex-start;
}

.botmsg p,
.botmsg li,
.botmsg strong,
.botmsg em,
.botmsg span {
    word-break: break-word;
    overflow-wrap: break-word;
}

.botmsg pre,
.botmsg code {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
}

.inputs {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
    gap: 8px;
}

.chat-input {
    width: 320px;
    height: 40px;
    padding: 8px;
    border: 1px solid #a1a1aa;
    border-radius: 8px;
    outline: none;
}

.send-btn {
    background-color: #008a9f;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;

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

    transition: background-color 0.2s ease;
}

.send-btn:hover {
    background-color: #059669;
}

.hidden {
    display: none;
}

.chat-panel {
    transform: translateX(100%);
    transition: transform 300ms ease;
}

.chat-panel.open {
    transform: translateX(0);
}

.backdrop {
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 480px) {
    #openChat {
        width: 100%;
    }

    .chat-input {
        width: 100%;
    }
}
