/*---------------    Common style -------------------*/
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}


abbr[title="required"] {
  color: red !important;
  text-decoration: none;
  font-weight: bold;
}

abbr[title="required"]:hover {
  color: #c82333 !important;
  cursor: help;
}

.hidden {
  display: none;
}

.alert-dismissible .btn-close {
  padding: .75rem 0.75rem !important;
}

.alert-dismissible .btn-close:hover {
  background-color: #e5e7eb;
  transform: rotate(180deg);
}

/*---------------    Common style -------------------*/

/* Global Box Shadow implementation */
.card,
.container,
.container-fluid,
.modal-content,
.dropdown-menu,
.order-details-container,
.glass-card,
.feature,
.category-card,
.product-card,
.bulk-import-card-mobile {
  box-shadow: 15px 15px 15px rgba(0, 0, 0, 0.08) !important;
}

.card:hover,
.container:hover,
.container-fluid:hover,
.modal-content:hover,
.dropdown-menu:hover,
.order-details-container:hover,
.glass-card:hover,
.feature:hover,
.category-card:hover,
.product-card:hover,
.bulk-import-card-mobile:hover {
  box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Dark mode support */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .container,
[data-bs-theme="dark"] .container-fluid,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .order-details-container,
[data-bs-theme="dark"] .glass-card,
[data-bs-theme="dark"] .feature,
[data-bs-theme="dark"] .category-card,
[data-bs-theme="dark"] .product-card,
[data-bs-theme="dark"] .bulk-import-card-mobile {
  box-shadow: 15px 15px 15px rgba(0, 0, 0, 0.3) !important;
}

/*---------------    Datatable style -------------------*/
.pagination {
  display: inline-flex !important;
  --bs-pagination-font-size: auto !important;
}

.dt-paging {
  text-align: end !important;
}

.dt-length,
.dt-search {
  margin-bottom: 10px;
}

/*---------------    Datatable style -------------------*/


/*---------------    Dropzone style -------------------*/

.dropzone {
  padding: 10px !important;
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  background: white;
  transition: all 0.3s ease;
}

.dropzone:hover {
  border-color: #3b82f6;
  background: #f8fafc;
}

.dropzone.dz-drag-hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.dz-preview {
  transition: all 0.3s ease;
}

.dz-preview:hover {
  transform: translateY(-2px);
}

.dropzone .dz-preview .dz-image {
  width: 182px !important;
  height: 105px !important;
  border-radius: 0.375rem;
}

.dropzone .dz-message {
  margin: 0px !important;
}

.dropzone .dz-preview {
  margin: 3px !important;
}

.dropzone .dz-preview .dz-remove {
  color: #dc2626;
}

.dropzone .dz-preview .dz-remove:hover {
  color: #b91c1c;
}

/* Modal animations */
#preview-modal {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/*---------------    Dropzone style -------------------*/

.is-invalid~.invalid-feedback {
  display: block;
}

.invalid-feedback {
  display: none;
}

.form-control.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}


/* Support for input-group where feedback is outside */
.input-group.is-invalid~.invalid-feedback,
.input-group:has(.form-control:invalid)~.invalid-feedback,
.input-group:has(.form-control.is-invalid)~.invalid-feedback {
  display: block !important;
}

/* Bulk Import Mobile Redesign */
.bulk-import-card-mobile {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.bulk-import-card-mobile .card-header-custom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.bulk-import-card-mobile .import-date {
  font-size: 0.85rem;
  color: #6b7280;
}

.bulk-import-card-mobile .import-filename {
  font-weight: 600;
  color: #1f2937;
  display: block;
  margin-top: 0.25rem;
}

.bulk-import-card-mobile .import-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #e5e7eb;
}

@media (max-width: 767.98px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  #bulk-imports-table_wrapper .row:first-child {
    flex-direction: column;
    gap: 10px;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    text-align: left !important;
  }

  .dataTables_wrapper .dataTables_filter {
    margin-top: 10px;
  }
}


@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
}
