body {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 70px;
}

.mini-status {
  display: none;
}

.chat-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    max-width: 500px;
    height: 100%;             /* take full height of parent */
    max-height: 800px;      
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
}

.user-details h3 {
    margin: 0;
    font-size: 18px;
}

.status {
    font-size: 12px;
    opacity: 0.8;
}

.mini-status {
    font-size: 12px;
    opacity: 0.8;
}

.action-btn {
    border-radius: 20px;
    transition: background 0.3s ease;
    padding: 8px 16px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 100px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bot-message {
    align-self: flex-start;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.user-message .message-avatar {
    background: #10b981;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 16px;
}

.user-message .message-text {
    background:#ebf5ec;
}

.message-time {
    font-size: 11px;
    color: #64748b;
    align-self: flex-end;
    margin-top: 2px;
}

.user-message .message-time {
    align-self: flex-start;
}

.typing-indicator {
    padding: 10px 20px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.typing-text {
    font-size: 12px;
    color: #64748b;
}

/* Chat Input */
.chat-input-container {
    display: none; /* hide to begin with */
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.chat-input {
    display: flex;
    gap: 10px;
    align-items: center;
    background: #f8fafc;
    padding: 12px;
    border-radius: 25px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.chat-input:focus-within {
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#messageInput {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    font-family: inherit;
}

#messageInput::placeholder {
    color: #94a3b8;
}

.send-btn {
    background: #4f46e5;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    background: #4338ca;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

@media (max-height: 730px) {
  .chat-messages{
    padding-bottom: 20px;
  }
  
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        padding-top: 45px;
    }
    
    .chat-container {
        height: calc(100vh - 80px);
        border-radius: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-header {
        padding: 15px;
    }
    
    .chat-messages {
        padding: 15px;
    }

    .navbar {
        padding: 3px 10px;
    }

    .site-name {
        display: none;
    }

    .home {
        display: block;
    }
}

@media (max-width: 420px) {
    body {
        padding: 10px;
        padding-top: 55px;
    }
    
    .chat-container {
        height: calc(100vh - 60px);
        border-radius: 15px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-header {
        padding: 10px;
    }
    
    .chat-messages {
        padding: 15px;
    }

    .status {
        display: none;
    }

    .mini-status {
        display: block;
    }

    .navbar {
        padding: 3px 5px;
    }

    .avatar {
      width: 35px;
      height: 35px;
    }
}

/* Hide the browser's default checkbox */
.container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.container {
  display: block;
  position: relative;
  padding-left: 25px;
  margin-bottom: 2px;
  font-size: 16px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 2px;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #eee;
  border: 1px solid #ccc;
  display: flex;                /* enable flex */
  align-items: center;          /* vertical center */
  justify-content: center;      /* horizontal center */
}

/* On mouse-over, add a grey background color */
.container:hover input ~ .checkmark {
  background-color: #ddd;
}

/* When disabled, block hover */
.container.disabled {
  pointer-events: none; /* no hover, no clicks */
  cursor: default;
}

.slider:disabled {
  pointer-events: none; /* no hover, no clicks */
  cursor: default;
}

input[type="radio"]:disabled + .radio-checkmark {
  pointer-events: none; /* no hover, no clicks */
  cursor: default;
}

/* When the checkbox is checked, add a blue background */
.container input:checked ~ .checkmark {
  background-color: #2196F3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.container input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.container .checkmark:after {
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
  margin-top: -2px;
}

#last-container {
	padding-bottom: 10px;
	border-bottom: solid 1px #bbb;
}

.done-btn {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 5px 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  display: block;
  margin: 8px auto 0;
}

.done-btn:hover {
  background: linear-gradient(135deg, #66BB6A, #388E3C);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.done-btn:active {
  background: linear-gradient(135deg, #388E3C, #1B5E20);
  transform: translateY(1px);
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.done-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

.chat-error {
  display: none;
  background-color: #ffe5e5;
  color: #b71c1c;
  font-weight: 500;
  padding: 10px;
  text-align: center;
  border-bottom: 2px solid #e53935;
  border-radius: 5px 5px 0 0;
}

.widget-message-time {
  display: none;
}

#slider-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px; 
  width: 100%;
}

#sliderValue {
  margin: 0;
  padding: 0;
  text-align: center; /* centers text above slider */
  cursor: default;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: #ddd;
  outline: none;
}

/* Thumb */
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2196F3;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2196F3;
  cursor: pointer;
}

.radio-container {
  display: block;
  position: relative;
  padding-left: 28px;
  font-size: 16px;
  user-select: none;
}

.radio-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-checkmark {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%); /* truly centers */
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 50%; /* circle */
  border: 2px solid #ccc;
  cursor: pointer;
}

.radio-container input:checked ~ .radio-checkmark {
  background-color: #2196F3;
  border-color: #2196F3;
}

.radio-checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.radio-container input:checked ~ .radio-checkmark::after {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%); /* perfect centering */
}

#buildBtn {
  margin: 2px auto 20px;
  display: none;
  font-size: 20px;
  font-weight: bold;
  padding: 15px;
}

#retryModal {
  display: none; 
  position: fixed;
  z-index: 1001; /* above other modals if needed */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6); /* dark overlay */
  justify-content: center;
  align-items: center;
  border: solid 2px #b71c1c;
}

#retryModal .modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  width: 400px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  animation: fadeIn 0.25s ease-out;
}

#retryModal h2 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #333;
}

#retryModal p {
  margin: 1rem 0;
  font-size: 1rem;
  color: #555;
}

#okBtn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

#okBtn:hover {
  background: #0056b3;
}

#closeRetryModal {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

#closeRetryModal:hover {
  color: #000;
}

#loading-supplementary-text {
  color: #444;
  font-size: 15px;
  margin-top: 6px;
}
