/* ========================================
   HERO SECTION - Centered & Responsive
   ======================================== */

/* Main container - full viewport centering */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px); /* Adjust based on header/footer height */
  padding: 2rem 1rem;
  box-sizing: border-box;
}

/* Hero Section */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Main Heading */
.hero-section h1 {
  font-family: 'Heebo', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: var(--text-color, #ffffff);
}

/* Highlight text accent */
.hero-section .highlight-text {
  color: var(--accent-color, #00d4ff);
  background: linear-gradient(135deg, #00d4ff 0%, #7b2fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Embedded Chat Container */
.embedded-chat-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* Initial Input Area */
.initial-input-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--input-bg, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
  border-radius: 50px;
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.initial-input-area:focus-within {
  border-color: var(--accent-color, #00d4ff);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.initial-input-area input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-color, #ffffff);
  font-family: 'Heebo', sans-serif;
}

.initial-input-area input::placeholder {
  color: var(--placeholder-color, rgba(255, 255, 255, 0.5));
}

.initial-input-area button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #00d4ff 0%, #7b2fff 100%);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.initial-input-area button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

/* Dialog Window */
.dialog-window {
  margin-top: 1.5rem;
  background: var(--dialog-bg, rgba(30, 30, 40, 0.95));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  animation: slideUp 0.3s ease-out;
}

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

.dialog-window.hidden {
  display: none;
}

/* Chat Messages Area - EMBEDDED ONLY */
#chatbot-embedded-container #embedded-chatbot-messages,
.embedded-chat-container #embedded-chatbot-messages {
  max-height: 350px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Message Bubbles - EMBEDDED ONLY */
#chatbot-embedded-container .message,
.embedded-chat-container .message {
  max-width: 85%;
  padding: 0.875rem 1.125rem;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

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

#chatbot-embedded-container .bot-message,
.embedded-chat-container .bot-message {
  align-self: flex-start;
  background: var(--bot-msg-bg, rgba(255, 255, 255, 0.1));
  color: var(--text-color, #ffffff);
  border-bottom-left-radius: 4px;
}

#chatbot-embedded-container .user-message,
.embedded-chat-container .user-message {
  align-self: flex-end;
  background: linear-gradient(135deg, #00d4ff 0%, #7b2fff 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* Dialog Footer - EMBEDDED ONLY */
#chatbot-embedded-container #embedded-chatbot-footer,
.embedded-chat-container #embedded-chatbot-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--footer-bg, rgba(0, 0, 0, 0.2));
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

#chatbot-embedded-container #embedded-chatbot-footer input,
.embedded-chat-container #embedded-chatbot-footer input {
  flex: 1;
  background: var(--input-bg, rgba(255, 255, 255, 0.1));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 25px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-color, #ffffff);
  outline: none;
  transition: all 0.3s ease;
  font-family: 'Heebo', sans-serif;
}

#chatbot-embedded-container #embedded-chatbot-footer input:focus,
.embedded-chat-container #embedded-chatbot-footer input:focus {
  border-color: var(--accent-color, #00d4ff);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

#chatbot-embedded-container #embedded-chatbot-footer input::placeholder,
.embedded-chat-container #embedded-chatbot-footer input::placeholder {
  color: var(--placeholder-color, rgba(255, 255, 255, 0.5));
}

#chatbot-embedded-container #embedded-chatbot-footer button,
.embedded-chat-container #embedded-chatbot-footer button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #00d4ff 0%, #7b2fff 100%);
  color: #ffffff;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

#chatbot-embedded-container #embedded-chatbot-footer button:hover,
.embedded-chat-container #embedded-chatbot-footer button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

/* Privacy Notice */
.privacy-notice {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted-text, rgba(255, 255, 255, 0.5));
  text-align: center;
  line-height: 1.5;
}

/* Privacy Notice - Force dark text in light theme */
body:not(.dark-theme):not(.dark) .privacy-notice,
html:not(.dark-theme):not(.dark) .privacy-notice {
  color: rgba(0, 0, 0, 0.6);
}

/* Re-apply light text when dark theme is active */
body.dark-theme .privacy-notice,
body.dark .privacy-notice,
html.dark-theme .privacy-notice,
html.dark .privacy-notice,
[data-theme="dark"] .privacy-notice {
  color: rgba(255, 255, 255, 0.5);
}

.privacy-notice a {
  color: var(--accent-color, #00d4ff);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.privacy-notice a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
  main {
    min-height: calc(100vh - 100px);
    padding: 1.5rem 1rem;
  }

  .hero-section {
    padding: 1.5rem 1rem;
  }

  .hero-section h1 {
    margin-bottom: 1.5rem;
  }

  .embedded-chat-container {
    max-width: 100%;
  }

  #chatbot-embedded-container #embedded-chatbot-messages {
    max-height: 300px;
    padding: 1rem;
  }

  #chatbot-embedded-container .message,
  .embedded-chat-container .message {
    max-width: 90%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  main {
    padding: 1rem 0.75rem;
    min-height: calc(100vh - 80px);
  }

  .hero-section {
    padding: 1rem 0.5rem;
  }

  .hero-section h1 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .initial-input-area {
    padding: 0.4rem 0.4rem 0.4rem 1rem;
    border-radius: 30px;
  }

  .initial-input-area input {
    font-size: 0.9rem;
  }

  .initial-input-area button,
  #chatbot-embedded-container #embedded-chatbot-footer button,
  .embedded-chat-container #embedded-chatbot-footer button {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  #chatbot-embedded-container .dialog-window,
  .embedded-chat-container .dialog-window {
    border-radius: 12px;
  }

  #chatbot-embedded-container #embedded-chatbot-messages {
    max-height: 250px;
    padding: 0.875rem;
  }

  #chatbot-embedded-container .message,
  .embedded-chat-container .message {
    max-width: 92%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  #chatbot-embedded-container #embedded-chatbot-footer,
  .embedded-chat-container #embedded-chatbot-footer {
    padding: 0.875rem 1rem;
  }

  #chatbot-embedded-container #embedded-chatbot-footer input,
  .embedded-chat-container #embedded-chatbot-footer input {
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
  }

  .privacy-notice {
    font-size: 0.7rem;
    padding: 0 0.5rem;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .hero-section h1 {
    font-size: 1.3rem;
  }

  .initial-input-area input::placeholder,
  #chatbot-embedded-container #embedded-chatbot-footer input::placeholder,
  .embedded-chat-container #embedded-chatbot-footer input::placeholder {
    font-size: 0.85rem;
  }
}

/* ========================================
   LIGHT THEME SUPPORT
   ======================================== */

/* Light theme - Body/HTML level detection */
body.light-theme .hero-section h1,
html.light-theme .hero-section h1,
[data-theme="light"] .hero-section h1,
:root.light-theme .hero-section h1 {
  color: #1a1a2e !important;
}

/* Also catch if light theme is on body without class */
body:not(.dark-theme):not([data-theme="dark"]) .hero-section h1 {
  color: inherit;
}

/* Specific fix for when theme toggle switches to light */
.hero-section h1 {
  color: var(--text-color, #ffffff);
  transition: color 0.3s ease;
}



/* Scrollbar Styling - EMBEDDED ONLY */
#chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar,
.embedded-chat-container #embedded-chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

#chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-track,
.embedded-chat-container #embedded-chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb,
.embedded-chat-container #embedded-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

#chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb:hover,
.embedded-chat-container #embedded-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   COMPREHENSIVE LIGHT THEME OVERRIDES
   ======================================== */

/* Target all possible light theme selectors */
body.light-theme,
html.light-theme,
[data-theme="light"],
:root[data-theme="light"] {
  --hero-text-color: #1a1a2e;
  --hero-muted-text: rgba(0, 0, 0, 0.6);
}

/* Hero Section Text - Light Theme */
body.light-theme .hero-section h1,
html.light-theme .hero-section h1,
[data-theme="light"] .hero-section h1,
:root[data-theme="light"] .hero-section h1 {
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e;
}

/* Keep the gradient on highlight text */
body.light-theme .hero-section .highlight-text,
html.light-theme .hero-section .highlight-text,
[data-theme="light"] .hero-section .highlight-text,
:root[data-theme="light"] .hero-section .highlight-text {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  background: linear-gradient(135deg, #00d4ff 0%, #7b2fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Input Areas - Light Theme */
body.light-theme .initial-input-area,
html.light-theme .initial-input-area,
[data-theme="light"] .initial-input-area,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) .initial-input-area {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
}

body.light-theme .initial-input-area input,
html.light-theme .initial-input-area input,
[data-theme="light"] .initial-input-area input,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) .initial-input-area input {
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e !important;
}

body.light-theme .initial-input-area input::placeholder,
html.light-theme .initial-input-area input::placeholder,
[data-theme="light"] .initial-input-area input::placeholder,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) .initial-input-area input::placeholder {
  color: rgba(0, 0, 0, 0.5) !important;
  -webkit-text-fill-color: rgba(0, 0, 0, 0.5) !important;
}

/* Dialog Window - Light Theme - EMBEDDED ONLY */
body.light-theme #chatbot-embedded-container .dialog-window,
html.light-theme #chatbot-embedded-container .dialog-window,
[data-theme="light"] #chatbot-embedded-container .dialog-window,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container .dialog-window {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

/* Bot Messages - Light Theme - EMBEDDED ONLY */
body.light-theme #chatbot-embedded-container .bot-message,
html.light-theme #chatbot-embedded-container .bot-message,
[data-theme="light"] #chatbot-embedded-container .bot-message,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container .bot-message {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a2e;
}

body.light-theme #chatbot-embedded-container .bot-message p,
html.light-theme #chatbot-embedded-container .bot-message p,
[data-theme="light"] #chatbot-embedded-container .bot-message p,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container .bot-message p {
  color: #1a1a2e;
}

/* Dialog Footer - Light Theme - EMBEDDED ONLY */
body.light-theme #chatbot-embedded-container #embedded-chatbot-footer,
html.light-theme #chatbot-embedded-container #embedded-chatbot-footer,
[data-theme="light"] #chatbot-embedded-container #embedded-chatbot-footer,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container #embedded-chatbot-footer {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme #chatbot-embedded-container #embedded-chatbot-footer input,
html.light-theme #chatbot-embedded-container #embedded-chatbot-footer input,
[data-theme="light"] #chatbot-embedded-container #embedded-chatbot-footer input,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container #embedded-chatbot-footer input {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e !important;
}

body.light-theme #chatbot-embedded-container #embedded-chatbot-footer input::placeholder,
html.light-theme #chatbot-embedded-container #embedded-chatbot-footer input::placeholder,
[data-theme="light"] #chatbot-embedded-container #embedded-chatbot-footer input::placeholder,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container #embedded-chatbot-footer input::placeholder {
  color: rgba(0, 0, 0, 0.5) !important;
  -webkit-text-fill-color: rgba(0, 0, 0, 0.5) !important;
}

/* Privacy Notice - Light Theme */
body.light-theme .privacy-notice,
html.light-theme .privacy-notice,
[data-theme="light"] .privacy-notice,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) .privacy-notice {
  color: rgba(0, 0, 0, 0.6) !important;
}

body.light-theme .privacy-notice a,
html.light-theme .privacy-notice a,
[data-theme="light"] .privacy-notice a,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) .privacy-notice a {
  color: #0099cc;
}

/* Dark Theme - Re-apply white text */
body.dark-theme .privacy-notice,
body.dark .privacy-notice,
html.dark-theme .privacy-notice,
[data-theme="dark"] .privacy-notice {
  color: rgba(255, 255, 255, 0.5) !important;
}

body.dark-theme .privacy-notice a,
body.dark .privacy-notice a,
html.dark-theme .privacy-notice a,
[data-theme="dark"] .privacy-notice a {
  color: #00d4ff;
}

/* Scrollbar - Light Theme - EMBEDDED ONLY */
body.light-theme #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb,
html.light-theme #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb,
[data-theme="light"] #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

body.dark-theme #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb:hover,
body.dark #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb:hover,
html.dark-theme #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb:hover,
[data-theme="dark"] #chatbot-embedded-container #embedded-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   LIGHT THEME - CATCH-ALL INPUT FIX
   ======================================== */

/* All inputs in embedded chat - Light Theme */
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) .embedded-chat-container input[type="text"],
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container input[type="text"],
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #user-input,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #initial-user-input {
  color: #1a1a2e !important;
  -webkit-text-fill-color: #1a1a2e !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
}

body:not(.dark-theme):not(.dark):not([data-theme="dark"]) .embedded-chat-container input[type="text"]::placeholder,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #chatbot-embedded-container input[type="text"]::placeholder,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #user-input::placeholder,
body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #initial-user-input::placeholder {
  color: rgba(0, 0, 0, 0.5) !important;
  -webkit-text-fill-color: rgba(0, 0, 0, 0.5) !important;
}

/* ========================================
   MOBILE RESPONSIVE - WIDGETS
   ======================================== */

/* Tablet and below - Stack widgets below content */
@media (max-width: 1024px) {
  /* Adjust main to allow space for widgets below */
  main {
    min-height: auto;
    padding-bottom: 1rem;
  }

  /* Move widgets to bottom, horizontal layout */
  #gitlab-widget,
  #system-widget,
  #weather-widget {
    position: fixed;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    min-width: 200px;
    max-width: 90vw;
    font-size: 0.85rem;
    z-index: 100;
  }

  #gitlab-widget {
    bottom: 140px;
  }

  #system-widget {
    bottom: 90px;
  }

  #weather-widget {
    bottom: 40px;
  }

  /* Hide toggle buttons on tablet - keep widgets visible */
  #show-gitlab,
  #show-system,
  #show-weather {
    display: none;
  }
}

/* Mobile - Collapse widgets into a compact row or hide */
@media (max-width: 768px) {
  /* Ensure main content is not cut off */
  main {
    min-height: auto;
    padding: 1rem 0.75rem 200px 0.75rem; /* Extra bottom padding for widgets */
  }

  /* Hero section adjustments */
  .hero-section {
    padding: 1rem 0.5rem;
    margin-bottom: 1rem;
  }

  /* Dialog window - ensure it doesn't overlap */
  .dialog-window {
    max-height: 50vh;
    margin-bottom: 1rem;
  }

  #chatbot-embedded-container #embedded-chatbot-messages {
    max-height: 200px;
  }

  /* Widgets - horizontal compact bar at bottom */
  #gitlab-widget,
  #system-widget,
  #weather-widget {
    position: fixed;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
    min-width: auto;
    border-radius: 0;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    backdrop-filter: blur(10px);
    z-index: 1000;
  }

  #gitlab-widget {
    bottom: 80px;
    background: rgba(30, 30, 40, 0.95);
  }

  #system-widget {
    bottom: 40px;
    background: rgba(30, 30, 40, 0.95);
  }

  #weather-widget {
    bottom: 0;
    background: rgba(30, 30, 40, 0.95);
  }

  /* Hide widget headers on mobile for compact view */
  #gitlab-widget .widget-header,
  #system-widget > button,
  #weather-widget > button {
    display: none;
  }

  /* Compact widget content */
  #gitlab-widget .widget-content,
  #system-content,
  #weather-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.75rem;
  }

  /* Footer adjustment */
  footer#footer-info {
    margin-bottom: 120px;
  }

  /* Privacy notice smaller */
  .privacy-notice {
    font-size: 0.65rem;
    padding: 0 0.5rem;
    margin-bottom: 1rem;
  }

  /* Floating chatbot button - move above widgets */
  #chatbot-toggle-btn {
    bottom: 130px !important;
    right: 10px !important;
    z-index: 1001;
  }

  /* Theme toggle position */
  #theme-toggle {
    bottom: auto;
    top: 70px;
    right: 10px;
  }
}

/* Small mobile - even more compact */
@media (max-width: 480px) {
  main {
    padding: 0.75rem 0.5rem 180px 0.5rem;
  }

  .hero-section h1 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  /* Stack widgets vertically in a collapsible area */
  #gitlab-widget,
  #system-widget,
  #weather-widget {
    padding: 0.4rem 0.75rem;
    font-size: 0.7rem;
  }

  #gitlab-widget {
    bottom: 70px;
  }

  #system-widget {
    bottom: 35px;
  }

  #weather-widget {
    bottom: 0;
  }

  /* Dialog adjustments */
  #chatbot-embedded-container .dialog-window,
  .embedded-chat-container .dialog-window {
    max-height: 45vh;
    border-radius: 10px;
  }

  #chatbot-embedded-container #embedded-chatbot-messages {
    max-height: 180px;
    padding: 0.75rem;
  }

  #chatbot-embedded-container .message,
  .embedded-chat-container .message {
    padding: 0.6rem 0.875rem;
    font-size: 0.85rem;
  }

  #chatbot-embedded-container #embedded-chatbot-footer,
  .embedded-chat-container #embedded-chatbot-footer {
    padding: 0.6rem 0.75rem;
  }

  #chatbot-embedded-container #embedded-chatbot-footer input,
  .embedded-chat-container #embedded-chatbot-footer input {
    padding: 0.5rem 0.875rem;
    font-size: 0.85rem;
  }

  /* Embedded chat container */
  .embedded-chat-container {
    padding: 0 0.25rem;
  }

  .initial-input-area {
    padding: 0.35rem 0.35rem 0.35rem 0.875rem;
  }

  .initial-input-area button,
  #chatbot-embedded-container #embedded-chatbot-footer button,
  .embedded-chat-container #embedded-chatbot-footer button {
    width: 38px;
    height: 38px;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .hero-section h1 {
    font-size: 1.2rem;
  }

  #gitlab-widget,
  #system-widget,
  #weather-widget {
    font-size: 0.65rem;
    padding: 0.35rem 0.5rem;
  }

  #chatbot-embedded-container .dialog-window,
  .embedded-chat-container .dialog-window {
    max-height: 40vh;
  }

  #chatbot-embedded-container #embedded-chatbot-messages {
    max-height: 150px;
  }
}

/* ========================================
   LIGHT THEME - WIDGETS MOBILE
   ======================================== */
@media (max-width: 768px) {
  body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #gitlab-widget,
  body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #system-widget,
  body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #weather-widget {
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #1a1a2e;
  }

  body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #system-content,
  body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #weather-content,
  body:not(.dark-theme):not(.dark):not([data-theme="dark"]) #gitlab-repos {
    color: #1a1a2e;
  }
}

/* ========================================
   OPTIONAL: COLLAPSIBLE WIDGETS TOGGLE
   ======================================== */
/* Add a master toggle for all widgets on mobile */
@media (max-width: 768px) {
  /* Hide individual show buttons */
  .gitlab-toggle-hidden,
  .system-toggle-hidden,
  .weather-toggle-hidden {
    display: none !important;
  }
}
