/* Cost Reduction Cards layout and detail CSS */

.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

@media (max-width: 576px) {
  .cost-grid {
    grid-template-columns: 1fr;
  }
}

.cost-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cost-card-header {
  margin-bottom: 12px;
}

.cost-category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--primary-glow);
  color: var(--primary);
  border: 1px solid var(--glass-border);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 8px;
}

.cost-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.cost-financials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 16px;
  text-align: center;
}

.dark-mode .cost-financials {
  background: rgba(255, 255, 255, 0.02);
}

.fin-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fin-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.fin-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.fin-val.highlight {
  color: var(--success);
}

/* Payback period box */
.fin-val.payback {
  color: var(--primary);
}

/* Progress bar inside card */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.dark-mode .progress-track {
  background: rgba(255, 255, 255, 0.05);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, #10b981 100%);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

/* Before / After Images slider or container */
.img-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.compare-box {
  position: relative;
  height: 110px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.05);
}

.dark-mode .compare-box {
  background: rgba(255, 255, 255, 0.05);
}

.compare-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-label {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.compare-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.compare-placeholder i {
  font-size: 1.2rem;
}

/* Cost details footer */
.cost-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(0,0,0,0.03);
  padding-top: 12px;
  margin-top: auto;
}

.dark-mode .cost-footer {
  border-top-color: rgba(255,255,255,0.03);
}

.cost-assignee {
  font-weight: 600;
}
