/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Tax Chat HTML Formatting Styles */
.highlight {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  border-left: 4px solid #007bff;
}

.savings-estimate {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  border-left: 4px solid #28a745;
}

.savings-estimate strong {
  color: #155724;
}

.action-item {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  border-left: 4px solid #ffc107;
}

.action-item strong {
  color: #856404;
}

.tax-tip {
  background-color: #e7f3ff;
  border: 1px solid #bee5eb;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  border-left: 4px solid #17a2b8;
}

.tax-tip strong {
  color: #0c5460;
}

.warning {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  border-left: 4px solid #dc3545;
}

.warning strong {
  color: #721c24;
}

/* Tax Chat Content Typography */
.tax-chat-response h3 {
  color: #343a40;
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 8px;
}

.tax-chat-response h4 {
  color: #495057;
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 20px;
  margin-bottom: 10px;
}

.tax-chat-response p {
  line-height: 1.6;
  margin-bottom: 12px;
  color: #212529;
}

.tax-chat-response ul, .tax-chat-response ol {
  margin-bottom: 16px;
  padding-left: 20px;
}

.tax-chat-response li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.tax-chat-response strong {
  font-weight: 600;
  color: #212529;
}

.tax-chat-response em {
  font-style: italic;
  color: #6c757d;
}

/* Enhanced Persona Savings Ticker Styles */
.savings-ticker-sidebar, .savings-ticker-inline {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 6px rgba(254, 215, 170, 0.2);
  position: relative;
  overflow: hidden;
}

.savings-ticker-sidebar {
  margin-top: 20px;
  position: sticky;
  top: 20px;
}

.savings-ticker-inline {
  margin-bottom: 1rem;
}

.savings-ticker-inline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  border-radius: 14px;
  pointer-events: none;
}

.ticker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(120, 53, 15, 0.2);
}

.ticker-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #78350f;
  margin: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.ticker-live-indicator {
  display: flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.live-dot {
  width: 6px;
  height: 6px;
  background-color: #16a34a;
  border-radius: 50%;
  margin-right: 6px;
  animation: livePulse 1.5s infinite;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.4);
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.4);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(22, 163, 74, 0.6);
  }
}

.ticker-content {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ticker-message {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a202c;
  text-align: center;
  line-height: 1.3;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border-radius: 6px;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease-in-out;
  position: relative;
  width: 100%;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.ticker-message::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shimmer 3s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.ticker-message.slide-out {
  transform: translateX(-20px);
  opacity: 0;
}

.ticker-message.slide-in {
  transform: translateX(20px);
  opacity: 0;
  animation: slideInSidebar 0.4s ease-out forwards;
}

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

/* Enhanced hover effect */
.savings-ticker-sidebar:hover, .savings-ticker-inline:hover {
  transform: translateY(-3px) scale(1.01);
  transition: all 0.3s ease-out;
  box-shadow: 0 8px 32px rgba(254, 215, 170, 0.3);
}

.ticker-message:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness */
@media (max-width: 991px) {
  .savings-ticker-sidebar {
    display: none;
  }
  
  .savings-ticker-inline {
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.875rem;
    border-radius: 6px;
  }
  
  .ticker-content {
    min-height: 36px;
  }
  
  .ticker-message {
    font-size: 0.75rem;
    padding: 0.5rem 0.625rem;
    line-height: 1.25;
  }
  
  .ticker-title {
    font-size: 0.8125rem;
  }
  
  .ticker-live-indicator {
    font-size: 0.625rem;
  }
  
  .live-dot {
    width: 5px;
    height: 5px;
    margin-right: 4px;
  }
}

/* Community Username Tagging Styles */
.username-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  z-index: 1050;
  display: none;
  max-height: 200px;
  overflow-y: auto;
}

.username-suggestion {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  font-size: 0.875rem;
  color: #495057;
}

.username-suggestion:hover,
.username-suggestion.selected {
  background-color: #e9ecef;
  color: #212529;
}

.username-suggestion:last-child {
  border-bottom: none;
}

/* Action Text / Trix Editor Bootstrap Integration */
trix-editor {
  border: 1px solid #dee2e6 !important;
  border-radius: 0.375rem !important;
  padding: 0.75rem !important;
  min-height: 120px !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
}

trix-editor:focus {
  border-color: #86b7fe !important;
  outline: 0 !important;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

trix-toolbar {
  border: 1px solid #dee2e6 !important;
  border-bottom: none !important;
  border-radius: 0.375rem 0.375rem 0 0 !important;
  background-color: #f8f9fa !important;
  padding: 0.5rem !important;
}

trix-toolbar .trix-button-group {
  border: 1px solid #dee2e6 !important;
  border-radius: 0.375rem !important;
  background-color: white !important;
  margin-bottom: 0 !important;
}

trix-toolbar .trix-button {
  color: #495057 !important;
  border-color: #dee2e6 !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem !important;
}

trix-toolbar .trix-button:hover {
  background-color: #e9ecef !important;
  color: #212529 !important;
}

trix-toolbar .trix-button.trix-active {
  background-color: #0d6efd !important;
  color: white !important;
  border-color: #0d6efd !important;
}

.trix-content {
  font-size: 1rem !important;
  line-height: 1.5 !important;
  color: #212529 !important;
}
