/* Customer Document Styles */

.cd-customer-documents {
  padding: 20px 0;
}

.cd-customer-documents h2 {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
}

/* Filter Bar */
.cd-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e5e7eb;
  flex-wrap: wrap;
}

.cd-filter-link {
  padding: 8px 16px;
  text-decoration: none;
  color: #6b7280;
  /* Removed border-radius */
  border-radius: 0;
  transition: all 0.2s ease;
  font-weight: 500;
}

.cd-filter-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.cd-filter-link.active {
  /* Changed blue (#3b82f6) to red (#e4343b) */
  background-color: #e4343b;
  color: #ffffff;
}

/* No Documents Message */
.cd-no-documents {
  text-align: center;
  padding: 60px 20px;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
}

.cd-no-documents p {
  color: #6b7280;
  font-size: 16px;
  margin: 0;
}

/* Documents Grid */
.cd-documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Document Card */
.cd-document-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.cd-document-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-color: #d1d5db;
}

.cd-document-icon {
  /* Changed blue (#3b82f6) to red (#e4343b) */
  color: #e4343b;
  margin-bottom: 15px;
}

.cd-document-icon svg {
  display: block;
}

.cd-document-info {
  flex: 1;
  margin-bottom: 15px;
}

.cd-document-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 10px 0;
  word-break: break-word;
}

.cd-document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.cd-document-meta span {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 4px;
  background-color: #f3f4f6;
  color: #6b7280;
}

.cd-document-type {
  background-color: #dbeafe !important;
  color: #1e40af !important;
}

.cd-document-order {
  background-color: #fef3c7 !important;
  color: #92400e !important;
}

.cd-document-notes {
  margin-top: 10px;
  padding: 10px;
  background-color: #f9fafb;
  border-radius: 4px;
  /* Changed blue (#3b82f6) to red (#e4343b) */
  border-left: 3px solid #e4343b;
}

.cd-document-notes p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

.cd-document-actions {
  margin-top: auto;
}

.cd-download-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  /* Changed blue (#3b82f6) to red (#e4343b) */
  background-color: #e4343b;
  color: #ffffff;
  text-decoration: none;
  /* Removed border-radius */
  border-radius: 0;
  font-weight: 500;
  transition: background-color 0.2s ease;
  width: 100%;
  justify-content: center;
}

.cd-download-button:hover {
  /* Changed blue (#2563eb) to darker red (#c92a31) */
  background-color: #c92a31;
  color: #ffffff;
}

.cd-download-button svg {
  flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .cd-documents-grid {
    grid-template-columns: 1fr;
  }

  .cd-filter-bar {
    flex-direction: column;
  }

  .cd-filter-link {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cd-customer-documents {
    padding: 10px 0;
  }

  .cd-document-card {
    padding: 15px;
  }

  .cd-document-title {
    font-size: 14px;
  }

  .cd-document-meta {
    flex-direction: column;
    gap: 5px;
  }
}
