@import url(https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap);
/* DwimWidget.css: Colors and visual theme */

/* Base DWIM widget container */
.dwim-widget {
  background-color: #0a0a0f; /* Black matching AI tab */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 10px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  min-height: 34px; /* Changed from height to min-height to allow growth */
}

.dwim-widget:focus-within {
  border-color: #00ffcc;
  box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.2);
}

/* DWIM input field */
.dwim-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 12px; /* Smaller font */
  padding: 2px 12px 0; /* 2px top padding for centering */
  min-height: 28px; /* Changed to min-height */
  line-height: 24px; /* Adjusted for vertical centering */
  outline: none;
  margin: 0;
  resize: none; /* Disable manual resize */
  overflow: hidden; /* Hide scrollbar */
  white-space: pre-wrap; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
}

.dwim-input::placeholder {
  color: #888;
}

/* DWIM button - styled like toolbar tabs */
.dwim-button {
  background: transparent;
  color: #999; /* Gray text like inactive tabs */
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  height: 28px;
  margin-right: 3px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dwim-button:hover {
  background-color: rgba(0, 255, 204, 0.1); /* Same as toolbar tab hover */
  color: #00ffcc; /* Cyan on hover */
}

.dwim-button:active {
  transform: scale(0.98);
}

.dwim-button:disabled {
  background-color: transparent;
  color: #444;
  cursor: not-allowed;
}

/* Microphone button */
.mic-button {
  background-color: transparent;
  color: #666;
  border: none;
  cursor: not-allowed;
  border-radius: 6px;
  padding: 4px;
  font-size: 12px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-right: 3px;
  transition: all 0.3s ease;
}

.mic-button:disabled {
  background-color: transparent;
  color: #444;
}

/* Layout properties minimal - positioning handled by containers */

/* Notices - colors only */
.dwim-notice {
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* REPL up-arrow button */
.repl-button {
  background-color: transparent;
  color: #00ffcc;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  font-size: 14px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-right: 3px;
  transition: all 0.3s ease;
  font-weight: bold;
}

.repl-button:hover {
  background-color: rgba(0, 255, 204, 0.2);
  color: #00ffcc;
  transform: translateY(-2px);
}

.repl-button:active {
  transform: translateY(0);
}

/* Responsive adjustments removed - layout belongs in context-specific CSS files */
/* Global reset for html/body margins */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

.preference-editor-overlay {
  align-items: center;
  background: #00000080;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1100;
}

.preference-editor {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px #00000026;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 90vw;
  width: 900px;
}

.editor-header {
  align-items: center;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.editor-header h3 {
  color: #333;
  font-size: 1.2rem;
  font-weight: 500;
  margin: 0;
}

.add-item-button {
  background: #2196f3;
  border: 1px solid #2196f3;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: .9rem;
  padding: 8px 16px;
  transition: all .2s ease;
}

.add-item-button:hover {
  background: #1976d2;
  border-color: #1976d2;
}

.editor-content {
  flex: 1 1;
  overflow-y: auto;
  padding: 16px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  border-bottom: 2px solid #eee;
  color: #666;
  font-size: .9rem;
  font-weight: 500;
  padding: 12px;
  text-align: left;
}

td {
  border-bottom: 1px solid #eee;
  padding: 8px 12px;
}

input[type=text] {
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: .9rem;
  padding: 6px 8px;
  width: 100%;
}

input[type=text]:focus {
  border-color: #2196f3;
  box-shadow: 0 0 0 2px #2196f31a;
  outline: none;
}

input[type=checkbox] {
  cursor: pointer;
  height: 16px;
  width: 16px;
}

.move-buttons {
  display: flex;
  gap: 4px;
}

.move-buttons button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  color: #666;
  cursor: pointer;
  font-size: .8rem;
  padding: 2px 6px;
}

.move-buttons button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.delete-button {
  background: none;
  border: none;
  border-radius: 3px;
  color: #f44336;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 2px 8px;
}

.delete-button:hover {
  background: #ffebee;
}

.editor-footer {
  border-top: 1px solid #eee;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px;
}

.cancel-button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
}

.cancel-button, .save-button {
  cursor: pointer;
  font-size: .9rem;
  padding: 8px 16px;
}

.save-button {
  background: #4caf50;
  border: 1px solid #4caf50;
  border-radius: 4px;
  color: #fff;
}

.save-button:hover {
  background: #43a047;
  border-color: #43a047;
}

.prompt-widget {
  position: relative;
  width: 100%;
}

.prompt-button {
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  cursor: pointer;
  display: flex;
  font-size: .9rem;
  justify-content: space-between;
  padding: 8px 12px;
  transition: all .2s ease;
  width: 100%;
}

.prompt-button:hover {
  background: #f9f9f9;
  border-color: #bbb;
}

.prompt-button.open {
  border-color: #2196f3;
  box-shadow: 0 0 0 2px #2196f31a;
}

.arrow {
  color: #666;
  font-size: .8rem;
  transition: transform .2s ease;
}

.prompt-button.open .arrow {
  transform: rotate(180deg);
}

.prompt-menu {
  animation: slideDown .2s ease;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px #0000001a;
  left: 0;
  margin-top: 4px;
  max-height: 300px;
  overflow-y: auto;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 1000;
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-item {
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  font-size: .9rem;
  padding: 8px 12px;
  text-align: left;
  transition: background .2s ease;
  width: 100%;
}

.menu-item:hover {
  background: #f5f5f5;
}

.menu-item.selected {
  background: #e3f2fd;
  color: #1976d2;
}

.prompt-menu::-webkit-scrollbar {
  width: 8px;
}

.prompt-menu::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.prompt-menu::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

.prompt-menu::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

.preference-group {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px #0000001a;
  margin-bottom: 24px;
  padding: 20px;
}

.preference-group-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.preference-group-header h3 {
  color: #333;
  font-size: 1.2rem;
  margin: 0;
}

.preference-group-actions {
  display: flex;
  gap: 8px;
}

.preference-group-actions button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #666;
  cursor: pointer;
  font-size: .9rem;
  padding: 6px 12px;
  transition: all .2s ease;
}

.edit-button:hover {
  background: #f0f0f0;
  border-color: #ccc;
  color: #333;
}

.reset-button {
  border-color: #ffcdd2;
  color: #d32f2f;
}

.reset-button:hover {
  background: #ffebee;
  border-color: #ef9a9a;
}

.preference-menus {
  grid-gap: 24px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

.preference-menus.tone-indicators {
  margin: 0 auto;
  max-width: 800px;
}

.preference-menus.tone-indicators .preference-menu {
  margin-bottom: 16px;
}

.preference-menus.tone-indicators .left-column,
.preference-menus.tone-indicators .right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preference-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preference-menu label {
  color: #666;
  font-size: .9rem;
  font-weight: 500;
}

.preference-editor {
  animation: fadeIn .2s ease-out;
}

.preferences-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px #00000026;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 90vw;
  position: relative;
  width: 900px;
}

.preferences-header {
  align-items: center;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
}

.preferences-header h2 {
  color: #333;
  font-size: 1.5rem;
  margin: 0;
}

.close-button {
  background: none;
  border: none;
  border-radius: 4px;
  color: #666;
  cursor: pointer;
  font-size: 24px;
  padding: 4px 8px;
}

.close-button:hover {
  background: #f5f5f5;
  color: #333;
}

.preferences-tabs {
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 4px;
  padding: 0 24px;
}

.tab-button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: .9rem;
  padding: 12px 20px;
  position: relative;
  transition: all .2s ease;
}

.tab-button:hover {
  color: #333;
}

.tab-button.active {
  color: #2196f3;
  font-weight: 500;
}

.tab-button.active:after {
  background: #2196f3;
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
}

.preferences-content {
  flex: 1 1;
  overflow-y: auto;
  padding: 24px;
}

.preferences-footer {
  background: #f9f9f9;
  border-top: 1px solid #eee;
  padding: 16px 24px;
}

.preferences-note {
  color: #666;
  font-size: .9rem;
  font-style: italic;
  margin: 0;
}

.quick-presets {
  grid-gap: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  padding: 16px 0;
}

.quick-description {
  color: #666;
  grid-column: 1/-1;
  margin: 0 0 16px;
}

.preset-button {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  padding: 16px;
  text-align: left;
  transition: all .2s ease;
}

.preset-button:hover {
  border-color: #2196f3;
  box-shadow: 0 2px 8px #2196f31a;
}

.preset-header {
  margin-bottom: 8px;
}

.preset-label {
  color: #333;
  font-size: 1.1rem;
  font-weight: 500;
}

.preset-description {
  color: #666;
  font-size: .9rem;
  line-height: 1.4;
  margin: 0;
}

.preferences-groups {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.preferences-panel {
  animation: slideIn .2s ease-out;
}

.user-popup-menu {
  display: inline-block;
  position: relative;
  z-index: 100;
}

.burger-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger-icon {
  display: flex;
  flex-direction: column;
  height: 16px;
  justify-content: space-between;
  width: 20px;
}

.burger-icon span {
  background-color: #333;
  display: block;
  height: 2px;
  transition: all .3s ease;
}

.menu-items {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 4px #0000001a;
  list-style: none;
  margin: 4px 0;
  min-width: 150px;
  padding: 8px 0;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 101;
}

.menu-items li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-items button {
  align-items: center;
  background: none;
  border: none;
  color: #000000de;
  cursor: pointer;
  display: flex;
  font-family: Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 12px 24px;
  text-align: left;
  transition: background-color .2s ease;
  width: 100%;
}

.menu-items button:hover {
  background-color: #00000029;
}

.menu-items button:focus {
  background-color: #0000003d;
}

.menu-items button:active {
  background-color: #00000052;
}

.preferences-overlay {
  align-items: center;
  animation: fadeIn .2s ease;
  background: #00000080;
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1100;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.navbar {
  background-color: #1976d2;
  box-shadow: 0 2px 4px -1px #0003, 0 4px 5px 0 #00000024, 0 1px 10px 0 #0000001f;
  font-family: Roboto, sans-serif;
  height: 64px;
  justify-content: space-between;
  left: 0;
  padding: 0 24px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.nav-section, .navbar {
  align-items: center;
  display: flex;
}

.nav-section {
  gap: 24px;
  height: 100%;
}

.logo {
  font-size: 20px;
  letter-spacing: .15px;
}

.logo, .nav-item {
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

.nav-item {
  font-size: 16px;
  letter-spacing: .1px;
  margin: 0 12px;
  padding: 8px 0;
  position: relative;
}

.clickable {
  color: #fff;
  cursor: pointer;
  transition: opacity .2s ease;
}

.nav-section a {
  text-decoration: none;
}

.clickable:hover {
  opacity: .87;
}

.current {
  color: #000;
  cursor: default;
}

.current:after {
  background-color: #000;
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  width: 100%;
}

.user-section {
  align-items: center;
  display: flex;
  height: 100%;
}

.user-handle {
  color: #ffffffde;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1px;
  margin-right: 16px;
}

.login-dialog {
  background-color: #1a1d2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  margin: 80px auto;
  padding: 25px;
  width: 350px;
  color: #e0e0e0;
}

.login-dialog h2 {
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 25px;
  text-align: center;
}

.login-dialog h2.login-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left; /* Override text-align for flex layout */
}

.login-dialog .login-icon {
  width: 32px;
  height: 32px;
  vertical-align: middle;
  display: block; /* Ensure image displays as block element */
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.login-dialog form {
  display: flex;
  flex-direction: column;
}

/* Form row styling for the login form */
.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.form-row label {
  width: 100px;
  text-align: right;
  margin-right: 15px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.form-row input {
  width: 180px;
  margin-bottom: 0;
}

.login-dialog label {
  font-weight: 700;
}

.login-dialog input {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 14px;
  padding: 10px;
  background-color: #252b44;
  color: #e0e0e0;
}

.login-dialog .error {
  color: red;
  margin-bottom: 15px;
  text-align: center;
}

.login-dialog .links {
  display: flex;
  justify-content: space-between;
}

.login-dialog button {
  background-color: #00ffcc;
  border: none;
  border-radius: 4px;
  color: #0a0a0f;
  cursor: pointer;
  font-size: 16px;
  padding: 10px;
  transition: background-color .3s ease;
  font-weight: 500;
}

.login-dialog button:hover {
  background-color: #00ddaa;
}

.login-dialog .links {
  margin-top: 20px;
  text-align: center;
}

.login-dialog .links button {
  background: none;
  border: none;
  color: #00ffcc;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: underline;
}

.login-dialog .links button:hover {
  color: #00ddaa;
}

.register-page {
  background-color: #1a1d2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  margin: 80px auto;
  padding: 25px;
  width: 400px;
  color: #e0e0e0;
}

.register-page h2 {
  font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 25px;
  text-align: center;
}

.register-page form {
  display: flex;
  flex-direction: column;
}

.register-page label {
  font-weight: 700;
  margin-bottom: 8px;
}

.register-page input, .register-page textarea {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 20px;
  padding: 10px;
  background-color: #252b44;
  color: #e0e0e0;
}

.register-page .error {
  color: red;
  margin-bottom: 15px;
  text-align: center;
}

.register-page button {
  background-color: #00ffcc;
  border: none;
  border-radius: 4px;
  color: #0a0a0f;
  cursor: pointer;
  font-size: 16px;
  padding: 12px;
  transition: background-color .3s ease;
  font-weight: 500;
}

.register-page button:hover {
  background-color: #00ddaa;
}

.register-fine-print {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.register-fine-print p {
  margin: 0;
  font-size: 13px;
  color: #999;
  font-style: italic;
}

/* Home page container styles */

.home-container {
  display: flex;
  flex-direction: column;
  font-family: Roboto, sans-serif;
  height: 100%; /* Use full height of parent */
  width: 100%;
  overflow: hidden; /* Prevent scrollbars on container */
  position: relative; /* Ensure proper stacking context */
  box-sizing: border-box;
  background: #0a0a0f;
}

.home-container .messages-area {
  background: #0a0a0f;
  flex: 1 1 auto; /* Take all available space between toolbar and dwim */
  min-height: 0; /* Allow shrinking to zero if needed */
  overflow-y: auto; /* Only messages area gets scrollbar */
  padding: 20px;
  color: #e0e0e0;
}



/* Removed global dwim styles - these are now in DwimWidget.css */

/* Ensure DwimWidget fragment children layout properly in HomePage */
.home-container > .notice-container {
  position: fixed;
  top: 80px; /* Below toolbar */
  right: 20px;
  z-index: 1000;
}

/* Playlist page styles moved to PlaylistPage.css */

/* h2 styles moved to PlaylistPage.css */

/* PlaylistPage DwimWidget positioning only */
.playlist-page :global(.dwim-widget) {
  margin: 20px auto;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 2px 4px #0000001a;
}

body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Prevent body scrollbars */
  background-color: #1e5f3a; /* Dark green background */
  color: #e0e0e0; /* Light text for dark background */
}

/* Main app container */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background-color: #1e5f3a; /* Dark green background */
}

/* Add padding-top only when authenticated (toolbar present) */
.app.authenticated {
  padding-top: 56px; /* Account for fixed toolbar */
}

/* Content wrapper that contains Routes */
.app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 36px; /* Space for help bar */
}

/* DwimWidget positioning for app level */
.app .dwim-widget {
  position: fixed;
  bottom: 36px; /* Above help bar */
  left: 20px;
  right: 20px;
  z-index: 999; /* Below help bar (1000) but above content */
}

/* DwimWidget notices positioning */
.dwim-notices {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10000;
  max-width: 300px;
}



.messages-area {
  /* background removed - let components define their own */
  flex: 1 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px;
  scroll-behavior: smooth;
}

/* Message styles removed - now in BubbleWindow.css for bubble windows only */
/* When Home tab needs messages, create HomePage-specific message styles */

