/*
 * 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.
 */

/* Import Bootstrap from CDN in the layout file */

/* Custom styles below */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Step editing styles */
.step-edit-container {
  position: relative;
}

.edit-step-btn {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  padding: 0.25rem 0.5rem;
  line-height: 1;
}

.step-row:hover .edit-step-btn,
.step-row.editing .edit-step-btn {
  opacity: 1;
  visibility: visible;
}

.step-input {
  font-weight: bold;
}

.step-edit-actions {
  white-space: nowrap;
}

.step-display {
  min-width: 60px;
  display: inline-block;
}

/* Calendar styles */
.calendar-container {
  max-width: 100%;
  overflow-x: auto;
}

.calendar-table {
  margin-bottom: 0;
}

.calendar-table thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem 0.25rem;
  border-color: #dee2e6;
  font-size: 0.875rem;
}

.calendar-day {
  height: 90px;
  vertical-align: top;
  padding: 0.35rem;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
  background-color: #ffffff;
}

@media (min-width: 992px) {
  .calendar-day {
    height: 100px;
    padding: 0.5rem;
  }
}

.calendar-day.other-month {
  background-color: #f8f9fa;
  opacity: 0.5;
}

.calendar-day.today {
  background-color: #fff3cd;
}

/* Future days - light grey background */
.calendar-day.step-future {
  background-color: #f8f9fa !important;
}

.calendar-day.step-future:hover {
  background-color: #f0f2f4 !important;
}

/* Past/current days below threshold - light red background */
.calendar-day.step-not-achieved {
  background-color: #ffe6e6 !important;
}

.calendar-day.step-not-achieved:hover {
  background-color: #ffd6d6 !important;
}

/* Past/current days above threshold - light green background */
.calendar-day.step-achieved {
  background-color: #e6f4ea !important;
}

.calendar-day.step-achieved:hover {
  background-color: #d4ebe0 !important;
}

/* Special handling for today with colors */
.calendar-day.today.step-future {
  background-color: #f8f9fa !important;
  border: 2px solid #856404;
}

.calendar-day.today.step-not-achieved {
  background-color: #ffe6e6 !important;
  border: 2px solid #856404;
}

.calendar-day.today.step-achieved {
  background-color: #e6f4ea !important;
  border: 2px solid #856404;
}

.calendar-day-number {
  font-weight: 600;
  font-size: 0.75rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

@media (min-width: 992px) {
  .calendar-day-number {
    font-size: 0.875rem;
  }
}

.calendar-day.today .calendar-day-number {
  color: #856404;
}

.calendar-day-content {
  text-align: center;
  padding: 0.15rem;
}

.step-indicator {
  display: inline-block;
  font-weight: 600;
  font-size: 0.7rem;
  margin-bottom: 0.15rem;
  line-height: 1.2;
  color: #212529;
}

@media (min-width: 992px) {
  .step-indicator {
    font-size: 0.8rem;
  }
}

.donation-amount {
  font-size: 0.65rem;
  font-weight: 500;
  color: #495057;
  margin-top: 0.15rem;
}

@media (min-width: 992px) {
  .donation-amount {
    font-size: 0.75rem;
  }
}
