/**
 * Styles for media attachments in posts
 */

.post-preview-wrapper {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 8px;
  background-color: #f8f8f8;
}

.post-preview-text {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.post-preview-media {
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.post-preview-media img {
  max-width: 100%;
  height: auto;
}

.post-preview-media video {
  max-width: 100%;
  height: auto;
}

.awards-list__image .fi {
  color: #4a90e2;
}

.awards-list__video .fi {
  color: #e24a4a;
}

/* Image upload form */
.opigno-create-media-post-form .form-managed-file {
  margin: 1rem 0;
}

.opigno-create-media-post-form .form-file {
  padding: 0.5rem;
  border: 2px dashed #ccc;
  border-radius: 4px;
  background-color: #f8f8f8;
  width: 100%;
}

.opigno-create-media-post-form .image-widget {
  display: flex;
  flex-direction: column;
}

.image-attachment {
  background-color: #edf7ff;
}

.video-attachment {
  background-color: #ffedf1;
}

.video-shared {
  width: 100%;
  max-height: 450px;
}
/**
 * Styles for Dropzone.js media uploads in Opigno Social
 */

/* Form styling */
.opigno-create-media-post-form-wrapper {
  padding: 15px;
  max-width: 100%;
}

.media-form-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.media-form-header {
  margin-bottom: 10px;
}

.media-form-body {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.media-form-text textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 12px;
  resize: vertical;
}

/* Dropzone styling enhancements */
.media-form-dropzone .dropzone-widget {
  border-radius: 8px;
  border: 2px dashed #ccc;
  background-color: #f9f9f9;
  padding: 20px;
  transition: all 0.3s ease;
}

.media-form-dropzone .dropzone-widget:hover {
  border-color: #007bff;
  background-color: #f0f7ff;
}

.dropzonejs-preview {
  margin: 15px 0;
  padding: 10px;
  border-radius: 5px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.dropzonejs-preview img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 5px;
  object-fit: cover;
}

.dropzone-widget .dz-message {
  text-align: center;
  padding: 30px 0;
  color: #666;
  font-size: 1.1em;
}

.dropzone-widget .dz-preview .dz-details {
  padding: 10px;
}

.dropzone-widget .dz-preview .dz-image {
  width: 120px;
  height: 120px;
  border-radius: 5px;
  overflow: hidden;
}

.dropzone-widget .dz-preview .dz-progress {
  height: 10px;
  border-radius: 5px;
  margin-top: 5px;
}

.dropzone-widget .dz-preview .dz-error-message {
  color: #dc3545;
  margin-top: 5px;
  font-size: 0.875rem;
}

.dropzone-widget .dz-preview .dz-success-mark,
.dropzone-widget .dz-preview .dz-error-mark {
  margin-top: 8px;
}

.media-hint-text {
  font-size: 0.875rem;
  color: #666;
  margin-top: 10px;
}

.media-form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

.ajax-progress-throbber {
  display: inline-block;
  margin-left: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .dropzonejs-preview img {
    max-width: 100px;
    max-height: 100px;
  }
  
  .dropzone-widget .dz-message {
    padding: 20px 0;
    font-size: 1em;
  }
}

/* Styling for error states */
.error .dropzone-widget {
  border-color: #dc3545;
  background-color: #fff0f0;
}

/* Button styling */
.opigno-create-media-post {
  padding: 8px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.opigno-create-media-post:hover {
  background-color: #0056b3;
}

/* Remove duplicated file browser button from Dropzone UI */
.dropzone-widget .dropzonejs-browse {
  display: none;
}