// ==========================================================================
// Products Page Styles
// ==========================================================================

// Product management specific styles
.product-management {
  .stats-card {
    @include stats-card-hover();
  }

  .stats-icon {
    @include stats-icon();
  }

  @include product-status-badges();

  .product-image {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bs-border-color);
  }

  .product-card {
    @include admin-card();
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;

    &:hover {
      border-color: var(--bs-primary);
      transform: translateY(-2px);
      box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
    }

    &.selected {
      border-color: var(--bs-primary);
      background-color: var(--bs-primary-bg-subtle);
    }
  }

  .chart-container {
    @include chart-container(250px, 300px);
  }

  .inventory-alert {
    background-color: var(--bs-warning-bg-subtle);
    border: 1px solid var(--bs-warning-border-subtle);
    border-radius: var(--bs-border-radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    
    .alert-icon {
      color: var(--bs-warning-text-emphasis);
    }
  }

  .product-actions {
    .dropdown-toggle {
      border: none;
      background: none;
      color: var(--bs-secondary-color);
      
      &:hover {
        color: var(--bs-emphasis-color);
      }
    }
  }

  .bulk-actions-bar {
    background: var(--bs-primary-bg-subtle);
    border: 1px solid var(--bs-primary-border-subtle);
    border-radius: var(--bs-border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;

    &.show {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .product-filter {
    background: var(--bs-secondary-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--bs-border-color);
  }

  .category-badge {
    @include role-badge();
    background-color: var(--bs-info-bg-subtle);
    color: var(--bs-info-text-emphasis);
    border: 1px solid var(--bs-info-border-subtle);
  }

  .price-tag {
    font-weight: 600;
    color: var(--bs-success);
  }

  .sku-code {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
  }

  // Simple table checkbox styling for product selection
  .table {
    input[type="checkbox"].form-check-input {
      width: 16px !important;
      height: 16px !important;
      border: 1px solid var(--bs-border-color) !important;
      border-radius: 3px !important;
      background: var(--bs-body-bg) !important;
      transition: all var(--transition-fast) !important;
      margin: 0 !important;
      appearance: none !important;
      -webkit-appearance: none !important;
      -moz-appearance: none !important;
      background-size: contain !important;
      background-repeat: no-repeat !important;
      background-position: center !important;
      position: relative !important;
      z-index: 1 !important;

      // Remove any pseudo-elements from Bootstrap
      &::before,
      &::after {
        display: none !important;
        content: none !important;
      }

      &:checked {
        background-color: var(--bs-primary) !important;
        border-color: var(--bs-primary) !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;

        // Remove any checked pseudo-elements
        &::before,
        &::after {
          display: none !important;
          content: none !important;
        }
      }

      &:focus {
        box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25) !important;
        border-color: var(--bs-primary) !important;
        outline: none !important;
      }

      &:hover {
        border-color: var(--bs-primary) !important;
      }

      // Remove any indeterminate styling
      &:indeterminate {
        background-image: none !important;
        background-color: var(--bs-primary) !important;
        border-color: var(--bs-primary) !important;

        &::before,
        &::after {
          display: none !important;
          content: none !important;
        }
      }
    }

    // Also target any wrapper elements that might have overlays
    .form-check {
      position: relative !important;

      &::before,
      &::after {
        display: none !important;
        content: none !important;
      }
    }
  }
}