/* ----------------------------
   Chat Button
---------------------------- */
#ai-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #222;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    line-height: 60px;
    font-size: 28px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 0 15px #000;
}

/* ----------------------------
   Chat Popup
---------------------------- */
#ai-chat-popup {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 0 20px #000;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    z-index: 9999;
}

/* ----------------------------
   Chat Header
---------------------------- */
#ai-chat-header {
    padding: 10px;
    font-weight: bold;
    background: #333;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#ai-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
}

/* ----------------------------
   Chat Messages & Typing
---------------------------- */
#ai-chat-messages {
    height: 250px;
    overflow-y: auto;
    padding: 10px;
    flex-grow: 1;
}

#ai-chat-typing {
    padding: 5px 10px;
    height: 24px;
}

/* ----------------------------
   Chat Input
---------------------------- */
#ai-chat-input {
    width: 100%;
    padding: 10px;
    border: none;
    border-top: 1px solid #444;
    border-radius: 0 0 12px 12px;
    background: #222;
    color: #fff;
}

/* ----------------------------
   Reset Button
---------------------------- */
#ai-chat-reset {
    width: 100%;
    padding: 6px;
    margin-top: 5px;
    background: #ff4d4d;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

#ai-chat-reset:hover {
    background: #ff1a1a;
}

/* ----------------------------
   Chat Bubbles
---------------------------- */
.chat-msg-wrapper {
    margin-bottom: 8px;
    display: flex;
}

.user-msg-wrapper {
    justify-content: flex-end;
}

.ai-msg-wrapper {
    justify-content: flex-start;
}

.user-msg, .ai-msg {
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 75%;
    word-wrap: break-word;
}

.user-msg {
    background: #000000;
    color: #fff;
}

.ai-msg {
    background: #242c42;
    color: #fff;
}

/* ----------------------------
   Typing Dots Animation
---------------------------- */
#ai-chat-typing .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: #aaa;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}

#ai-chat-typing .dot:nth-child(1) {
    animation-delay: 0s;
}

#ai-chat-typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

#ai-chat-typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

/* Κουμπιά τελικού μηνύματος / αξιολόγησης */
.end-chat-btn,
.rate-btn {
    display: inline-block;
    margin: 5px 5px 0 0; /* μικρή απόσταση μεταξύ τους */
    padding: 6px 10px;
    font-size: 13px;
    font-weight: bold;
    border: none;
    border-radius: 20px; /* στρογγυλεμένες άκρες */
    cursor: pointer;
    color: #fff;
    background: #007bff; /* χρώμα button όπως το chat button */
    transition: all 0.2s ease;
}

.end-chat-btn:hover,
.rate-btn:hover {
    background: #0056b3; /* λίγο πιο σκούρο όταν περνάει ο ποντίκι */
}

/* Κουμπιά αξιολόγησης αστέρια */
.rate-btn {
    display: inline-block;
    margin: 5px 5px 0 0; /* μικρή απόσταση μεταξύ τους */
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 12px; /* στρογγυλεμένες άκρες */
    cursor: pointer;
    color: #ffd700; /* κίτρινα αστέρια */
    background: #1a1a1a; /* ίδιο με το bubble AI */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.rate-btn:hover {
    background: #6b6b6b; /* hover effect */
    transform: translateY(-2px);
}

/* Container για τα rating */
.rating-container {
    display: flex;
    flex-direction: column; /* κάθετες γραμμές */
    align-items: center; /* κεντράρισμα οριζόντια */
    background: #1a1a1a; /* ίδιο με bubble AI */
    padding: 10px;
    border-radius: 12px;
    margin: 5px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Κάθε γραμμή αστέρων */
.rating-line {
    margin: 3px 0;
}

.rating-line button {
    background:#242c42 ;
    border: none;
    color: #ffd700; /* κίτρινα αστέρια */
    font-size: 20px;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.rating-line button:hover {
    background: #333333; /* hover effect */
    transform: translateY(-2px);
}

#ai-chat-close:hover {
    color: #ff4d4d; /* γίνεται κόκκινο όταν περνάει ο δείκτης */
}

#ai-chat-close {
    display: inline-block;    /* για να αναγνωρίζει το cursor */
    cursor: pointer;          /* χεράκι */
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    padding: 5px 10px;        /* μεγάλο hit area για να πατιέται εύκολα */
    user-select: none;        /* δεν επιτρέπει επιλογή κειμένου */
}
#ai-chat-close:hover {
    color: #ff4d4d;           /* αλλαγή χρώματος στο hover */
}

/* Placeholder text */
#ai-chat-input::placeholder {
    color: #9e9e9e;       /* ανοιχτό γκρι για να φαίνεται καλά */
    opacity: 1;        /* για να μη σβήνει σε κάποιους browsers */
    font-style: italic; /* προαιρετικό, αν θέλεις να ξεχωρίζει */
}

/* Input text όταν γράφει ο χρήστης */
#ai-chat-input {
    color: #fff;       /* τα γράμματα που γράφει ο χρήστης να είναι λευκά */
    background: #222;  /* ίδιο σκούρο background */
}

@media (max-width: 480px) {
    #ai-chat-popup {
        right: 10px;
        left: 10px;          /* ⬅️ το κρατάει μέσα στην οθόνη */
        width: auto;         /* ⬅️ ακυρώνει το 350px */
        max-height: 85vh;    /* ⬅️ λίγο πιο ψηλό στο mobile */
    }

    #ai-chat-button {
        right: 15px;
        bottom: 15px;
    }
}



.ulteh-widget-send-button:hover {
    background:#0056b3;
}

/* Chat popup μεγαλύτερο */
#ai-chat-popup {
    width: 420px;        /* πλάτος popup */
    height: 750px;       /* ύψος popup */
    max-height: 80vh;    /* να μην ξεπερνά το 80% της οθόνης */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Container των μηνυμάτων */
#ai-chat-messages {
    flex: 1;             /* καταλαμβάνει όλο το διαθέσιμο ύψος */
    padding: 10px;
    overflow-y: auto;    /* scroll αν χρειαστεί */
}

/* Input και κουμπί κάτω */
#ai-chat-input-container {
    padding: 10px;
   
}

/* Χώρος για timestamp κάτω δεξιά */
.chat-msg-wrapper .user-msg, 
.chat-msg-wrapper .ai-msg {
    position: relative;
    padding-bottom: 18px; /* για timestamp */
}

.chat-msg-wrapper .timestamp {
    position: absolute;
    bottom: 2px;
    right: 5px;
    font-size: 10px;
    color: #999;
}



.rating-line button:hover {
    background: #000000;     /* πιο έντονο χρώμα στο hover */
}
