/* Custom Styles for Hearty Helpers */

/* Color Variables */
:root {
  --primary-blue: #215F9A;
  --light-blue: #4A90E2;
  --accent-green: #2E8B57;
  --warm-gray: #F8F9FA;
  --soft-white: #FFFFFF;
  --text-dark: #2C3E50;
  --text-muted: #6C757D;
  --border-light: #E9ECEF;
  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Global Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: var(--text-dark);
  line-height: 1.6;
}

/* Navigation Improvements */
.navbar {
  background: var(--soft-white) !important;
  box-shadow: var(--shadow-subtle);
  border: none;
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-blue) !important;
  letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-dark) !important;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  background-color: var(--warm-gray);
  color: var(--primary-blue) !important;
  transform: translateY(-1px);
}

.dropdown-menu {
  border: none;
  box-shadow: var(--shadow-card);
  border-radius: 12px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.dropdown-item {
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--warm-gray);
  color: var(--primary-blue);
}

/* Container and Layout */
.container-fluid {
  padding: 2rem 1rem;
}

/* Card Improvements */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
  color: white;
  border: none;
  padding: 1.5rem;
  font-weight: 600;
}

.card-body {
  padding: 2rem;
  background: var(--soft-white);
}

.card-title {
  color: var(--text-dark);
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-header .card-title {
  color: white !important;
}

.header-title {
  color: var(--warm-gray);
}

/* Button Improvements */
.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border: none;
  transition: all 0.3s ease;
  text-transform: none;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
  box-shadow: 0 4px 15px rgba(33, 95, 154, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 95, 154, 0.4);
  background: linear-gradient(135deg, var(--light-blue) 0%, var(--primary-blue) 100%);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-green) 0%, #34A853 100%);
  box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 139, 87, 0.4);
}

.btn-outline-primary {
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
}

.btn-secondary {
  background: linear-gradient(135deg, #6C757D 0%, #495057 100%);
}

/* Form Improvements */
.form-control, .form-select {
  border: 2px solid var(--border-light);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--soft-white);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(33, 95, 154, 0.15);
  transform: translateY(-1px);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

/* Table Improvements */
.table {
  background: var(--soft-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.table thead th {
  background: var(--primary-blue);
  color: white;
  border: none;
  font-weight: 600;
  padding: 1rem;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(33, 95, 154, 0.05);
  transform: scale(1.01);
}

.table td {
  padding: 1rem;
  border-color: var(--border-light);
  vertical-align: middle;
}

/* Badge Improvements */
.badge {
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* Alert Improvements */
.alert {
  border: none;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-subtle);
}

.alert-success {
  background: linear-gradient(135deg, #D4EDDA 0%, #C3E6CB 100%);
  color: #155724;
}

.alert-danger {
  background: linear-gradient(135deg, #F8D7DA 0%, #F5C6CB 100%);
  color: #721C24;
}

.alert-info {
  background: linear-gradient(135deg, #CCE7FF 0%, #B8DAFF 100%);
  color: #0C5460;
}

/* Page Headers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--light-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Breadcrumb Improvements */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 2rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "→";
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container-fluid {
    padding: 1rem 0.5rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  h1 {
    font-size: 2rem;
  }
}

/* Loading and Transitions */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

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

/* Custom Components */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-draft { background-color: #FFC107; }
.status-sent { background-color: var(--primary-blue); }
.status-paid { background-color: var(--accent-green); }
.status-overdue { background-color: #DC3545; }
.status-cancelled { background-color: #6C757D; }

/* Dashboard specific styles */
.dashboard-card {
  background: var(--soft-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

/* Footer improvements */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 2rem 0;
  margin-top: 4rem;
}

/* Dashboard Event Styling */
.event-start {
  border-left: 4px solid var(--primary-blue);
  padding-left: 12px;
  background-color: rgba(33, 95, 154, 0.05);
  border-radius: 8px;
  padding: 12px;
}

.event-continue {
  border-left: 2px solid var(--light-blue);
  padding-left: 12px;
  background-color: rgba(74, 144, 226, 0.03);
  border-radius: 4px;
  padding: 6px 12px;
}

.event-continue-bar {
  width: 12px;
  height: 2px;
  background-color: var(--light-blue);
  border-radius: 1px;
}

/* Clickable Event Styling */
.event-clickable {
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.event-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.event-start.event-clickable:hover {
  background-color: rgba(33, 95, 154, 0.1);
  border-left-color: var(--light-blue);
}

.event-continue.event-clickable:hover {
  background-color: rgba(74, 144, 226, 0.08);
}

/* Button styling for dashboard navigation */
.btn-outline-light {
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
  color: var(--primary-blue) !important;
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Trix Editor Styling */
trix-editor {
  border: 2px solid var(--border-light);
  border-radius: 10px;
  padding: 1rem;
  min-height: 300px;
  background: var(--soft-white);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

trix-editor:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(33, 95, 154, 0.15);
  outline: none;
}

trix-editor::placeholder {
  color: var(--text-muted);
}

/* Trix Toolbar Styling */
trix-toolbar {
  border: 2px solid var(--border-light);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: var(--warm-gray);
  padding: 0.5rem;
  margin-bottom: 0;
}

trix-toolbar .trix-button-group {
  margin: 0;
  border: none;
}

trix-toolbar .trix-button {
  border: none;
  background: transparent;
  padding: 0.5rem;
  margin: 0 0.25rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

trix-toolbar .trix-button:hover {
  background: rgba(33, 95, 154, 0.1);
}

trix-toolbar .trix-button.trix-active {
  background: var(--primary-blue);
  color: white;
}

trix-toolbar .trix-button-group-spacer {
  width: 1px;
  background: var(--border-light);
  margin: 0 0.5rem;
}

/* Rich Text Content Display (rendered content) */
.trix-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dark);
  padding: 1rem;
}

.trix-content h1,
.trix-content h2,
.trix-content h3,
.trix-content h4,
.trix-content h5,
.trix-content h6 {
  color: var(--text-dark);
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.trix-content h1 {
  font-size: 2rem;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.trix-content h2 {
  font-size: 1.75rem;
}

.trix-content h3 {
  font-size: 1.5rem;
}

.trix-content h4 {
  font-size: 1.25rem;
}

.trix-content p {
  margin-bottom: 1rem;
}

.trix-content strong {
  font-weight: 700;
  color: var(--text-dark);
}

.trix-content em {
  font-style: italic;
}

.trix-content a {
  color: var(--primary-blue);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.trix-content a:hover {
  color: var(--light-blue);
  border-bottom-color: var(--light-blue);
}

.trix-content ul,
.trix-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.trix-content ul {
  list-style-type: disc;
}

.trix-content ol {
  list-style-type: decimal;
}

.trix-content li {
  margin-bottom: 0.5rem;
}

.trix-content blockquote {
  border-left: 4px solid var(--primary-blue);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
  background: var(--warm-gray);
  padding: 1rem;
  border-radius: 0 8px 8px 0;
}

.trix-content code {
  background: var(--warm-gray);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: var(--primary-blue);
}

.trix-content pre {
  background: var(--warm-gray);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1rem 0;
}

.trix-content pre code {
  background: transparent;
  padding: 0;
}

.trix-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
  box-shadow: var(--shadow-subtle);
}

.trix-content hr {
  border: none;
  border-top: 2px solid var(--border-light);
  margin: 2rem 0;
}

/* Action Text Attachments */
.trix-content action-text-attachment {
  display: block;
  margin: 1rem 0;
}

.trix-content action-text-attachment .attachment {
  padding: 1rem;
  background: var(--warm-gray);
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.trix-content action-text-attachment .attachment__caption {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.5rem;
  text-align: center;
}
