/* ============================================================
   HANA & CryZon - ALIGNMENT & SIZE SYNC (PC & MOBILE)
   දෙන්නම එකම මට්ටමට සහ එකම සයිස් එකට හදලා ඇත.
============================================================ */

/* 1. CryZon CHAT BOX (Left Side) */
#CryZon-chat-box {
    position: fixed;
    left: 30px;
    top: 100px;
    width: 360px;   /* thawa wide */
    height: 480px; /* Default height */
    background: linear-gradient(145deg, #0f0f1a, #1a1a2e);
    border-radius: 25px;
    display: none;
    flex-direction: column;
    z-index: 10001;
    border: 1px solid #4b0082;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: slideInLeft .3s ease;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
}

@media screen and (min-width: 1024px) {
  #CryZon-chat-box {
    top: 207px !important;  /* PC එකේදී විතරක් උඩ ඉඳන් 205px පල්ලෙහාට */
    width: 450px !important;
    height: 650px !important;
    right: 30px !important;
  }
}


/* ============================================================
   CryZon SIDE TAB STYLE (ඔයාගේ ඉල්ලීම පරිදි)
============================================================ */
/* CryZon Floating Button Main Style */
.CryZon-fab {
    position: fixed;
    bottom: 10px;
    right: 20px;
    width: 65px;
    height: 65px;
    background: rgba(11, 14, 20, 0.85); /* Glass effect */
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;                   
    justify-content: center;   
    cursor: pointer;
    z-index: 2000;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(255, 215, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* කැරකෙන Neon Ring එක */
.CryZon-fab-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ffd700;
    border-bottom-color: #ffd700;
    animation: rotateRing 3s linear infinite;
    opacity: 0.5;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Icon එක */
.CryZon-fab-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    z-index: 2;
    border: 2px solid #ffd700;
}

.CryZon-fab-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Text Label (Hover කළාම විතරක් පේන) */
.CryZon-fab-label {
    position: absolute;
    right: 75px;
    background: #ffd700;
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* HOVER EFFECTS */
.CryZon-fab:hover {
    transform: scale(1.1) translateY(-5px);
    border-color: #ffd700;
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.3);
}

.CryZon-fab:hover .CryZon-fab-label {
    opacity: 1;
    transform: translateX(0);
}

.CryZon-fab:hover .CryZon-fab-ring {
    opacity: 1;
    animation-duration: 1s; /* වේගයෙන් කැරකෙනවා */
}

/* Mobile & Tablet Optimization */
@media (max-width: 768px) {
    .CryZon-fab {
        width: 55px;
        height: 55px;
        bottom: 55px;
        right: 14px;
    }
    .CryZon-fab-icon {
        width: 40px;
        height: 40px;
        

    }
    /* Mobile වලදී label එක පේන්නේ නැති කරමු (ඉඩ නැති නිසා) */
    .CryZon-fab-label {
        display: none;
    }
}
/* ============================================================
   CryZon INTERNAL ELEMENTS (Hana Style matching)
============================================================ */
.CryZon-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #2e004f, #4b0082, #8a2be2);
    color: gold;
    border-bottom: 1px solid #4b0082;
}

.CryZon-name {
    font-size: 24px;
    font-family: 'Indie Flower', cursive;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.CryZon-messages {
    flex: 1;
    padding: 20px 15px;
    overflow-y: auto;
    background-color: #0b0b14;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-blend-mode: overlay;
    background-size: 400px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.CryZon-msg {
    padding: 10px 14px;
    font-size: 14.5px;
    line-height: 1.4;
    max-width: 85%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.CryZon-msg.bot {
    background: #1a1a2e !important;
    color: #e9edef !important;
    border-radius: 0 15px 15px 15px !important;
    align-self: flex-start !important;
    border-left: 3px solid gold !important;
}

.CryZon-msg.user {
    background: #4b0082 !important;
    color: #ffffff !important;
    border-radius: 15px 15px 0 15px !important;
    align-self: flex-end !important;
}

.CryZon-input {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #161d21;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0 0 25px 25px;
}

.CryZon-input input {
    flex: 1;
    background: #1a1a2e;
    border: 1px solid #4b0082;
    color: #fff;
    border-radius: 20px;
    padding: 10px 16px;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

#CryZon-send {
    background: #4b0082;
    color: gold;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#CryZon-close {
    background: #ff4b4b;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.4);
}

@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.CryZon-messages::-webkit-scrollbar { width: 5px; }
.CryZon-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 20px;
}

/* CryZon Box Styling */
#CryZon-chat-box {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 320px;
    height: 450px;
    background: #0b0e14;
    border: 1px solid #ffd700;
    border-radius: 15px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

/* Image Preview Styles */
#CryZon-image-preview-container {
    padding: 10px;
    background: rgba(255, 215, 0, 0.05);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    display: flex;
    align-items: center;
}

#CryZon-image-preview-img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 8px;
    border: 1px solid gold;
}

#CryZon-remove-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
}

/* Sent Image in Chat */
.CryZon-sent-image {
    max-width: 180px;
    border-radius: 10px;
    border: 1px solid gold;
    margin-bottom: 5px;
}

/* Typing/Thinking Animation */
.wa-typing { display: flex; gap: 4px; align-items: center; }
.wa-typing span { width: 6px; height: 6px; background: gold; border-radius: 50%; animation: blink 1s infinite; }
.wa-typing span:nth-child(2) { animation-delay: 0.2s; }
.wa-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }




#CryZon-plus {
    background: rgba(255, 215, 0, 0.1); /* Light Gold background */
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #ffd700;
    width: 38px;
    height: 38px;
    border-radius: 10px; /* පොඩි Rounded look එකක් */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    margin-right: 8px;
}

#CryZon-plus svg {
    transition: transform 0.3s ease;
}

/* Hover කළාම වෙනස් වෙන විදිහ */
#CryZon-plus:hover {
    background: #ffd700;
    color: #000; /* ඇතුලේ අයිකන් එක කළු වෙනවා */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    transform: translateY(-2px);
}

/* Hover කරද්දී Icon එක ලස්සනට කැරකෙනවා */
#CryZon-plus:hover svg {
    transform: rotate(90deg);
}

/* Click කරද්දී පොඩි feedback එකක් */
#CryZon-plus:active {
    transform: scale(0.9);
}