.lesson-attachments-panel {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f9fafb;
}

.lesson-attachments-panel h3 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.lesson-attachments-panel .attachments-help {
  margin: 0 0 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.lesson-attachments-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.lesson-attachments-upload input[type="text"] {
  flex: 1 1 220px;
  min-width: 180px;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
}

.lesson-attachments-upload input[type="file"] {
  flex: 1 1 220px;
}

.lesson-attachments-upload button,
.lesson-attachment-item button,
.lesson-attachment-item a {
  border: none;
  border-radius: 0.5rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.lesson-attachments-upload button {
  background: #50bcbb;
  color: #fff;
}

.lesson-attachments-upload button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.lesson-attachments-list {
  display: grid;
  gap: 0.75rem;
}

.lesson-attachment-item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #fff;
}

.lesson-attachment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.lesson-attachment-meta img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.lesson-attachment-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.75rem;
  font-weight: 700;
}

.lesson-attachment-name {
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

.lesson-attachment-type {
  font-size: 0.75rem;
  color: #6b7280;
}

.lesson-attachment-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lesson-attachment-actions a {
  background: #eff6ff;
  color: #1d4ed8;
}

.lesson-attachment-actions button {
  background: #fee2e2;
  color: #b91c1c;
}

.lesson-attachments-empty {
  padding: 1rem;
  border: 1px dashed #d1d5db;
  border-radius: 0.75rem;
  color: #6b7280;
  text-align: center;
  background: #fff;
}

.lesson-attachments-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.lesson-attachments-status.error {
  color: #b91c1c;
}

.lesson-attachments-status.success {
  color: #047857;
}

.lesson-attachments-client {
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  clear: both;
}

.lesson-attachments-client h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.lesson-attachments-client-grid {
  display: grid;
  gap: 0.75rem;
}

.lesson-attachments-client-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #f9fafb;
}

.lesson-attachments-client-item button,
.lesson-attachments-client-item a {
  background: #50bcbb;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.lesson-attachments-client-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

@media (max-width: 640px) {
  .lesson-attachment-item,
  .lesson-attachments-client-item {
    flex-direction: column;
    align-items: stretch;
  }

  .lesson-attachment-actions,
  .lesson-attachments-client-item button,
  .lesson-attachments-client-item a {
    width: 100%;
    justify-content: center;
  }
}
