/* Scenes Show Page Styles */
body {
  font-family: 'Satoshi', sans-serif;
  line-height: 1.5em;
  /* change text color to white
  color: #ffffff;*/ }

img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  filter: brightness(1);
  transition: filter 0.3s;
  border: 0px solid #ddd;
  border-radius: 5px; }

img:hover {
  filter: brightness(1); }

.grid {
  column-count: 4;
  column-gap: 10px;
  padding: 0px;
  max-width: 100%; }

.material-icons.orange600 {
  /* color: var(--accent-color); */
  color: #169a71;
  font-size: 25px; }

.grid-item {
  background-color: #000;
  border: 0px solid #ccc;
  border-radius: 4px;
  padding: 0px;
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: break-word;
  display: inline-block;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box; }

@media (max-width: 1200px) {
  .grid {
    column-count: 3; } }

@media (max-width: 900px) {
  .grid {
    column-count: 2; } }

@media (max-width: 600px) {
  .grid {
    column-count: 1; } }

.image-wrapper {
  position: relative; }

.image {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.99);
  transition: filter 0.3s;
  border: 0px solid #ddd;
  border-radius: 5px; }

.image:hover {
  filter: brightness(1); }

.synopsis {
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px;
  box-sizing: border-box;
  font-size: 14px;
  text-overflow: ellipsis;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s; }

.image-wrapper:hover .synopsis {
  opacity: 1; }

/* Style the buttons that are used to open and close the accordion panel */
.accordion {
  cursor: pointer;
  padding: 7px;
  width: 100%;
  text-align: left;
  border: 1px solid #ccc;
  outline: none;
  transition: 0.4s; }

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .accordion:hover {
  /* background-color: white; */ }

/* Style the accordion panel. Note: hidden by default */
.panel {
  padding: 0 18px;
  /* background-color: white; */
  display: none;
  overflow: hidden; }

.tab-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 0px solid #ccc; }

.tab-header .tab {
  padding: 10px 15px;
  cursor: pointer; }

.tab-header .tab.active {
  background-color: #eee;
  border-bottom: none; }

.carousel {
  background-color: #000;
  border-radius: 12px;
  overflow: hidden; }

.carousel-item {
  height: 400px; }

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: contain; }

.carousel-control-prev,
.carousel-control-next {
  width: 10%;
  opacity: 0.8; }

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1; }

.carousel-indicators {
  margin-bottom: 0; }

.carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 4px; }

#selection-menu {
  position: fixed;
  z-index: 1050;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
  padding: 8px;
  display: none; }

.selection-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1b1937;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s; }

.selection-button:hover {
  background: #2a2854; }

.scene-content {
  position: relative;
  user-select: text; }

/* Add a subtle highlight effect for selected text */
::selection {
  background: rgba(27, 25, 55, 0.2); }

.highlighted-text {
  background-color: rgba(142, 136, 255, 0.2);
  border-radius: 4px;
  padding: 2px 4px;
  transition: background-color 0.3s ease; }

.highlighted-text.active {
  background-color: rgba(142, 136, 255, 0.4); }

.carousel-content {
  position: relative;
  width: 100%;
  height: 100%; }

.carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.5), transparent);
  padding: 1.5rem;
  color: white;
  opacity: 0;
  transition: opacity 0.2s ease; }

.carousel-item:hover .carousel-overlay {
  opacity: 1; }

.carousel-metadata {
  display: flex;
  flex-direction: column;
  gap: 1rem; }

.prompt-text {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0;
  color: white;
  line-height: 1.4; }

.metadata-items {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9); }

.metadata-item {
  display: flex;
  align-items: center;
  gap: 0.5rem; }

.author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem; }

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover; }

.author-info span {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9); }

.shortcuts-guide {
  font-size: 0.9rem; }

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 0.5rem; }

kbd {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  display: inline-block;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1;
  padding: 0.2em 0.4em;
  white-space: nowrap; }

.text-muted {
  font-size: 0.8em; }

/* Custom Audio Player Styles */
audio {
  width: 100%;
  height: 50px; }

/* For Webkit browsers */
audio::-webkit-media-controls-panel {
  background-color: #f5f5f5; }

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display {
  color: #333; }

/* For Firefox */
@-moz-document url-prefix() {
  audio {
    background-color: #f5f5f5; } }

.modal-content {
  border: none;
  border-radius: 12px;
  overflow: hidden; }

.modal-dialog.modal-xl {
  max-width: 90vw; }

.btn-link:hover {
  opacity: 0.8; }

.modal .btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%); }

/* Add to your existing styles */
.modal .btn-link {
  transition: transform 0.2s, opacity 0.2s;
  opacity: 0.7; }

.modal .btn-link:hover {
  transform: scale(1.1);
  opacity: 1; }

/* Show keyboard shortcut hints */
.modal .tooltip {
  font-size: 0.875rem; }

/* Add a subtle glow effect on hover */
.modal .btn-link:hover i {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }

.storyboard-card {
  background: #fff;
  border: 1px solid #dee2e6;
  transition: transform 0.2s; }

.storyboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }

.shot-number {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.875rem;
  z-index: 1; }

.image-wrapper {
  position: relative;
  padding-top: 75%;
  /* 4:3 Aspect Ratio */
  overflow: hidden;
  background: #f8f9fa; }

.image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; }

.notes-section {
  background: #f8f9fa;
  border-radius: 4px;
  padding: 1rem;
  margin-top: -1rem;
  font-size: 0.875rem; }

.scene-text {
  font-size: 0.875rem;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.5; }

.prompt-text {
  font-family: monospace;
  white-space: pre-wrap;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: #666; }

.metadata {
  border-top: 1px solid #dee2e6;
  padding-top: 0.5rem;
  font-size: 0.75rem; }

/* Modal customization */
.modal-fullscreen .modal-body {
  padding: 2rem; }

.modal-fullscreen .container-fluid {
  max-width: 1600px; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .col-md-3 {
    width: 50%; } }

@media (max-width: 480px) {
  .col-md-3 {
    width: 100%; } }

.typewriter-text {
  font-family: 'Courier New', monospace; }

.typewriter-text p {
  margin: 0;
  white-space: pre-wrap; }

.tab-pane {
  max-height: 500px;
  overflow-y: auto; }

.mosaic-grid {
  columns: 6 200px;
  column-gap: 1rem;
  padding: 1rem; }

.message {
  max-width: 80%;
  margin-bottom: 15px; }

.message.user {
  margin-left: auto; }

.message.assistant {
  margin-right: auto; }

.message-content {
  word-wrap: break-word;
  white-space: pre-wrap; }

.chat-messages {
  background-color: #f8f9fa;
  border-radius: 8px; }

.chat-input {
  border-radius: 20px;
  padding: 10px 15px;
  border: 1px solid #dee2e6; }

.chat-input:focus {
  box-shadow: none;
  border-color: #80bdff; }

/* Compact Chat Message Styling */
.chat-message {
  margin-bottom: 1.5rem !important;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f3f4f6; }

.chat-message:last-child {
  border-bottom: none; }

/* User message with border and hue */
.user-message-container {
  border: 1px solid #e0e7ff;
  background-color: #f8faff;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  border-left: 3px solid #6366f1; }

/* AI message header */
.ai-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between; }

.message-author {
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151; }

/* Compact message content */
.message-content-compact {
  font-size: 0.975rem;
  line-height: 1.6;
  color: #1f2937; }

.message-content-compact p {
  margin-bottom: 0.75rem; }

.message-content-compact p:last-child {
  margin-bottom: 0; }

/* Enhanced formatting for chat messages */
.message-content-compact ul,
.message-content-compact ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem; }

.message-content-compact li {
  margin-bottom: 0.5rem;
  line-height: 1.5; }

.message-content-compact li:last-child {
  margin-bottom: 0; }

.message-content-compact strong {
  font-weight: 600;
  color: #111827; }

.message-content-compact em {
  font-style: italic;
  color: #4b5563; }

.copy-btn-cursor {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.75rem;
  padding: 0.25rem;
  border-radius: 4px;
  opacity: 0;
  transition: all 0.2s ease;
  cursor: pointer; }

.chat-message:hover .copy-btn-cursor {
  opacity: 1; }

.copy-btn-cursor:hover {
  background: #f3f4f6;
  color: #374151; }

.copy-btn {
  opacity: 0;
  transition: opacity 0.2s ease; }

.message-content:hover .copy-btn {
  opacity: 1; }

.copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.3) !important; }

.bg-primary .copy-btn {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.3); }

.bg-light .copy-btn {
  color: rgba(0, 0, 0, 0.6);
  border-color: rgba(0, 0, 0, 0.2); }

#chat-placeholder-text {
  font-style: italic;
  line-height: 1.2; }

#chatAgentSelect {
  min-width: 200px; }

/* Fixed agent selector positioning */
.chat-form .form-label {
  white-space: nowrap;
  margin-right: 0.5rem; }

/* Quick actions styling in chat */
#quick-actions-chat {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 0.75rem;
  border: 1px solid #e9ecef; }

#quick-actions-chat .btn-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem; }

/* Highlight scene creation in agent selector */
#chatAgentSelect optgroup[label*="Story Creation"] {
  background-color: #f0f9ff; }

/* Fixed Chat Container Styles */
.chat-container-fixed {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: white;
  border-left: 1px solid #dee2e6;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column; }

.chat-header {
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
  flex-shrink: 0; }

.chat-messages-fullscreen {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  background-color: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc; }

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

.chat-messages-fullscreen::-webkit-scrollbar-track {
  background: #f7fafc;
  border-radius: 3px; }

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

.chat-messages-fullscreen::-webkit-scrollbar-thumb:hover {
  background: #a0aec0; }

.chat-input-section {
  padding: 1rem;
  border-top: 1px solid #dee2e6;
  background: white;
  flex-shrink: 0;
  max-height: 50vh;
  overflow-y: auto; }

/* Adjust main content to account for fixed chat */
.container-fluid {
  margin-right: 420px;
  /* Chat width + some margin */
  transition: margin-right 0.3s ease; }

/* When chat is hidden, expand content to full width */
.container-fluid.chat-hidden {
  margin-right: 20px !important; }

/* Responsive adjustments */
@media (max-width: 1200px) {
  .chat-container-fixed {
    width: 350px; }
  .container-fluid {
    margin-right: 370px; }
  /* When chat is hidden on medium screens */
  .container-fluid.chat-hidden {
    margin-right: 20px !important; } }

@media (max-width: 992px) {
  .chat-container-fixed {
    position: relative;
    width: 100%;
    height: 600px;
    right: auto;
    top: auto;
    margin-bottom: 2rem; }
  .container-fluid {
    margin-right: 0; } }

.chat-messages {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 #f7fafc; }

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

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

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

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a0aec0; }

/* Recent Conversations Styling */
.recent-conversations-list {
  border: 1px solid #e9ecef;
  border-radius: 6px;
  background: #f8f9fa; }

.conversation-item {
  transition: background-color 0.2s ease; }

.conversation-item:hover {
  background-color: #e9ecef !important; }

.conversation-item:last-child {
  border-bottom: none !important; }

.agent-form {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px; }

.agent-form .form-control,
.agent-form .form-select {
  border: 1px solid #dee2e6;
  margin-bottom: 0.75rem; }

.agent-form .btn-primary {
  background-color: #1b1937;
  border: none; }

#agent-results .card-body {
  max-height: 400px;
  overflow-y: auto; }

#results-content {
  white-space: pre-wrap;
  font-size: 0.9rem;
  line-height: 1.6; }

.card-header .btn-outline-primary {
  border-color: #1b1937;
  color: #1b1937; }

.card-header .btn-outline-primary:hover {
  background-color: #1b1937;
  color: white; }

.theme-form {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem; }

.theme-form .form-control {
  border: 1px solid #dee2e6;
  margin-bottom: 0.75rem; }

.theme-form .btn-primary {
  background-color: #1b1937;
  border: none; }

.agent-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0; }

.agent-tab {
  flex: 1;
  padding: 8px 4px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  background: none;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s; }
  .agent-tab.active {
    color: #007bff;
    border-bottom-color: #007bff; }
  .agent-tab:hover:not(.active) {
    color: #374151;
    background: #f9fafb; }
  .agent-tab i {
    font-size: 0.75rem; }

.agent-tab-panel {
  display: none;
  padding: 0; }
  .agent-tab-panel.active {
    display: block; }

.create-mode-cards {
  padding: 0 2px; }

.create-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 0.78rem;
  color: #374151;
  transition: border-color 0.15s, background 0.15s, color 0.15s; }
  .create-card i {
    font-size: 1rem;
    margin-bottom: 2px; }
  .create-card span {
    font-weight: 600; }
  .create-card small {
    color: #9ca3af;
    font-size: 0.7rem; }
  .create-card.active {
    border-color: #007bff;
    background: #eff6ff;
    color: #007bff; }
    .create-card.active small {
      color: #93c5fd; }
  .create-card:hover:not(.active) {
    border-color: #9ca3af;
    background: #f3f4f6; }

.analyze-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 2px; }

.analyze-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px; }

.analyze-group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  width: 62px;
  flex-shrink: 0; }

.analyze-chip {
  padding: 3px 10px;
  font-size: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s; }
  .analyze-chip:hover {
    border-color: #007bff;
    color: #007bff; }
  .analyze-chip.active {
    background: #007bff;
    color: white;
    border-color: #007bff; }

.scene-preview-card {
  margin: 8px 0;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #f8f9ff;
  overflow: hidden; }

.scene-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #e0e7ff;
  font-size: 0.8rem;
  font-weight: 600;
  color: #3730a3; }

.scene-preview-content {
  padding: 12px;
  font-size: 0.85rem;
  max-height: 220px;
  overflow-y: auto;
  line-height: 1.55;
  white-space: pre-wrap;
  color: #1f2937; }

.scene-preview-actions {
  padding: 8px 12px;
  display: flex;
  gap: 8px;
  border-top: 1px solid #c7d2fe;
  background: #f0f3ff; }

.streaming-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #007bff;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-cursor 0.7s step-end infinite; }

@keyframes blink-cursor {
  0%, 100% {
    opacity: 1; }
  50% {
    opacity: 0; } }

.tool-activity-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin: 6px 0;
  font-size: 0.8rem;
  color: #6c757d;
  background: rgba(33, 147, 176, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(33, 147, 176, 0.15);
  animation: fade-in 0.2s ease-in; }

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(4px); }
  to {
    opacity: 1;
    transform: translateY(0); } }

body {
  font-family: 'DM Sans', sans-serif !important; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 700; }

.btn {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500; }

.nav-link {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500; }

.card-title {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 700; }

.story-title {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 600; }

.story-description {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 400; }

.metadata-item {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 400; }

.author-info {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 400; }

.search-results .card {
  border: none;
  border-radius: 8px;
  overflow: hidden; }
  .search-results .card .card-header {
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem; }

.search-results .search-result {
  transition: background-color 0.2s ease; }
  .search-results .search-result:hover {
    background-color: rgba(0, 0, 0, 0.02); }
  .search-results .search-result:last-child {
    border-bottom: none !important; }

.search-results mark {
  background-color: rgba(255, 243, 205, 0.5);
  padding: 0.1em 0.2em;
  border-radius: 2px;
  color: inherit; }

.search-results .metadata-item {
  font-size: 0.875rem; }

.search-results img {
  object-fit: cover; }

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important; }

.save-snippet-btn {
  background: none;
  border: none;
  color: #6c757d;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease; }
  .save-snippet-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff; }
  .save-snippet-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed; }

.snippet-save-button {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease; }
  .snippet-save-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); }

.notification {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: none;
  border-radius: 8px;
  animation: slideIn 0.3s ease; }

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0; }
  to {
    transform: translateX(0);
    opacity: 1; } }

.message-content-compact {
  user-select: text;
  cursor: text; }
  .message-content-compact::selection {
    background-color: rgba(0, 123, 255, 0.2); }

.text-decoration-none {
  text-decoration: none !important; }
