@import "components/inline_edit";
/* Finance Overview Styles */
.finance-overview {
  @apply max-w-7xl mx-auto;
}

/* Cost Summary Card Styles */
.cost-summary-card {
  @apply transition-all duration-200 hover:shadow-xl hover:border-gray-600;
}

.cost-summary-card--warning {
  @apply border-yellow-500/50 bg-yellow-900/10;
}

.cost-summary-card--danger {
  @apply border-red-500/50 bg-red-900/10;
}

.cost-summary-card--success {
  @apply border-green-500/50 bg-green-900/10;
}

/* Change Indicators */
.change-positive {
  @apply bg-green-900/30 text-green-400;
}

.change-negative {
  @apply bg-red-900/30 text-red-400;
}

/* Alert Styles */
.alert-overdue {
  @apply animate-pulse;
}

.alert-due_soon {
  @apply hover:bg-yellow-900/30 transition-colors;
}

/* Chart Container */
.finance-chart-container {
  @apply bg-gray-800 rounded-lg p-6 shadow-lg border border-gray-700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .finance-overview {
    @apply px-4;
  }

  .cost-summary-card {
    @apply mb-4;
  }
}
/* Inline Edit Component Styles */

/* Smooth transitions for form visibility */
[data-finance-inline-edit-target="form"],
[data-finance-inline-edit-target="display"] {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Hidden state */
.hidden {
  display: none !important;
}

/* Focus ring for better accessibility */
[data-finance-inline-edit-target="amount"]:focus,
[data-finance-inline-edit-target="description"]:focus,
[data-finance-inline-edit-target="entryDate"]:focus,
[data-finance-inline-edit-target="paymentStatus"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Success feedback animation */
@keyframes success-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Error feedback animation */
@keyframes error-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Flash message fade in */
@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-down {
  animation: fade-in-down 0.3s ease-out;
}

/* Hover state for edit button */
[data-action*="finance-inline-edit#edit"]:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* Loading state for submit button */
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  [data-finance-inline-edit-target="form"] .grid-cols-1 {
    grid-template-columns: 1fr;
  }
}
/* Shared Cost Selector Component Styles */

.shared-cost-selector {
  margin-bottom: 1rem;
}

.shared-cost-calculator {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
}

.shared-cost-calculator .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem;
}

.total-amount-display {
  margin-top: 0.5rem;
  font-size: 1.125rem;
  color: #0d6efd;
}

.project-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.project-list .form-check {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  border-radius: 0.25rem;
  transition: background-color 0.15s ease-in-out;
}

.project-list .form-check:hover {
  background-color: #f8f9fa;
}

.project-list .form-check-input:checked ~ .form-check-label {
  font-weight: 600;
  color: #0d6efd;
}

.calculation-display {
  margin-top: 1rem;
}

.calculation-display .badge {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
}

.split-indicator {
  margin-top: 1rem;
}

.split-indicator .progress {
  background-color: #e9ecef;
  border-radius: 0.25rem;
  overflow: hidden;
}

.split-indicator .progress-bar {
  transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

/* Flash animation for updated values */
@keyframes flash-update {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: #fff3cd;
  }
  100% {
    background-color: transparent;
  }
}

.flash-update {
  animation: flash-update 0.6s ease-in-out;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  display: inline-block;
}

/* Empty state styling */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

/* Accessibility: Screen reader only text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-list {
    max-height: 200px;
  }

  .calculation-display .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .calculation-display .badge {
    margin-top: 0.5rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .shared-cost-calculator {
    border-width: 2px;
  }

  .project-list .form-check:hover {
    background-color: #e9ecef;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .split-indicator .progress-bar,
  .flash-update {
    transition: none;
    animation: none;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
