/* Comment Form Attachment Container */
.woolearn-comment-attachment-field {
  margin-top: 15px;
  margin-bottom: 20px;
}

.woolearn-comment-attachment-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--color-text-main, #333);
}

/* Dropzone styling adjustments */
#woolearn-comment-dropzone {
  border: 2px dashed var(--color-border, #ccc);
  border-radius: 10px;
  background: var(--color-bg-light, #fafafa);
  min-height: 120px;
  padding: 20px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

#woolearn-comment-dropzone:hover {
  border-color: var(--color-primary, #007cba);
  background: var(--color-bg-light-hover, #f5f5f5);
}

#woolearn-comment-dropzone .dz-message {
  margin: 2em 0;
  font-weight: 500;
  color: #666;
}

/* Multi-Attachments Frontend Grid Display */
.woolearn-comment-attachments-gallery {
  margin-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 12px;
  clear: both;
}

.woolearn-attachments-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.woolearn-attachments-files-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Image attachment styling */
.woolearn-attachment-image {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  aspect-ratio: 1 / 1;
}

.woolearn-attachment-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.woolearn-attachment-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: filter 0.3s ease;
}

.woolearn-attachment-link:hover .woolearn-attachment-img {
  filter: brightness(0.85);
}

.woolearn-image-hover-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
  padding: 8px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.woolearn-attachment-link:hover .woolearn-image-hover-overlay {
  opacity: 1;
}

/* Video attachment styling */
.woolearn-attachment-video {
  max-width: 450px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.woolearn-attachment-vid {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* PDF attachment styling */
.woolearn-attachment-pdf {
  max-width: 400px;
}

.woolearn-pdf-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--color-border, #eee);
  border-radius: 10px;
  background: var(--color-bg-card, #fff);
  text-decoration: none !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.03);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.woolearn-pdf-link:hover {
  border-color: var(--color-primary, #007cba);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  background: var(--color-bg-light, #fafafa);
}

.woolearn-pdf-icon-wrapper {
  width: 40px;
  height: 40px;
  background: rgba(219, 68, 85, 0.1);
  color: #db4437;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.woolearn-pdf-info {
  margin-right: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.woolearn-pdf-name {
  font-weight: 600;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.woolearn-pdf-type {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
}

.woolearn-pdf-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary, #007cba);
  background: rgba(0, 124, 186, 0.08);
  padding: 6px 12px;
  border-radius: 6px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.woolearn-pdf-link:hover .woolearn-pdf-btn {
  background: var(--color-primary, #007cba);
  color: #fff;
}
