/*
  Bright Minimalist Theme Integration for Shiny
  - Banner styles for the welcome page
  - General element styling (typography, buttons, inputs)
  - App-specific styles (chat, sidebar)
*/

/* --- Font and Body --- */
body {
  /* Let bslib manage background and color */
  font-family: "Inter", Helvetica, sans-serif;
  font-size: 14px;
  /* Slightly smaller for density */
  background: #f8f9fa;
  /* Light gray fallback */
}

/* --- Banner for Welcome Page --- */
#banner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: default;
  height: 100vh;
  min-height: 35em;
  overflow: hidden;
  position: relative;
  text-align: center;
  /* Use a bright, subtle gradient or image */
  background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 100%);
}

#banner h2 {
  color: #2c3e50;
  display: inline-block;
  font-size: 2em;
  font-weight: 700;
  padding: 0 1em;
  position: relative;
  border-bottom: solid 2px #008080;
  /* Teal accent */
}

#banner p {
  color: #546e7a;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

/* --- General Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #2c3e50;
  /* Dark slate */
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0 0 1em 0;
}

/* --- Button Styling (Minimalist) --- */
.btn,
.button {
  border-radius: 6px;
  /* Softer corners */
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
  /* Sentence case is friendlier */
  transition: all 0.2s ease;
  box-shadow: none;
}

.btn-primary,
.button.primary {
  background-color: #008080 !important;
  border-color: #008080 !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.button.primary:hover {
  background-color: #006666 !important;
  border-color: #006666 !important;
}

/* --- Form Inputs --- */
.form-control,
.form-select {
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  color: #495057;
}

.form-control:focus,
.form-select:focus {
  background-color: #fff;
  border-color: #008080;
  box-shadow: 0 0 0 0.2rem rgba(0, 128, 128, 0.25);
}

/* --- Card Styling --- */
.card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  color: #008080;
}

/* --- Chat History Styling --- */
.chat-message {
  padding: 10px 15px;
  border-radius: 12px;
  margin-bottom: 12px;
  max-width: 90%;
  word-wrap: break-word;
}

.user-message {
  background-color: #008080;
  /* Teal */
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.model-message {
  background-color: #f1f3f5;
  /* Light gray */
  color: #212529;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid #e9ecef;
}

/* --- Sidebar Styling --- */
.nested-sidebar-nav .sidebar-nav-link:hover,
.nested-sidebar-nav .sidebar-nav-link.active {
  background-color: rgba(0, 128, 128, 0.1) !important;
  color: #008080 !important;
  border-right: 3px solid #008080;
}

.sidebar-nav-link {
  color: #495057;
}

/* --- FAB Button --- */
.fab-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
}

.fab-button {
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  background-color: #008080;
  color: white;
  border: none;
}

.fab-button:hover {
  background-color: #006666;
}

/* Keep helper classes */
.card-body-plot {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* --- Modern Dropzone UI --- */
.upload-dropzone {
  border: 2px dashed #cbd5e0 !important;
  border-radius: 12px !important;
  padding: 30px !important;
  min-height: 300px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  transition: all 0.3s ease !important;
  background-color: #ffffff !important;
  position: relative !important;
}

.upload-dropzone:hover {
  border-color: #008080 !important;
  background-color: rgba(0, 128, 128, 0.02) !important;
  transform: translateY(-2px) !important;
}

.upload-dropzone h4 {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
}

.upload-dropzone-icon {
  font-size: 3rem;
  color: #e2e8f0;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.upload-dropzone:hover .upload-dropzone-icon {
  color: #008080;
}