/* Chat Widget Styling */
#chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: Arial, sans-serif;
}

#chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

#chat-toggle-btn:hover {
    transform: scale(1.05);
}

#chat-box {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 480px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#chat-box.chat-hidden {
    display: none;
}

.chat-header {
    background-color: #007bff;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
}

#chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f8f9fa;
}

.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-line;
}

.message-first {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    /* white-space: pre-line; */
}

.user-message {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 2px;
}

.assistant-message {
    align-self: flex-start;
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 2px;
}

.chat-suggestions {
    padding: 6px 12px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.chip {
    background-color: #f1f3f5;
    border: 1px solid #ced4da;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
}

.chip:hover {
    background-color: #e2e6ea;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

#chat-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
}

#chat-send-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    margin-left: 8px;
    cursor: pointer;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#chat-reset-btn,
#chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 4px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

#chat-reset-btn:hover,
#chat-close-btn:hover {
    opacity: 1;
}

#chat-close-btn {
    font-size: 20px;
    padding-bottom: 6px;
}

/* --- Gemini G-Loader --- */
.gemini-loader {
    width: 24px;  /* Μικρό μέγεθος για να ταιριάζει στο chat */
    height: 24px;
    --c: no-repeat linear-gradient(#4285F4 0 0); /* Μπλε Google */
    background: 
      var(--c) center/100% 4px,
      var(--c) center/4px 100%;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px; /* Απόσταση από το κείμενο */
    animation: g-spin 1.5s infinite linear;
  }
  
  .gemini-loader::before,
  .gemini-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    background: 
      linear-gradient(#4285F4 0 0) 50% 0,
      linear-gradient(#FBBC05 0 0) 100% 50%, /* Χρυσό Google */
      linear-gradient(#34A853 0 0) 50% 100%,
      linear-gradient(#EA4335 0 0) 0 50%;
    background-size: 4px 4px;
    background-repeat: no-repeat;
    border-radius: 50%;
  }
  
  .gemini-loader::after {
    transform: rotate(45deg);
  }
  
  @keyframes g-spin {
    to {
      transform: rotate(1turn);
      filter: hue-rotate(360deg); /* Εφέ αλλαγής χρωμάτων */
    }
  }
  
  /* Προσαρμογή του μηνύματος φόρτωσης */
  .loading-wrapper {
    display: flex;
    align-items: center;
    color: #666;
    font-style: italic;
  }
