/*
  Styles for Creditreform Chatbot UI
  Extracted from index.html on 2025-10-31
*/

/* --- START: LOCAL FONT RULES --- */
/* open-sans-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url('/static/fonts/open-sans-v43-latin-regular.woff2') format('woff2');
}
/* open-sans-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 700;
  src: url('/static/fonts/open-sans-v43-latin-700.woff2') format('woff2');
}
/* --- END: LOCAL FONT RULES --- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
}

/* Disclaimer Modal Styles */
.disclaimer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.disclaimer-modal {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.disclaimer-header {
  background-color: white;
  padding: 15px 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#disclaimer-language-select {
  background-color: transparent;
  color: #009EE2;
  border: 1px solid #009EE2;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 12px;
}
#disclaimer-language-select option {
  color: black;
}

.disclaimer-logo {
  height: 30px;
}

.disclaimer-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 15px auto;
  background: url('/static/BotHeadOhneFragezeichen.png') no-repeat center/contain;
}

.disclaimer-content {
  padding: 20px;
  text-align: center;
}

.disclaimer-greeting {
  font-size: 15px;
  font-weight: bold;
  color: #009EE2;
  margin-bottom: 15px;
}

.disclaimer-text {
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  margin-bottom: 15px;
  text-align: left;
}

#disclaimer-intro {
  text-align: center;
}

.disclaimer-highlight {
  background-color: #f0f8ff;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 4px solid #009EE2;
}

.disclaimer-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 20px;
  border-top: 1px solid #eee;
}

.disclaimer-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 100px;
}

.disclaimer-btn-accept {
  background-color: #009EE2;
  color: white;
}

.disclaimer-btn-accept:hover {
  background-color: #007bb5;
}

.disclaimer-btn-decline {
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.disclaimer-btn-decline:hover {
  background-color: #e5e5e5;
}

.disclaimer-link {
  color: #009EE2;
  text-decoration: underline;
}

.disclaimer-link:hover {
  color: #007bb5;
}

.chat-disabled {
  pointer-events: none;
  opacity: 0.3;
}

@keyframes bobbing {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

body {
  background-color: #f8f9fa;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.chat-container {
  width: 100%;
  height: 100%;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background-color: white;
  color: #009EE2;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 14px;
  position: relative;     
  display: flex;
  justify-content: flex-start;   /* was: center */
  align-items: center;
  border-bottom: 1px solid #009EE2;
}

#header-logo {
  height: 30px;
  margin-left: 40px;             /* reserve space for the Typo3 X */
  margin-right: 10px;
}

#chat-header-text {
  flex-grow: 1;
  text-align: left;              /* or center, as you prefer */
}

#language-select {
  position: absolute;      /* take it out of flex */
  right: 12px;             /* stick to right edge of header */
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  color: #009EE2;
  border: 1px solid #009EE2;
  padding: 5px;
  border-radius: 5px;
  margin-left: 0;          /* remove margin-left: auto; if you had it */
}

#language-select option {
  color: black;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 14px;
}

.message {
  margin-bottom: 10px;
  max-width: 81%;
  padding: 8px;
  border-radius: 12px;
  clear: both;
  word-wrap: break-word;
}

.user-message {
  background-color: #e6f2ff;
  float: right;
  border-radius: 10px;
}

.bot-name-label {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 2px;
  margin-left: 0;
  clear: both;
  float: left;
}

.bot-message {
  background-color: #f0f0f0;
  float: left;
  border-radius: 10px;
  overflow: visible;
  position: relative;
  margin-right: 45px;
  z-index: 1;
}

.bot-message::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -10px;
  width: 60px;
  height: 60px;
  background: url('/static/BotHead.png') no-repeat center/contain;
  pointer-events: none;
  border-radius: 8px;
}

#loading-message.bot-message::after {
  animation-name: bobbing;
  animation-duration: 1.5s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.bot-message::before {
  content: "";
  position: absolute;
  right: -12px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-left: 20px solid #f0f0f0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  z-index: -1;
}

.bot-message h4 {
  margin-top: 6px;
  margin-bottom: 3px;
  color: #009EE2;
  font-size: 14px;
}

.bot-message p {
  margin-bottom: 6px;
  line-height: 1.3;
}

.bot-message ul {
  margin-left: 16px;
  margin-bottom: 6px;
}

.bot-message a {
  color: #009EE2;
  text-decoration: underline;
}

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

#user-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
}

#send-button {
  background-color: #009EE2;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 15px;
  margin-left: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#send-button:hover {
  background-color: #004884;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #009EE2;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.hidden {
  display: none;
}

@media (max-width: 349px) {
  .bot-message::after {
    display: none;
  }
  .bot-message {
    margin-right: 0;
    max-width: 95%;
  }
  .bot-message::before {
    display: none;
  }
  #loading-message.bot-message::after {
    display: none;
  }
  #language-select {
    display: none;
  }
  .chat-input {
    flex-direction: column;
    gap: 10px;
  }
  #user-input {
    width: 100%;
    margin: 0;
  }
  #send-button {
    margin-left: 0;
    width: 100%;
  }
}
