@import url("/assets/bootstrap-f3f91c0f.css");
@import url("/assets/enrich-d68b1767.css");
@import url("/assets/account-58bcda0e.css");
@import url("/assets/actiontext-e646701d.css");

body {
  margin-top: 87px;
}

abbr {
  font-weight: bold;
  color: red;
}

form.simple_form fieldset legend {
  float: unset;
}

fieldset.user_communities legend {
  font-weight: bold;
}

#contents_text_content {
  height: 300px;
  overflow-y: auto;
}

.community_profile_answer_text {
  text-align: justify;
}

#messaging_message_body {
  height: 250px;
  overflow-y: auto;
}

.toggle-permission-button {
  border: 0px;
  background-color: #fff;
}

#contents_comment_body {
  height: 200px;
  overflow-y: auto;
}

#messaging_community_mail_body {
  height: 350px;
  overflow-y: auto;
}

.root-comment:not(:first-child) {
  border-top: 1px solid gray;
  padding-top: 10px;
  width: 90%;
}

#event figcaption {
  display: none;
}

#event #event-body h1 {
  font-size: 1.2em;
  color: #000;
}

.copy-to-clipboard button {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

#news-body h1 {
  font-size: 1.2em;
  color: #000;
}

.news-show-body {
  text-align: justify;
  text-justify: inter-word;
}

.egcp-event {
  padding-left: 2px !important;
  white-space: normal !important; /* Allow text to wrap */
  overflow: visible !important; /* Prevent clipping */
  display: block !important; /* Ensure block display */
  word-wrap: break-word; /* Break long words */
  line-height: 1.2; /* Improve readability */
}

.fc-day-disabled {
  display: none;
  pointer-events: none; /* Prevents interaction */
}

.leaflet-sidebar-tabs {
  background-color: #fefefe !important;
}

/* useful for the mapping tool */
.fixed-top {
  z-index: 8888;
}

.modal {
  z-index: 9999;
}

label.hidden {
  display: none;
}

.toast {
  width: 360px;
}

a.dropdown-item {
  text-decoration: none;
}

#inline-message-form {
  margin-top: -15px;
  margin-bottom: 15px;
  .messaging_message_body #messaging_message_body {
    height: 100px;
  }

  .messaging_message_body label {
    display: none;
  }
}

/* Dropzone styles for file uploads */
.dropzone-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fafafa;
}

.dropzone-area:hover {
  border-color: #0d6efd;
  background-color: #f0f7ff;
}

.dropzone-area.dropzone-highlight {
  border-color: #0d6efd;
  background-color: #e7f1ff;
  border-style: solid;
}

.dropzone-area .dropzone-icon {
  font-size: 2rem;
  color: #6c757d;
  margin-bottom: 10px;
}

.dropzone-area .dropzone-text {
  color: #6c757d;
  margin-bottom: 5px;
}

.dropzone-area .dropzone-hint {
  font-size: 0.85rem;
  color: #adb5bd;
}

.dropzone-area .dropzone-browse {
  color: #0d6efd;
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-area .dropzone-browse:hover {
  color: #0a58ca;
}

.dropzone-preview {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  margin-top: 10px;
}

.dropzone-error {
  margin-top: 5px;
}

/* Multi-image uploader styles */
.multi-image-upload-wrapper {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  background-color: #fafafa;
  min-height: 150px;
}

.multi-image-upload-wrapper:hover {
  border-color: #0d6efd;
  background-color: #f0f7ff;
}

.multi-image-upload-wrapper.dragover {
  border-color: #0d6efd;
  background-color: #e7f1ff;
  border-style: solid;
  transform: scale(1.01);
}

.multi-image-upload-wrapper.has-images {
  padding: 15px;
  background-color: #ffffff;
}

.multi-image-dropzone-content {
  text-align: center;
  padding: 20px;
  cursor: pointer;
}

.multi-image-upload-wrapper.has-images .multi-image-dropzone-content {
  padding: 10px;
  margin-bottom: 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border: 1px dashed #dee2e6;
}

.multi-image-dropzone-content .dropzone-icon {
  font-size: 3rem;
  color: #6c757d;
  margin-bottom: 15px;
}

.multi-image-upload-wrapper.has-images .multi-image-dropzone-content .dropzone-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}

.multi-image-dropzone-content .dropzone-text {
  color: #495057;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.multi-image-upload-wrapper.has-images .multi-image-dropzone-content .dropzone-text {
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.multi-image-dropzone-content .dropzone-hint {
  font-size: 0.9rem;
  color: #adb5bd;
}

.multi-image-upload-wrapper.has-images .multi-image-dropzone-content .dropzone-hint {
  font-size: 0.75rem;
}

.multi-image-dropzone-content .dropzone-browse {
  color: #0d6efd;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 500;
}

.multi-image-dropzone-content .dropzone-browse:hover {
  color: #0a58ca;
}

/* Preview container - grid layout */
.multi-image-preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.multi-image-upload-wrapper.has-images .multi-image-preview-container {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

/* Individual preview card */
.multi-image-preview {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
}

.multi-image-preview:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.multi-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay with info and remove button */
.preview-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.multi-image-preview:hover .preview-overlay {
  opacity: 1;
}

.preview-info {
  color: white;
  font-size: 0.75rem;
}

.preview-filename {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.preview-size {
  opacity: 0.8;
}

/* Remove button */
.preview-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  color: #dc3545;
  font-size: 1.2rem;
}

.preview-remove-btn:hover {
  background: #dc3545;
  color: white;
  transform: scale(1.1);
}

.preview-remove-btn i {
  line-height: 1;
}

/* Empty state - hide when container has images */
.multi-image-upload-wrapper:not(.has-images) .multi-image-preview-container:empty::after {
  content: "";
  display: none;
}

/* Existing pictures display */
.existing-pictures .card {
  transition: all 0.2s ease;
  border: 1px solid #dee2e6;
}

.existing-pictures .card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.existing-pictures .card-img-top {
  border-bottom: 1px solid #dee2e6;
}

.existing-pictures .btn-danger {
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
}

/* Marketplace item thumbnails */
.marketplace-thumbnail {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
  background-color: #f8f9fa;
}

.marketplace-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Smaller marketplace thumbnails for profile pages */
.marketplace-thumbnail-small {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 aspect ratio */
  overflow: hidden;
  background-color: #f8f9fa;
}

.marketplace-thumbnail-small img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
