/* Fix for claims history display issues */
.claim-item {
  margin-bottom: var(--spacing-sm);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.claim-header {
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s ease;
  border-radius: var(--border-radius-sm);
  position: relative;
}

.claim-header:hover {
  background-color: #eef1f4;
}

.claim-title {
  font-weight: 600;
  color: var(--primary-color);
  flex: 1;
  margin-right: var(--spacing-xs);
}

.claim-date {
  font-size: 0.8rem;
  color: var(--text-color-light);
  margin-right: var(--spacing-sm);
  white-space: nowrap;
}

.claim-status {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 1rem;
  font-weight: 500;
  margin-right: var(--spacing-sm);
  white-space: nowrap;
}

.status-resolved {
  background-color: #e6f7e6;
  color: #28a745;
}

.status-in-progress {
  background-color: #fff3cd;
  color: #856404;
}

.status-pending {
  background-color: #e2e3e5;
  color: #495057;
}

.claim-toggle {
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  color: #6c757d;
  flex-shrink: 0;
}

.claim-toggle i {
  transition: transform 0.3s ease;
}

.claim-details {
  max-height: 0;
  overflow: hidden;
  background-color: #fff;
  font-size: 0.9rem;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out,
    opacity 0.2s ease-in-out;
  opacity: 0;
  will-change: max-height, padding, opacity;
  box-sizing: border-box; /* Ensure padding is included in height calculation */
  border-left: 1px solid #eee;
  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
  border-bottom-left-radius: var(--border-radius-sm);
  border-bottom-right-radius: var(--border-radius-sm);
}

.claim-details p {
  margin-top: 0;
  margin-bottom: var(--spacing-xs);
}

.claim-response {
  background-color: #f1f8ff;
  padding: var(--spacing-xs);
  border-radius: var(--border-radius-sm);
  border-left: 3px solid var(--primary-color);
  font-size: 0.85rem;
  margin-top: var(--spacing-xs);
}

/* Mobile responsiveness for claim headers */
@media (max-width: 767px) {
  .claim-header {
    flex-wrap: wrap;
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-xs);
  }

  .claim-title {
    flex: 100%;
    margin-bottom: var(--spacing-xs);
    order: 1;
  }

  .claim-date,
  .claim-status {
    order: 2;
  }

  .claim-toggle {
    order: 1;
    position: absolute;
    right: var(--spacing-sm);
    top: var(--spacing-sm);
  }
}

/* Active header styling */
.claim-header-active {
  background-color: #e8f0ff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.claim-header-active .claim-toggle i {
  transform: rotate(180deg);
}
